Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Remove ISCSI_TEST_MODE and corresponding dev/iscsi_test.h he...
details: https://anonhg.NetBSD.org/src/rev/a8f685300025
branches: trunk
changeset: 338569:a8f685300025
user: joerg <joerg%NetBSD.org@localhost>
date: Sat May 30 16:12:33 2015 +0000
description:
Remove ISCSI_TEST_MODE and corresponding dev/iscsi_test.h header.
diffstat:
distrib/sets/lists/comp/mi | 4 +-
sys/dev/iscsi/Makefile | 2 +-
sys/dev/iscsi/files.iscsi | 4 +-
sys/dev/iscsi/iscsi_globals.h | 31 +-
sys/dev/iscsi/iscsi_ioctl.c | 32 +-
sys/dev/iscsi/iscsi_rcv.c | 19 +-
sys/dev/iscsi/iscsi_send.c | 26 +-
sys/dev/iscsi/iscsi_test.c | 1093 ---------------------------------------
sys/dev/iscsi/iscsi_test.h | 264 ---------
sys/dev/iscsi/iscsi_testlocal.h | 105 ---
sys/dev/iscsi/iscsi_text.c | 60 +--
sys/modules/iscsi/Makefile | 4 +-
12 files changed, 18 insertions(+), 1626 deletions(-)
diffs (truncated from 1870 to 300 lines):
diff -r 6db467657a09 -r a8f685300025 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi Sat May 30 16:00:51 2015 +0000
+++ b/distrib/sets/lists/comp/mi Sat May 30 16:12:33 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1963 2015/05/29 17:40:41 joerg Exp $
+# $NetBSD: mi,v 1.1964 2015/05/30 16:12:33 joerg Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -584,7 +584,7 @@
./usr/include/dev/iscsi/iscsi.h comp-c-include iscsi
./usr/include/dev/iscsi/iscsi_ioctl.h comp-c-include iscsi
./usr/include/dev/iscsi/iscsi_perf.h comp-c-include iscsi
-./usr/include/dev/iscsi/iscsi_test.h comp-c-include iscsi
+./usr/include/dev/iscsi/iscsi_test.h comp-obsolete obsolete
./usr/include/dev/keylock.h comp-c-include
./usr/include/dev/kttcpio.h comp-c-include
./usr/include/dev/lockstat.h comp-c-include
diff -r 6db467657a09 -r a8f685300025 sys/dev/iscsi/Makefile
--- a/sys/dev/iscsi/Makefile Sat May 30 16:00:51 2015 +0000
+++ b/sys/dev/iscsi/Makefile Sat May 30 16:12:33 2015 +0000
@@ -2,6 +2,6 @@
INCSDIR= /usr/include/dev/iscsi
-INCS= iscsi.h iscsi_ioctl.h iscsi_test.h iscsi_perf.h
+INCS= iscsi.h iscsi_ioctl.h iscsi_perf.h
.include <bsd.kinc.mk>
diff -r 6db467657a09 -r a8f685300025 sys/dev/iscsi/files.iscsi
--- a/sys/dev/iscsi/files.iscsi Sat May 30 16:00:51 2015 +0000
+++ b/sys/dev/iscsi/files.iscsi Sat May 30 16:12:33 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.iscsi,v 1.3 2015/04/12 14:48:32 joerg Exp $
+# $NetBSD: files.iscsi,v 1.4 2015/05/30 16:12:34 joerg Exp $
#
# Configuration file for iSCSI initiator
@@ -6,7 +6,6 @@
defparam ISCSI_DEBUG
defflag ISCSI_PERFTEST
-defflag ISCSI_TEST_MODE
file dev/iscsi/base64.c iscsi
file dev/iscsi/iscsi_ioctl.c iscsi
@@ -14,6 +13,5 @@
file dev/iscsi/iscsi_profile.c iscsi
file dev/iscsi/iscsi_rcv.c iscsi
file dev/iscsi/iscsi_send.c iscsi
-file dev/iscsi/iscsi_test.c iscsi
file dev/iscsi/iscsi_text.c iscsi
file dev/iscsi/iscsi_utils.c iscsi
diff -r 6db467657a09 -r a8f685300025 sys/dev/iscsi/iscsi_globals.h
--- a/sys/dev/iscsi/iscsi_globals.h Sat May 30 16:00:51 2015 +0000
+++ b/sys/dev/iscsi/iscsi_globals.h Sat May 30 16:12:33 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iscsi_globals.h,v 1.8 2015/05/15 16:24:30 joerg Exp $ */
+/* $NetBSD: iscsi_globals.h,v 1.9 2015/05/30 16:12:34 joerg Exp $ */
/*-
* Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -61,7 +61,6 @@
/* #define ISCSI_DEBUG 1 */
#include "iscsi_perf.h"
-#include "iscsi_test.h"
/* ------------------------- Global Constants ----------------------------- */
@@ -195,10 +194,6 @@
typedef struct ccb_s ccb_t;
typedef struct pdu_s pdu_t;
-
-#include "iscsi_testlocal.h"
-
-
/* the serial number management structure (a circular buffer) */
typedef struct {
@@ -240,11 +235,6 @@
connection_t *connection;
/* the connection this PDU belongs to */
-#ifdef ISCSI_TEST_MODE
- pdu_header_t mod_pdu;
- /* Buffer for modified PDU header (test mode) */
-#endif
-
#ifdef ISCSI_PERFTEST
int perf_index;
/* performance counter index */
@@ -398,11 +388,6 @@
/* only valid during login */
pdu_t pdu[PDUS_PER_CONNECTION]; /* PDUs */
-
-#ifdef ISCSI_TEST_MODE
- test_pars_t *test_pars;
- /* connection in test mode if non-NULL */
-#endif
};
/* the connection list type */
@@ -674,21 +659,9 @@
/* Version dependencies */
-#ifdef ISCSI_TEST_MODE
-#define SET_CCB_TIMEOUT(conn, ccb, tout) do { \
- if (test_ccb_timeout (conn)) { \
- callout_schedule(&ccb->timeout, tout); \
- } \
-} while (/*CONSTCOND*/ 0)
-#define SET_CONN_TIMEOUT(conn, tout) do { \
- if (test_conn_timeout (conn)) { \
- callout_schedule(&conn->timeout, tout); \
- } \
-} while (/*CONSTCOND*/ 0)
-#else
+/* XXX */
#define SET_CCB_TIMEOUT(conn, ccb, tout) callout_schedule(&ccb->timeout, tout)
#define SET_CONN_TIMEOUT(conn, tout) callout_schedule(&conn->timeout, tout)
-#endif
/* in iscsi_ioctl.c */
diff -r 6db467657a09 -r a8f685300025 sys/dev/iscsi/iscsi_ioctl.c
--- a/sys/dev/iscsi/iscsi_ioctl.c Sat May 30 16:00:51 2015 +0000
+++ b/sys/dev/iscsi/iscsi_ioctl.c Sat May 30 16:12:33 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iscsi_ioctl.c,v 1.8 2015/05/15 16:24:30 joerg Exp $ */
+/* $NetBSD: iscsi_ioctl.c,v 1.9 2015/05/30 16:12:34 joerg Exp $ */
/*-
* Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -499,10 +499,6 @@
}
}
-#ifdef ISCSI_TEST_MODE
- test_remove_connection(conn);
-#endif
-
conn->terminating = status;
conn->state = ST_SETTLING;
@@ -720,10 +716,6 @@
* increments performed in get_socket().
*/
-#ifdef ISCSI_TEST_MODE
- test_assign_connection(connection);
-#endif
-
if ((rc = send_login(connection)) != 0) {
DEBC(connection, 0, ("Login failed (rc %d)\n", rc));
/* Don't attempt to recover, there seems to be something amiss */
@@ -1679,28 +1671,6 @@
break;
#endif
-#ifdef ISCSI_TEST_MODE
- case ISCSI_TEST_DEFINE:
- test_define((iscsi_test_define_parameters_t *) addr);
- break;
-
- case ISCSI_TEST_ADD_NEGOTIATION:
- test_add_neg((iscsi_test_add_negotiation_parameters_t *) addr);
- break;
-
- case ISCSI_TEST_ADD_MODIFICATION:
- test_add_mod(l->l_proc, (iscsi_test_add_modification_parameters_t *) addr);
- break;
-
- case ISCSI_TEST_SEND_PDU:
- test_send_pdu(l->l_proc, (iscsi_test_send_pdu_parameters_t *) addr);
- break;
-
- case ISCSI_TEST_CANCEL:
- test_cancel((iscsi_test_cancel_parameters_t *) addr);
- break;
-#endif
-
default:
DEBOUT(("Invalid IO-Control Code\n"));
return ENOTTY;
diff -r 6db467657a09 -r a8f685300025 sys/dev/iscsi/iscsi_rcv.c
--- a/sys/dev/iscsi/iscsi_rcv.c Sat May 30 16:00:51 2015 +0000
+++ b/sys/dev/iscsi/iscsi_rcv.c Sat May 30 16:12:33 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iscsi_rcv.c,v 1.7 2015/05/15 16:24:30 joerg Exp $ */
+/* $NetBSD: iscsi_rcv.c,v 1.8 2015/05/30 16:12:34 joerg Exp $ */
/*-
* Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -210,11 +210,6 @@
pdu->io_vec[i].iov_len = 4;
uio->uio_resid += 4;
}
-#ifdef ISCSI_TEST_MODE
- /* save data pointer and size */
- pdu->save_uio.uio_iov = (struct iovec *) data;
- pdu->save_uio.uio_resid = len;
-#endif
/* get the data */
if (my_soo_read(conn, &pdu->uio, MSG_WAITALL) != 0) {
@@ -546,9 +541,6 @@
callout_stop(&conn->timeout);
-#ifdef ISCSI_TEST_MODE
- test_remove_connection(conn);
-#endif
/* let send thread take over next step of cleanup */
wakeup(&conn->pdus_to_send);
}
@@ -1009,9 +1001,6 @@
if (digest != pdu->pdu.HeaderDigest) {
DEBOUT(("Header Digest Error: comp = %08x, rx = %08x\n",
digest, pdu->pdu.HeaderDigest));
-#ifdef ISCSI_TEST_MODE
- test_mode_rx(conn, pdu, TEST_INVALID_HEADER_CRC);
-#endif
/* try to skip to next PDU */
try_resynch_receive(conn);
free_pdu(pdu);
@@ -1044,12 +1033,6 @@
} else {
rc = read_pdu_data(pdu, NULL, 0);
}
-#ifdef ISCSI_TEST_MODE
- if (test_mode_rx(conn, pdu, rc)) {
- free_pdu(pdu);
- return rc;
- }
-#endif
if (!rc && (conn->state <= ST_WINDING_DOWN ||
(pdu->pdu.Opcode & OPCODE_MASK) == TOP_Logout_Response)) {
diff -r 6db467657a09 -r a8f685300025 sys/dev/iscsi/iscsi_send.c
--- a/sys/dev/iscsi/iscsi_send.c Sat May 30 16:00:51 2015 +0000
+++ b/sys/dev/iscsi/iscsi_send.c Sat May 30 16:12:33 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iscsi_send.c,v 1.11 2015/05/15 16:24:30 joerg Exp $ */
+/* $NetBSD: iscsi_send.c,v 1.12 2015/05/30 16:12:34 joerg Exp $ */
/*-
* Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -311,25 +311,13 @@
#endif
/*DEB (99,("Send thread woke up, pdu = %x)\n", (int)pdu)); */
-#ifdef ISCSI_TEST_MODE
- if (!test_mode_tx(conn, pdu)) {
- if (!(pdu->flags & PDUF_NOUPDATE)) {
-#endif
- /* update ExpStatSN here to avoid discontinuities */
- /* and delays in updating target */
- pdu->pdu.p.command.ExpStatSN =
- htonl(conn->StatSN_buf.ExpSN);
+ /* update ExpStatSN here to avoid discontinuities */
+ /* and delays in updating target */
+ pdu->pdu.p.command.ExpStatSN = htonl(conn->StatSN_buf.ExpSN);
- if (conn->HeaderDigest)
- pdu->pdu.HeaderDigest =
- gen_digest(&pdu->pdu, BHS_SIZE);
-#ifdef ISCSI_TEST_MODE
- }
-#endif
- my_soo_write(conn, &pdu->uio);
-#ifdef ISCSI_TEST_MODE
- }
-#endif
+ if (conn->HeaderDigest)
+ pdu->pdu.HeaderDigest = gen_digest(&pdu->pdu, BHS_SIZE);
+ my_soo_write(conn, &pdu->uio);
PERF_PDUSNAPE(pdu);
if (pdu->disp <= PDUDISP_FREE) {
diff -r 6db467657a09 -r a8f685300025 sys/dev/iscsi/iscsi_test.c
--- a/sys/dev/iscsi/iscsi_test.c Sat May 30 16:00:51 2015 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1093 +0,0 @@
-/* $NetBSD: iscsi_test.c,v 1.4 2015/04/13 16:33:24 riastradh Exp $ */
-
-/*-
- * Copyright (c) 2006,2011 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Wasabi Systems, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
Home |
Main Index |
Thread Index |
Old Index