This commit is contained in:
Mike Christie 2012-03-06 05:28:28 -06:00
parent 72d7a8e8be
commit cfcc31b534
19 changed files with 31413 additions and 4567 deletions

View File

@ -1,6 +1,6 @@
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/libiscsi.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.c open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/libiscsi.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.c 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.c 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/libiscsi.c 2011-08-14 16:53:58.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/libiscsi.c 2012-03-05 23:15:31.000000000 -0600
@@ -0,0 +1,612 @@ @@ -0,0 +1,612 @@
+/* +/*
+ * iSCSI Administration library + * iSCSI Administration library
@ -614,9 +614,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.c open-iscsi-2.0
+ +
+ return 0; + return 0;
+} +}
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.doxy open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/libiscsi.doxy diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.doxy open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/libiscsi.doxy
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.doxy 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.doxy 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/libiscsi.doxy 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/libiscsi.doxy 2012-03-05 23:15:31.000000000 -0600
@@ -0,0 +1,1473 @@ @@ -0,0 +1,1473 @@
+# Doxyfile 1.5.7.1 +# Doxyfile 1.5.7.1
+ +
@ -2091,9 +2091,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.doxy open-iscsi-
+# used. If set to NO the values of all tags below this one will be ignored. +# used. If set to NO the values of all tags below this one will be ignored.
+ +
+SEARCHENGINE = NO +SEARCHENGINE = NO
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.h open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/libiscsi.h diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.h open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/libiscsi.h
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.h 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.h 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/libiscsi.h 2011-08-14 16:53:58.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/libiscsi.h 2012-03-05 23:15:31.000000000 -0600
@@ -0,0 +1,344 @@ @@ -0,0 +1,344 @@
+/* +/*
+ * iSCSI Administration library + * iSCSI Administration library
@ -2439,9 +2439,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.h open-iscsi-2.0
+#endif /* __cplusplus */ +#endif /* __cplusplus */
+ +
+#endif +#endif
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/Makefile open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/Makefile diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/Makefile open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/Makefile
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/Makefile 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/Makefile 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/Makefile 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/Makefile 2012-03-05 23:16:31.000000000 -0600
@@ -0,0 +1,61 @@ @@ -0,0 +1,61 @@
+# This Makefile will work only with GNU make. +# This Makefile will work only with GNU make.
+ +
@ -2458,7 +2458,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/Makefile open-iscsi-2.0-8
+ +
+COMMON_SRCS = sysdeps.o +COMMON_SRCS = sysdeps.o
+# sources shared between iscsid, iscsiadm and iscsistart +# sources shared between iscsid, iscsiadm and iscsistart
+ISCSI_LIB_SRCS = netlink.o transport.o cxgbi.o be2iscsi.o iscsi_timer.o initiator_common.o iscsi_err.o session_info.o iscsi_util.o dcb_app.o io.o auth.o discovery.o login.o log.o md5.o sha1.o iface.o idbm.o sysfs.o iscsi_sysfs.o iscsi_net_util.o iscsid_req.o +ISCSI_LIB_SRCS = netlink.o transport.o iser.o cxgbi.o be2iscsi.o iscsi_timer.o initiator_common.o iscsi_err.o session_info.o iscsi_util.o dcb_app.o io.o auth.o discovery.o login.o log.o md5.o sha1.o iface.o idbm.o sysfs.o iscsi_sysfs.o iscsi_net_util.o iscsid_req.o
+FW_PARAM_SRCS = fw_entry.o prom_lex.o prom_parse.tab.o fwparam_ppc.o fwparam_sysfs.o +FW_PARAM_SRCS = fw_entry.o prom_lex.o prom_parse.tab.o fwparam_ppc.o fwparam_sysfs.o
+ +
+# sources shared with the userspace utils, note we build these separately +# sources shared with the userspace utils, note we build these separately
@ -2504,9 +2504,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/Makefile open-iscsi-2.0-8
+ gcc $(CFLAGS) -M `ls *.c` > .depend + gcc $(CFLAGS) -M `ls *.c` > .depend
+ +
+-include .depend ../usr/.depend +-include .depend ../usr/.depend
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/pylibiscsi.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/pylibiscsi.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/pylibiscsi.c open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/pylibiscsi.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/pylibiscsi.c 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/pylibiscsi.c 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/pylibiscsi.c 2011-08-14 16:53:58.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/pylibiscsi.c 2012-03-05 23:15:31.000000000 -0600
@@ -0,0 +1,638 @@ @@ -0,0 +1,638 @@
+/* +/*
+ * iSCSI Administration library + * iSCSI Administration library
@ -3146,9 +3146,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/pylibiscsi.c open-iscsi-2
+ Py_INCREF(&PyIscsiNode_Type); + Py_INCREF(&PyIscsiNode_Type);
+ PyModule_AddObject(m, "node", (PyObject *) &PyIscsiNode_Type); + PyModule_AddObject(m, "node", (PyObject *) &PyIscsiNode_Type);
+} +}
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/setup.py open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/setup.py diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/setup.py open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/setup.py
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/setup.py 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/setup.py 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/setup.py 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/setup.py 2012-03-05 23:15:31.000000000 -0600
@@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
+from distutils.core import setup, Extension +from distutils.core import setup, Extension
+ +
@ -3159,9 +3159,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/setup.py open-iscsi-2.0-8
+ +
+setup (name = 'PyIscsi',version = '1.0', +setup (name = 'PyIscsi',version = '1.0',
+ description = 'libiscsi python bindings', ext_modules = [module1]) + description = 'libiscsi python bindings', ext_modules = [module1])
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_discovery_firmware.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_discovery_firmware.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_discovery_firmware.c open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_discovery_firmware.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_discovery_firmware.c 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_discovery_firmware.c 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_discovery_firmware.c 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_discovery_firmware.c 2012-03-05 23:15:31.000000000 -0600
@@ -0,0 +1,53 @@ @@ -0,0 +1,53 @@
+/* +/*
+ * iSCSI Administration library + * iSCSI Administration library
@ -3216,9 +3216,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_discovery_firm
+ +
+ return rc; + return rc;
+} +}
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_discovery_sendtargets.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_discovery_sendtargets.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_discovery_sendtargets.c open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_discovery_sendtargets.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_discovery_sendtargets.c 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_discovery_sendtargets.c 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_discovery_sendtargets.c 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_discovery_sendtargets.c 2012-03-05 23:15:31.000000000 -0600
@@ -0,0 +1,60 @@ @@ -0,0 +1,60 @@
+/* +/*
+ * iSCSI Administration library + * iSCSI Administration library
@ -3280,9 +3280,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_discovery_send
+ +
+ return rc; + return rc;
+} +}
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_auth.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_get_auth.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_auth.c open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_get_auth.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_auth.c 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_auth.c 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_get_auth.c 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_get_auth.c 2012-03-05 23:15:31.000000000 -0600
@@ -0,0 +1,70 @@ @@ -0,0 +1,70 @@
+/* +/*
+ * iSCSI Administration library + * iSCSI Administration library
@ -3354,9 +3354,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_auth.c ope
+ +
+ return rc; + return rc;
+} +}
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_initiator_name.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_get_initiator_name.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_initiator_name.c open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_get_initiator_name.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_initiator_name.c 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_initiator_name.c 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_get_initiator_name.c 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_get_initiator_name.c 2012-03-05 23:15:31.000000000 -0600
@@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
+/* +/*
+ * iSCSI Administration library + * iSCSI Administration library
@ -3396,9 +3396,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_initiator_
+ +
+ return 0; + return 0;
+} +}
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_network_config.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_get_network_config.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_network_config.c open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_get_network_config.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_network_config.c 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_network_config.c 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_get_network_config.c 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_get_network_config.c 2012-03-05 23:15:31.000000000 -0600
@@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
+/* +/*
+ * iSCSI Administration library + * iSCSI Administration library
@ -3445,9 +3445,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_network_co
+ +
+ return 0; + return 0;
+} +}
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_login.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_login.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_login.c open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_login.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_login.c 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_login.c 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_login.c 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_login.c 2012-03-05 23:15:31.000000000 -0600
@@ -0,0 +1,52 @@ @@ -0,0 +1,52 @@
+/* +/*
+ * iSCSI Administration library + * iSCSI Administration library
@ -3501,9 +3501,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_login.c open-i
+ +
+ return rc; + return rc;
+} +}
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_logout.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_logout.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_logout.c open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_logout.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_logout.c 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_logout.c 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_logout.c 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_logout.c 2012-03-05 23:15:31.000000000 -0600
@@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
+/* +/*
+ * iSCSI Administration library + * iSCSI Administration library
@ -3556,9 +3556,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_logout.c open-
+ +
+ return rc; + return rc;
+} +}
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_params.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_params.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_params.c open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_params.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_params.c 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_params.c 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_params.c 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_params.c 2012-03-05 23:15:31.000000000 -0600
@@ -0,0 +1,103 @@ @@ -0,0 +1,103 @@
+/* +/*
+ * iSCSI Administration library + * iSCSI Administration library
@ -3663,9 +3663,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_params.c open-
+ +
+ return rc; + return rc;
+} +}
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_set_auth.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_set_auth.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_set_auth.c open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_set_auth.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_set_auth.c 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_set_auth.c 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_set_auth.c 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_set_auth.c 2012-03-05 23:15:31.000000000 -0600
@@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
+/* +/*
+ * iSCSI Administration library + * iSCSI Administration library
@ -3725,10 +3725,10 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_set_auth.c ope
+ +
+ return rc; + return rc;
+} +}
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/Makefile open-iscsi-2.0-872-rc4-bnx2i.build/Makefile diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/Makefile open-iscsi-2.0-872-rc4-bnx2i.work/Makefile
--- open-iscsi-2.0-872-rc4-bnx2i.base/Makefile 2011-08-14 16:53:01.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i.base/Makefile 2012-03-05 23:19:56.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/Makefile 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/Makefile 2012-03-05 23:15:31.000000000 -0600
@@ -32,6 +32,7 @@ user: ; @@ -32,6 +32,7 @@ user: utils/open-isns/Makefile
$(MAKE) -C utils/fwparam_ibft $(MAKE) -C utils/fwparam_ibft
$(MAKE) -C usr $(MAKE) -C usr
$(MAKE) -C utils $(MAKE) -C utils
@ -3736,7 +3736,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/Makefile open-iscsi-2.0-872-rc4-bn
@echo @echo
@echo "Compilation complete Output file" @echo "Compilation complete Output file"
@echo "----------------------------------- ----------------" @echo "----------------------------------- ----------------"
@@ -53,6 +54,7 @@ kernel: force @@ -56,6 +57,7 @@ kernel: force
force: ; force: ;
clean: clean:
@ -3744,9 +3744,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/Makefile open-iscsi-2.0-872-rc4-bn
$(MAKE) -C utils/sysdeps clean $(MAKE) -C utils/sysdeps clean
$(MAKE) -C utils/fwparam_ibft clean $(MAKE) -C utils/fwparam_ibft clean
$(MAKE) -C utils clean $(MAKE) -C utils clean
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/discovery.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/discovery.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/discovery.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/discovery.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/discovery.c 2011-08-14 16:53:01.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i.base/usr/discovery.c 2012-03-05 23:19:56.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/discovery.c 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/discovery.c 2012-03-05 23:15:31.000000000 -0600
@@ -36,6 +36,7 @@ @@ -36,6 +36,7 @@
#include "types.h" #include "types.h"
#include "iscsi_proto.h" #include "iscsi_proto.h"
@ -3783,10 +3783,10 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/discovery.c open-iscsi-2.0-872
int discovery_fw(void *data, struct iface_rec *iface, int discovery_fw(void *data, struct iface_rec *iface,
struct list_head *rec_list) struct list_head *rec_list)
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/idbm.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.c 2011-08-14 16:53:01.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.c 2012-03-05 23:20:05.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/idbm.c 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.c 2012-03-05 23:15:31.000000000 -0600
@@ -1274,9 +1274,9 @@ int idbm_print_all_discovery(int info_le @@ -1300,9 +1300,9 @@ int idbm_print_all_discovery(int info_le
* fn should return -1 if it skipped the rec, a ISCSI_ERR error code if * fn should return -1 if it skipped the rec, a ISCSI_ERR error code if
* the operation failed or 0 if fn was run successfully. * the operation failed or 0 if fn was run successfully.
*/ */
@ -3799,9 +3799,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.c open-iscsi-2.0-872-rc4-
{ {
DIR *iface_dirfd; DIR *iface_dirfd;
struct dirent *iface_dent; struct dirent *iface_dent;
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.h open-iscsi-2.0-872-rc4-bnx2i.build/usr/idbm.h diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.h
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.h 2011-08-14 16:53:01.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.h 2012-03-05 23:20:05.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/idbm.h 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.h 2012-03-05 23:15:31.000000000 -0600
@@ -98,6 +98,9 @@ struct rec_op_data { @@ -98,6 +98,9 @@ struct rec_op_data {
node_rec_t *match_rec; node_rec_t *match_rec;
idbm_iface_op_fn *fn; idbm_iface_op_fn *fn;
@ -3812,9 +3812,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.h open-iscsi-2.0-872-rc4-
extern int idbm_for_each_portal(int *found, void *data, extern int idbm_for_each_portal(int *found, void *data,
idbm_portal_op_fn *fn, char *targetname); idbm_portal_op_fn *fn, char *targetname);
extern int idbm_for_each_node(int *found, void *data, extern int idbm_for_each_node(int *found, void *data,
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsi_ipc.h open-iscsi-2.0-872-rc4-bnx2i.build/usr/iscsi_ipc.h diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsi_ipc.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_ipc.h
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsi_ipc.h 2011-08-14 16:53:01.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsi_ipc.h 2012-03-05 23:19:56.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/iscsi_ipc.h 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_ipc.h 2012-03-05 23:15:31.000000000 -0600
@@ -136,4 +136,6 @@ struct iscsi_ipc { @@ -136,4 +136,6 @@ struct iscsi_ipc {
int (*recv_conn_state) (struct iscsi_conn *conn, uint32_t *state); int (*recv_conn_state) (struct iscsi_conn *conn, uint32_t *state);
}; };
@ -3822,9 +3822,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsi_ipc.h open-iscsi-2.0-872
+struct iscsi_ipc *ipc; +struct iscsi_ipc *ipc;
+ +
#endif /* ISCSI_IPC_H */ #endif /* ISCSI_IPC_H */
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/Makefile open-iscsi-2.0-872-rc4-bnx2i.build/usr/Makefile diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/Makefile open-iscsi-2.0-872-rc4-bnx2i.work/usr/Makefile
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/Makefile 2011-08-14 16:53:01.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i.base/usr/Makefile 2012-03-05 23:19:56.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/Makefile 2011-08-14 16:46:24.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/Makefile 2012-03-05 23:15:31.000000000 -0600
@@ -33,7 +33,7 @@ endif @@ -33,7 +33,7 @@ endif
OPTFLAGS ?= -O2 -g OPTFLAGS ?= -O2 -g
WARNFLAGS ?= -Wall -Wstrict-prototypes WARNFLAGS ?= -Wall -Wstrict-prototypes

View File

@ -5,7 +5,7 @@
* some other maintainer could merge a patch without going through us * some other maintainer could merge a patch without going through us
*/ */
-#define ISCSI_VERSION_STR "2.0-872" -#define ISCSI_VERSION_STR "2.0-872"
+#define ISCSI_VERSION_STR "2.0-872.33.el6" +#define ISCSI_VERSION_STR "2.0-872.34.el6"
#define ISCSI_VERSION_FILE "/sys/module/scsi_transport_iscsi/version" #define ISCSI_VERSION_FILE "/sys/module/scsi_transport_iscsi/version"
#endif #endif

View File

@ -1,19 +0,0 @@
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsi_uio/docs/iscsiuio.8 open-iscsi-2.0-872-rc4-bnx2i.work/iscsiuio/docs/iscsiuio.8
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/docs/iscsiuio.8 2011-01-31 19:38:19.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.work/iscsiuio/docs/iscsiuio.8 2011-01-31 19:38:44.000000000 -0600
@@ -67,6 +67,15 @@ into the background.
.TP
.BI -v
This is to print the version.
+.PP
+.TP
+.BI -p <pidfile>
+Use pidfile (default /var/run/iscsiuio.pid )
+.PP
+.TP
+.BI -h
+Display this help and exit.
+
.\"
.\" AUTHOR part

View File

@ -1,57 +0,0 @@
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsid.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsid.c
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsid.c 2011-11-01 19:15:46.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsid.c 2011-11-01 19:17:45.000000000 -0500
@@ -221,6 +221,9 @@ static int sync_session(void *data, stru
return 0;
}
+ if (!iscsi_sysfs_session_user_created(info->sid))
+ return 0;
+
memset(&rec, 0, sizeof(node_rec_t));
/*
* We might get the local ip address for software. We do not
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_sysfs.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_sysfs.c
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_sysfs.c 2011-11-01 19:15:46.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_sysfs.c 2011-11-01 19:17:45.000000000 -0500
@@ -231,6 +231,29 @@ void iscsi_sysfs_get_negotiated_session_
&conf->MaxOutstandingR2T);
}
+/*
+ * iscsi_sysfs_session_user_created - return if session was setup by userspace
+ * @sid: id of session to test
+ *
+ * Returns -1 if we could not tell due to kernel not supporting the
+ * feature. 0 is returned if kernel created it. And 1 is returned
+ * if userspace created it.
+ */
+int iscsi_sysfs_session_user_created(int sid)
+{
+ char id[NAME_SIZE];
+ pid_t pid;
+
+ snprintf(id, sizeof(id), ISCSI_SESSION_ID, sid);
+ if (sysfs_get_int(id, ISCSI_SESSION_SUBSYS, "creator", &pid))
+ return -1;
+
+ if (pid == -1)
+ return 0;
+ else
+ return 1;
+}
+
uint32_t iscsi_sysfs_get_host_no_from_sid(uint32_t sid, int *err)
{
struct sysfs_device *session_dev, *host_dev;
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_sysfs.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_sysfs.h
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_sysfs.h 2011-11-01 19:15:46.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_sysfs.h 2011-11-01 19:17:45.000000000 -0500
@@ -90,6 +90,7 @@ extern struct iscsi_transport *iscsi_sys
extern struct iscsi_transport *iscsi_sysfs_get_transport_by_sid(uint32_t sid);
extern struct iscsi_transport *iscsi_sysfs_get_transport_by_name(char *transport_name);
extern int iscsi_sysfs_session_supports_nop(int sid);
+extern int iscsi_sysfs_session_user_created(int sid);
extern struct list_head transports;

View File

@ -1,47 +0,0 @@
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/db-policy.c open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/db-policy.c
--- open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/db-policy.c 2011-09-01 20:28:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/db-policy.c 2011-09-01 20:31:39.000000000 -0500
@@ -7,8 +7,10 @@
#include <sys/stat.h>
#include <string.h>
#include <unistd.h>
+#ifdef WITH_SECURITY
#include <openssl/pem.h>
#include <openssl/err.h>
+#endif
#include "isns.h"
#include "security.h"
#include "objects.h"
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/security.h open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/security.h
--- open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/security.h 2011-09-01 20:28:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/security.h 2011-09-01 20:31:39.000000000 -0500
@@ -6,11 +6,16 @@
#ifndef ISNS_SECURITY_H
#define ISNS_SECURITY_H
-
-#include <openssl/evp.h>
#include "buffer.h"
#include "util.h"
+
+#ifdef WITH_SECURITY
+#include <openssl/evp.h>
+#else
+#define EVP_PKEY void
+#endif
+
/*
* Security context
*/
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/util.h open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/util.h
--- open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/util.h 2011-09-01 20:28:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/util.h 2011-09-01 20:31:39.000000000 -0500
@@ -9,6 +9,7 @@
#include <sys/types.h>
#include <stdint.h>
+#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <string.h> // for strdup

View File

@ -1,172 +0,0 @@
commit ac38eee2083821eb29d098227ad044c950d115e4
Author: Mike Christie <michaelc@cs.wisc.edu>
Date: Sun Aug 14 22:14:04 2011 -0500
iscsi tools: fix default iface binding setup
If a driver supports multiple ifaces only one is getting
auto created. This modifies the default iface setup code
so that it creates a iface per kernel iface or a iface per
host if kernel ifaces are not supported.
diff --git a/usr/iface.c b/usr/iface.c
index 5d5f7bf..9c70d09 100644
--- a/usr/iface.c
+++ b/usr/iface.c
@@ -424,12 +424,61 @@ int iface_get_by_net_binding(struct iface_rec *pattern,
return ISCSI_ERR_NO_OBJS_FOUND;
}
+static int iface_get_iptype(struct iface_rec *iface)
+{
+ if (strcmp(iface->bootproto, "dhcp") && !strstr(iface->ipaddress, "."))
+ return ISCSI_IFACE_TYPE_IPV6;
+ else
+ return ISCSI_IFACE_TYPE_IPV4;
+}
+
+static int iface_setup_binding_from_kern_iface(void *data,
+ struct iface_rec *kern_iface)
+{
+ struct host_info *hinfo = data;
+ struct iface_rec iface;
+
+ if (!strlen(hinfo->iface.hwaddress)) {
+ log_error("Invalid offload iSCSI host %u. Missing "
+ "hwaddress. Try upgrading %s driver.\n",
+ hinfo->host_no, hinfo->iface.transport_name);
+ return 0;
+ }
+
+ memset(&iface, 0, sizeof(struct iface_rec));
+ strcpy(iface.hwaddress, hinfo->iface.hwaddress);
+ strcpy(iface.transport_name, hinfo->iface.transport_name);
+
+ if (kern_iface) {
+ iface.iface_num = kern_iface->iface_num;
+
+ snprintf(iface.name, sizeof(iface.name), "%s.%s.%s.%u",
+ kern_iface->transport_name,
+ kern_iface->hwaddress,
+ iface_get_iptype(kern_iface) == ISCSI_IFACE_TYPE_IPV4 ?
+ "ipv4" : "ipv6", kern_iface->iface_num);
+ } else {
+ snprintf(iface.name, sizeof(iface.name), "%s.%s",
+ hinfo->iface.transport_name, hinfo->iface.hwaddress);
+ }
+
+ if (iface_conf_read(&iface)) {
+ /* not found so create it */
+ if (iface_conf_write(&iface)) {
+ log_error("Could not create default iface conf %s.",
+ iface.name);
+ /* fall through - will not be persistent */
+ }
+ }
+
+ return 0;
+}
+
static int __iface_setup_host_bindings(void *data, struct host_info *hinfo)
{
struct iface_rec *def_iface;
- struct iface_rec iface;
struct iscsi_transport *t;
- int i = 0;
+ int i = 0, nr_found;
t = iscsi_sysfs_get_transport_by_hba(hinfo->host_no);
if (!t)
@@ -441,26 +490,12 @@ static int __iface_setup_host_bindings(void *data, struct host_info *hinfo)
return 0;
}
- if (iface_get_by_net_binding(&hinfo->iface, &iface) ==
- ISCSI_ERR_NO_OBJS_FOUND) {
- /* Must be a new port */
- if (!strlen(hinfo->iface.hwaddress)) {
- log_error("Invalid offload iSCSI host %u. Missing "
- "hwaddress. Try upgrading %s driver.\n",
- hinfo->host_no, t->name);
- return 0;
- }
-
- memset(&iface, 0, sizeof(struct iface_rec));
- strcpy(iface.hwaddress, hinfo->iface.hwaddress);
- strcpy(iface.transport_name, hinfo->iface.transport_name);
- snprintf(iface.name, sizeof(iface.name), "%s.%s",
- t->name, hinfo->iface.hwaddress);
- if (iface_conf_write(&iface))
- log_error("Could not create default iface conf %s.",
- iface.name);
- /* fall through - will not be persistent */
- }
+ nr_found = 0;
+ iscsi_sysfs_for_each_iface_on_host(hinfo, hinfo->host_no,
+ &nr_found,
+ iface_setup_binding_from_kern_iface);
+ if (!nr_found)
+ iface_setup_binding_from_kern_iface(hinfo, NULL);
return 0;
}
@@ -843,7 +878,6 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
memset(iface->name, 0, sizeof(iface->name));
snprintf(iface->name, sizeof(iface->name), "%s.%s",
iface->transport_name, context->mac);
-
strlcpy(iface->hwaddress, context->mac,
sizeof(iface->hwaddress));
strlcpy(iface->ipaddress, context->ipaddr,
@@ -921,9 +955,7 @@ static int __iface_get_param_count(void *data, struct iface_rec *iface)
if (strcmp(iface_params->primary->hwaddress, iface->hwaddress))
return 0;
- if (strcmp(iface->bootproto, "dhcp") && !strstr(iface->ipaddress, "."))
- iptype = ISCSI_IFACE_TYPE_IPV6;
-
+ iptype = iface_get_iptype(iface);
if (iptype == ISCSI_IFACE_TYPE_IPV4) {
if (strcmp(iface->state, "disable")) {
@@ -1466,12 +1498,10 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface)
if (strcmp(net_config->primary->hwaddress, iface->hwaddress))
return 0;
- if (strcmp(iface->bootproto, "dhcp") && !strstr(iface->ipaddress, "."))
- iptype = ISCSI_IFACE_TYPE_IPV6;
-
/* start at 2, because 0 is for nlmsghdr and 1 for event */
iov = net_config->iovs + 2;
+ iptype = iface_get_iptype(iface);
if (iptype == ISCSI_IFACE_TYPE_IPV4) {
if (!strcmp(iface->state, "disable")) {
if (!iface_fill_net_state(&iov[net_config->count],
diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c
index 995549e..961cefd 100644
--- a/usr/iscsi_sysfs.c
+++ b/usr/iscsi_sysfs.c
@@ -425,9 +425,10 @@ uint32_t iscsi_sysfs_get_host_no_from_hwinfo(struct iface_rec *iface, int *rc)
static int iscsi_sysfs_read_iface(struct iface_rec *iface, int host_no,
char *session, char *iface_kern_id)
{
+ uint32_t tmp_host_no, iface_num;
char host_id[NAME_SIZE];
struct iscsi_transport *t;
- int ret;
+ int ret, iface_type;
t = iscsi_sysfs_get_transport_by_hba(host_no);
if (!t)
@@ -582,6 +583,10 @@ static int iscsi_sysfs_read_iface(struct iface_rec *iface, int host_no,
&iface->vlan_id);
sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan_priority",
&iface->vlan_priority);
+
+ if (sscanf(iface_kern_id, "ipv%d-iface-%u-%u", &iface_type,
+ &tmp_host_no, &iface_num) == 3)
+ iface->iface_num = iface_num;
done:
if (ret)
return ISCSI_ERR_SYSFS_LOOKUP;

View File

@ -1,13 +0,0 @@
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/initiator.c
--- open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c 2011-09-01 20:28:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/initiator.c 2011-09-01 20:29:49.000000000 -0500
@@ -484,8 +484,7 @@ cleanup:
if (session->id != -1) {
log_debug(2, "kdestroy session %u", session->id);
session->r_stage = R_STAGE_SESSION_DESTOYED;
- err = ipc->destroy_session(session->t->handle, session->id);
- if (err) {
+ if (ipc->destroy_session(session->t->handle, session->id)) {
log_error("can not safely destroy session %d",
session->id);
return ISCSI_ERR_INTERNAL;

View File

@ -1,12 +0,0 @@
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/netlink.c open-iscsi-2.0-872-rc4-bnx2i.test/usr/netlink.c
--- open-iscsi-2.0-872-rc4-bnx2i/usr/netlink.c 2011-09-20 18:01:34.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.test/usr/netlink.c 2011-09-20 18:01:54.000000000 -0500
@@ -185,7 +185,7 @@ kwritev(enum iscsi_uevent_e type, struct
for (i = 1; i < count; i++)
datalen += iovp[i].iov_len;
- nlh->nlmsg_len = NLMSG_ALIGN(datalen);
+ nlh->nlmsg_len = datalen + sizeof(*nlh);
nlh->nlmsg_pid = getpid();
nlh->nlmsg_flags = 0;
nlh->nlmsg_type = type;

View File

@ -1,12 +0,0 @@
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/README open-iscsi-2.0-872-rc4-bnx2i.test/README
--- open-iscsi-2.0-872-rc4-bnx2i/README 2012-02-26 03:02:19.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.test/README 2012-02-26 03:03:07.000000000 -0600
@@ -161,7 +161,7 @@ term node to refer to a portal on a targ
require that --targetname and --portal argument be used when in node mode.
For session mode, a session id (sid) is used. The sid of a session can be
-found by running iscsiadm -m session -i. The session id is not currently
+found by running iscsiadm -m session -P 1. The session id is not currently
persistent and is partially determined by when the session is setup.
Note that some of the iSCSI Node and iSCSI Discovery operations

View File

@ -1,207 +0,0 @@
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/doc/iscsistart.8 open-iscsi-2.0-872-rc4-bnx2i.test/doc/iscsistart.8
--- open-iscsi-2.0-872-rc4-bnx2i/doc/iscsistart.8 2012-02-26 05:07:41.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.test/doc/iscsistart.8 2012-02-26 03:02:23.000000000 -0600
@@ -51,6 +51,10 @@ Bring up the network as specified by iBF
.BI [-f|--fwparam_print]
Print the iBFT or OF info to STDOUT
.TP
+.BI [-P|--param=]\fINAME=VALUE\fP
+Set the parameter with the name NAME to VALUE. NAME is one of the settings
+in the node record or iscsid.conf. Multiple params can be passed in.
+.TP
.BI [-h|--help]
Display this help and exit
.TP
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.c open-iscsi-2.0-872-rc4-bnx2i.test/usr/idbm.c
--- open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.c 2012-02-26 05:07:41.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.test/usr/idbm.c 2012-02-26 03:02:23.000000000 -0600
@@ -2298,6 +2298,38 @@ idbm_slp_defaults(struct iscsi_slp_confi
sizeof(struct iscsi_slp_config));
}
+int idbm_parse_param(char *param, struct node_rec *rec)
+{
+ char *name, *value;
+ recinfo_t *info;
+ int rc;
+
+ name = param;
+
+ value = strchr(param, '=');
+ if (!value) {
+ log_error("Invalid --param %s. Missing setting.\n", param);
+ return ISCSI_ERR_INVAL;
+ }
+ *value = '\0';
+ value++;
+
+ info = idbm_recinfo_alloc(MAX_KEYS);
+ if (!info) {
+ log_error("Could not allocate memory to setup params.\n");
+ return ISCSI_ERR_NOMEM;
+ }
+
+ idbm_recinfo_node(rec, info);
+
+ rc = idbm_rec_update_param(info, name, value, 0);
+ if (rc)
+ log_error("Could not set %s to %s. Check that %s is a "
+ "valid parameter.\n", name, value, name);
+ free(info);
+ return rc;
+}
+
int idbm_node_set_param(void *data, node_rec_t *rec)
{
struct db_set_param *param = data;
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.h open-iscsi-2.0-872-rc4-bnx2i.test/usr/idbm.h
--- open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.h 2012-02-26 05:07:41.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.test/usr/idbm.h 2012-02-26 03:02:23.000000000 -0600
@@ -145,6 +145,7 @@ extern int idbm_discovery_read(discovery
extern int idbm_rec_read(node_rec_t *out_rec, char *target_name,
int tpgt, char *addr, int port,
struct iface_rec *iface);
+extern int idbm_parse_param(char *param, struct node_rec *rec);
extern int idbm_node_set_param(void *data, node_rec_t *rec);
extern int idbm_discovery_set_param(void *data, discovery_rec_t *rec);
extern void idbm_node_setup_defaults(node_rec_t *rec);
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsistart.c open-iscsi-2.0-872-rc4-bnx2i.test/usr/iscsistart.c
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsistart.c 2012-02-26 05:07:41.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.test/usr/iscsistart.c 2012-02-26 05:07:28.000000000 -0600
@@ -56,6 +56,12 @@ struct iscsi_daemon_config *dconfig = &d
static node_rec_t config_rec;
static LIST_HEAD(targets);
+static LIST_HEAD(user_params);
+
+struct user_param {
+ struct list_head list;
+ char *param_string;
+};
static char program_name[] = "iscsistart";
@@ -76,6 +82,7 @@ static struct option const long_options[
{"fwparam_connect", no_argument, NULL, 'b'},
{"fwparam_network", no_argument, NULL, 'N'},
{"fwparam_print", no_argument, NULL, 'f'},
+ {"param", required_argument, NULL, 'P'},
{"help", no_argument, NULL, 'h'},
{"version", no_argument, NULL, 'v'},
{NULL, 0, NULL, 0},
@@ -103,6 +110,7 @@ Open-iSCSI initiator.\n\
-b, --fwparam_connect create a session to the target using iBFT or OF\n\
-N, --fwparam_network bring up the network as specified by iBFT or OF\n\
-f, --fwparam_print print the iBFT or OF info to STDOUT \n\
+ -P, --param=NAME=VALUE set parameter with the name NAME to VALUE\n\
-h, --help display this help and exit\n\
-v, --version display version and exit\n\
");
@@ -126,20 +134,69 @@ static int stop_event_loop(void)
return rc;
}
+static int apply_params(struct node_rec *rec)
+{
+ struct user_param *param;
+ int rc;
+
+ /* Must init this so we can check if user overrode them */
+ rec->session.initial_login_retry_max = -1;
+ rec->conn[0].timeo.noop_out_interval = -1;
+ rec->conn[0].timeo.noop_out_timeout = -1;
+
+ list_for_each_entry(param, &user_params, list) {
+ rc = idbm_parse_param(param->param_string, rec);
+ if (rc)
+ return rc;
+ }
+
+ /*
+ * For root boot we could not change this in older versions so
+ * if user did not override then use the defaults.
+ *
+ * Increase to account for boot using static setup.
+ */
+ if (rec->session.initial_login_retry_max == -1)
+ rec->session.initial_login_retry_max = 30;
+ /* we used to not be able to answer so turn off */
+ if (rec->conn[0].timeo.noop_out_interval == -1)
+ rec->conn[0].timeo.noop_out_interval = 0;
+ if (rec->conn[0].timeo.noop_out_timeout == -1)
+ rec->conn[0].timeo.noop_out_timeout = 0;
+
+ return 0;
+}
+
+static int alloc_param(char *param_string)
+{
+ struct user_param *param;
+
+ param = calloc(1, sizeof(*param));
+ if (!param) {
+ printf("Could not allocate for param.\n");
+ return ISCSI_ERR_NOMEM;
+ }
+
+ INIT_LIST_HEAD(&param->list);
+ param->param_string = strdup(param_string);
+ if (!param->param_string) {
+ printf("Could not allocate for param.\n");
+ free(param);
+ return ISCSI_ERR_NOMEM;
+ }
+ list_add(&param->list, &user_params);
+ return 0;
+}
static int login_session(struct node_rec *rec)
{
iscsiadm_req_t req;
iscsiadm_rsp_t rsp;
int rc, retries = 0;
- /*
- * For root boot we cannot change this so increase to account
- * for boot using static setup.
- */
- rec->session.initial_login_retry_max = 30;
- /* we cannot answer so turn off */
- rec->conn[0].timeo.noop_out_interval = 0;
- rec->conn[0].timeo.noop_out_timeout = 0;
+
+ rc = apply_params(rec);
+ if (rc)
+ exit(rc);
printf("%s: Logging into %s %s:%d,%d\n", program_name, rec->name,
rec->conn[0].address, rec->conn[0].port,
@@ -241,7 +298,7 @@ int main(int argc, char *argv[])
struct boot_context *context, boot_context;
struct sigaction sa_old;
struct sigaction sa_new;
- int control_fd, mgmt_ipc_fd;
+ int control_fd, mgmt_ipc_fd, err;
pid_t pid;
idbm_node_setup_defaults(&config_rec);
@@ -262,7 +319,7 @@ int main(int argc, char *argv[])
if (iscsi_sysfs_check_class_version())
exit(ISCSI_ERR_SYSFS_LOOKUP);
- while ((ch = getopt_long(argc, argv, "i:t:g:a:p:d:u:w:U:W:bNfvh",
+ while ((ch = getopt_long(argc, argv, "P:i:t:g:a:p:d:u:w:U:W:bNfvh",
long_options, &longindex)) >= 0) {
switch (ch) {
case 'i':
@@ -341,6 +398,11 @@ int main(int argc, char *argv[])
fw_free_targets(&targets);
exit(0);
+ case 'P':
+ err = alloc_param(optarg);
+ if (err)
+ exit(err);
+ break;
case 'v':
printf("%s version %s\n", program_name,
ISCSI_VERSION_STR);

View File

@ -1,471 +0,0 @@
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/include/iscsi_if.h open-iscsi-2.0-872-rc4-bnx2i.work/include/iscsi_if.h
--- open-iscsi-2.0-872-rc4-bnx2i/include/iscsi_if.h 2011-10-10 13:57:38.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.work/include/iscsi_if.h 2011-10-11 00:40:49.000000000 -0500
@@ -320,10 +320,11 @@ enum iscsi_net_param {
ISCSI_NET_PARAM_VLAN_ID = 13,
ISCSI_NET_PARAM_VLAN_PRIORITY = 14,
ISCSI_NET_PARAM_VLAN_ENABLED = 15,
- ISCSI_NET_PARAM_IFACE_TYPE = 16,
- ISCSI_NET_PARAM_IFACE_NAME = 17,
- ISCSI_NET_PARAM_MTU = 18,
- ISCSI_NET_PARAM_PORT = 19,
+ ISCSI_NET_PARAM_VLAN_TAG = 16,
+ ISCSI_NET_PARAM_IFACE_TYPE = 17,
+ ISCSI_NET_PARAM_IFACE_NAME = 18,
+ ISCSI_NET_PARAM_MTU = 19,
+ ISCSI_NET_PARAM_PORT = 20,
};
enum iscsi_conn_state {
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/host.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/host.c
--- open-iscsi-2.0-872-rc4-bnx2i/usr/host.c 2011-10-10 13:57:38.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/host.c 2011-10-11 00:41:01.000000000 -0500
@@ -132,22 +132,67 @@ static int print_host_iface(void *data,
printf("%sIPaddress: %s\n", prefix, UNKNOWN_VALUE);
else if (strchr(iface->ipaddress, '.')) {
printf("%sIPaddress: %s\n", prefix, iface->ipaddress);
- printf("%sGateway: %s\n", prefix, iface->gateway);
- printf("%sSubnet: %s\n", prefix, iface->subnet_mask);
- printf("%sBootProto: %s\n", prefix, iface->bootproto);
+
+ if (!strlen(iface->gateway))
+ printf("%sGateway: %s\n", prefix, UNKNOWN_VALUE);
+ else
+ printf("%sGateway: %s\n", prefix, iface->gateway);
+ if (!strlen(iface->subnet_mask))
+ printf("%sSubnet: %s\n", prefix, UNKNOWN_VALUE);
+ else
+ printf("%sSubnet: %s\n", prefix, iface->subnet_mask);
+ if (!strlen(iface->bootproto))
+ printf("%sBootProto: %s\n", prefix, UNKNOWN_VALUE);
+ else
+ printf("%sBootProto: %s\n", prefix, iface->bootproto);
} else {
printf("%sIPaddress: [%s]\n", prefix, iface->ipaddress);
- printf("%sIPaddress Autocfg: %s\n", prefix, iface->ipv6_autocfg);
- printf("%sLink Local Address: [%s]\n", prefix,
- iface->ipv6_linklocal);
- printf("%sLink Local Autocfg: %s\n", prefix,
- iface->linklocal_autocfg);
- printf("%sRouter Address: [%s]\n", prefix, iface->ipv6_router);
+
+ if (!strlen(iface->ipv6_autocfg))
+ printf("%sIPaddress Autocfg: %s\n", prefix,
+ UNKNOWN_VALUE);
+ else
+ printf("%sIPaddress Autocfg: %s\n", prefix,
+ iface->ipv6_autocfg);
+ if (!strlen(iface->ipv6_linklocal))
+ printf("%sLink Local Address: %s\n", prefix,
+ UNKNOWN_VALUE);
+ else
+ printf("%sLink Local Address: [%s]\n", prefix,
+ iface->ipv6_linklocal);
+ if (!strlen(iface->linklocal_autocfg))
+ printf("%sLink Local Autocfg: %s\n", prefix,
+ UNKNOWN_VALUE);
+ else
+ printf("%sLink Local Autocfg: %s\n", prefix,
+ iface->linklocal_autocfg);
+ if (!strlen(iface->ipv6_router))
+ printf("%sRouter Address: %s\n", prefix,
+ UNKNOWN_VALUE);
+ else
+ printf("%sRouter Address: [%s]\n", prefix,
+ iface->ipv6_router);
}
- printf("%sMTU: %u\n", prefix, iface->mtu);
- printf("%svlan ID: %u\n", prefix, iface->vlan_id);
- printf("%svlan priority: %u\n", prefix, iface->vlan_priority);
+ if (!iface->port)
+ printf("%sPort: %s\n", prefix, UNKNOWN_VALUE);
+ else
+ printf("%sPort: %u\n", prefix, iface->port);
+
+ if (!iface->mtu)
+ printf("%sMTU: %s\n", prefix, UNKNOWN_VALUE);
+ else
+ printf("%sMTU: %u\n", prefix, iface->mtu);
+
+ if (iface->vlan_id == UINT16_MAX)
+ printf("%sVLAN ID: %s\n", prefix, UNKNOWN_VALUE);
+ else
+ printf("%sVLAN ID: %u\n", prefix, iface->vlan_id);
+
+ if (iface->vlan_priority == UINT8_MAX)
+ printf("%sVLAN priority: %s\n", prefix, UNKNOWN_VALUE);
+ else
+ printf("%sVLAN priority: %u\n", prefix, iface->vlan_priority);
return 0;
}
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iface.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/iface.c
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iface.c 2011-10-10 13:57:38.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iface.c 2011-10-11 00:40:49.000000000 -0500
@@ -41,6 +41,7 @@
#include "fw_context.h"
#include "sysdeps.h"
#include "iscsi_err.h"
+#include "iscsi_netlink.h"
/*
* Default ifaces for use with transports that do not bind to hardware
@@ -1141,14 +1142,16 @@ static int iface_fill_port(struct iovec
int len;
struct iscsi_iface_param_info *net_param;
uint16_t port = 3260;
+ struct nlattr *attr;
- len = sizeof(struct iscsi_iface_param_info) + 2;
- iov->iov_base = calloc(len, sizeof(char));
- if (!(iov->iov_base))
+ len = sizeof(struct iscsi_iface_param_info) + sizeof(port);
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_PORT, len);
+ if (!iov->iov_base)
return 1;
+ attr = iov->iov_base;
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
- iov->iov_len = len;
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
net_param->param = ISCSI_NET_PARAM_PORT;
net_param->iface_type = iface_type;
net_param->iface_num = iface->iface_num;
@@ -1166,14 +1169,16 @@ static int iface_fill_mtu(struct iovec *
int len;
struct iscsi_iface_param_info *net_param;
uint16_t mtu = 0;
+ struct nlattr *attr;
len = sizeof(struct iscsi_iface_param_info) + 2;
- iov->iov_base = calloc(len, sizeof(char));
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_MTU, len);
if (!(iov->iov_base))
return 1;
+ attr = iov->iov_base;
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
- iov->iov_len = len;
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
net_param->param = ISCSI_NET_PARAM_MTU;
net_param->iface_type = iface_type;
net_param->iface_num = iface->iface_num;
@@ -1191,15 +1196,17 @@ static int iface_fill_vlan_id(struct iov
int len;
struct iscsi_iface_param_info *net_param;
uint16_t vlan = 0;
+ struct nlattr *attr;
len = sizeof(struct iscsi_iface_param_info) + 2;
- iov->iov_base = calloc(len, sizeof(char));
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_VLAN_TAG, len);
if (!(iov->iov_base))
return 1;
- iov->iov_len = len;
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
- net_param->param = ISCSI_NET_PARAM_VLAN_ID;
+ attr = iov->iov_base;
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
+ net_param->param = ISCSI_NET_PARAM_VLAN_TAG;
net_param->iface_type = iface_type;
net_param->iface_num = iface->iface_num;
net_param->param_type = ISCSI_NET_PARAM;
@@ -1222,14 +1229,16 @@ static int iface_fill_vlan_state(struct
{
int len;
struct iscsi_iface_param_info *net_param;
+ struct nlattr *attr;
len = sizeof(struct iscsi_iface_param_info) + 1;
- iov->iov_base = calloc(len, sizeof(char));
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_VLAN_ENABLED, len);
if (!(iov->iov_base))
return 1;
- iov->iov_len = len;
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
+ attr = iov->iov_base;
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
net_param->param = ISCSI_NET_PARAM_VLAN_ENABLED;
net_param->iface_type = iface_type;
net_param->iface_num = iface->iface_num;
@@ -1248,14 +1257,16 @@ static int iface_fill_net_state(struct i
{
int len;
struct iscsi_iface_param_info *net_param;
+ struct nlattr *attr;
len = sizeof(struct iscsi_iface_param_info) + 1;
- iov->iov_base = calloc(len, sizeof(char));
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IFACE_ENABLE, len);
if (!(iov->iov_base))
return 1;
- iov->iov_len = len;
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
+ attr = iov->iov_base;
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
net_param->param = ISCSI_NET_PARAM_IFACE_ENABLE;
net_param->iface_type = iface_type;
net_param->iface_num = iface->iface_num;
@@ -1273,14 +1284,16 @@ static int iface_fill_net_bootproto(stru
{
int len;
struct iscsi_iface_param_info *net_param;
+ struct nlattr *attr;
len = sizeof(struct iscsi_iface_param_info) + 1;
- iov->iov_base = calloc(len, sizeof(char));
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IPV4_BOOTPROTO, len);
if (!(iov->iov_base))
return 1;
- iov->iov_len = len;
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
+ attr = iov->iov_base;
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
net_param->param = ISCSI_NET_PARAM_IPV4_BOOTPROTO;
net_param->iface_type = ISCSI_IFACE_TYPE_IPV4;
net_param->iface_num = iface->iface_num;
@@ -1298,14 +1311,16 @@ static int iface_fill_net_autocfg(struct
{
int len;
struct iscsi_iface_param_info *net_param;
+ struct nlattr *attr;
len = sizeof(struct iscsi_iface_param_info) + 1;
- iov->iov_base = calloc(len, sizeof(char));
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG, len);
if (!(iov->iov_base))
return 1;
- iov->iov_len = len;
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
+ attr = iov->iov_base;
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
net_param->param = ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG;
net_param->iface_type = ISCSI_IFACE_TYPE_IPV6;
net_param->param_type = ISCSI_NET_PARAM;
@@ -1327,14 +1342,17 @@ static int iface_fill_linklocal_autocfg(
{
int len;
struct iscsi_iface_param_info *net_param;
+ struct nlattr *attr;
len = sizeof(struct iscsi_iface_param_info) + 1;
- iov->iov_base = calloc(len, sizeof(char));
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG,
+ len);
if (!(iov->iov_base))
return 1;
- iov->iov_len = len;
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
+ attr = iov->iov_base;
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
net_param->param = ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG;
net_param->iface_type = ISCSI_IFACE_TYPE_IPV6;
net_param->param_type = ISCSI_NET_PARAM;
@@ -1353,14 +1371,17 @@ static int iface_fill_router_autocfg(str
{
int len;
struct iscsi_iface_param_info *net_param;
+ struct nlattr *attr;
len = sizeof(struct iscsi_iface_param_info) + 1;
- iov->iov_base = calloc(len, sizeof(char));
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IPV6_ROUTER_AUTOCFG,
+ len);
if (!(iov->iov_base))
return 1;
- iov->iov_len = len;
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
+ attr = iov->iov_base;
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
net_param->param = ISCSI_NET_PARAM_IPV6_ROUTER_AUTOCFG;
net_param->iface_type = ISCSI_IFACE_TYPE_IPV6;
net_param->param_type = ISCSI_NET_PARAM;
@@ -1381,14 +1402,16 @@ static int iface_fill_net_ipv4_addr(stru
int rc = 1;
int len;
struct iscsi_iface_param_info *net_param;
+ struct nlattr *attr;
len = sizeof(struct iscsi_iface_param_info) + 4;
- iov->iov_base = calloc(len, sizeof(char));
+ iov->iov_base = iscsi_nla_alloc(param, len);
if (!(iov->iov_base))
return 1;
- iov->iov_len = len;
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
+ attr = iov->iov_base;
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
net_param->param = param;
net_param->iface_type = ISCSI_IFACE_TYPE_IPV4;
net_param->iface_num = iface->iface_num;
@@ -1435,14 +1458,16 @@ static int iface_fill_net_ipv6_addr(stru
int rc;
int len;
struct iscsi_iface_param_info *net_param;
+ struct nlattr *attr;
len = sizeof(struct iscsi_iface_param_info) + 16;
- iov->iov_base = calloc(len, sizeof(char));
+ iov->iov_base = iscsi_nla_alloc(param, len);
if (!(iov->iov_base))
return 1;
- iov->iov_len = len;
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
+ attr = iov->iov_base;
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
net_param->param = param;
net_param->iface_type = ISCSI_IFACE_TYPE_IPV6;
net_param->iface_num = iface->iface_num;
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator.c
--- open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c 2011-10-10 13:57:38.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator.c 2011-10-11 00:39:57.000000000 -0500
@@ -1682,9 +1682,10 @@ static void session_conn_process_login(v
session->nrec.conn[conn->id].address,
session->nrec.conn[conn->id].port,
session->nrec.iface.name);
- } else
+ } else {
session->notify_qtask = NULL;
-
+ mgmt_ipc_write_rsp(c->qtask, ISCSI_SUCCESS);
+ }
/*
* reset ERL=0 reopen counter
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_netlink.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_netlink.h
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_netlink.h 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_netlink.h 2011-10-11 00:40:34.000000000 -0500
@@ -0,0 +1,33 @@
+/*
+ * iSCSI Netlink attr helpers
+ *
+ * Copyright (C) 2011 Red Hat, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * See the file COPYING included with this distribution for more details.
+ */
+
+#ifndef ISCSI_NLA_H
+#define ISCSI_NLA_H
+
+#include <linux/netlink.h>
+
+struct iovec;
+
+#define ISCSI_NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr)))
+#define ISCSI_NLA_DATA(nla) ((void *)((char*)(nla) + ISCSI_NLA_HDRLEN))
+#define ISCSI_NLA_LEN(len) ((len) + NLA_ALIGN(ISCSI_NLA_HDRLEN))
+#define ISCSI_NLA_TOTAL_LEN(len) (NLA_ALIGN(ISCSI_NLA_LEN(len)))
+
+extern struct nlattr *iscsi_nla_alloc(uint16_t type, uint16_t len);
+
+#endif
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_sysfs.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_sysfs.c
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_sysfs.c 2011-10-10 13:57:38.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_sysfs.c 2011-10-11 00:41:01.000000000 -0500
@@ -561,28 +561,28 @@ static int iscsi_sysfs_read_iface(struct
"link_local_addr", iface->ipv6_linklocal,
sizeof(iface->ipv6_linklocal));
- if (sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
- "linklocal_autocfg",
- iface->linklocal_autocfg,
- sizeof(iface->linklocal_autocfg))) {
- /* misspelled in some test kernels */
- sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
- "link_local_autocfg",
- iface->linklocal_autocfg,
- sizeof(iface->linklocal_autocfg));
- }
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
+ "link_local_autocfg", iface->linklocal_autocfg,
+ sizeof(iface->linklocal_autocfg));
sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "router_addr",
iface->ipv6_router,
sizeof(iface->ipv6_router));
}
- sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "mtu",
- &iface->mtu);
- sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan",
- &iface->vlan_id);
- sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan_priority",
- &iface->vlan_priority);
+ if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "port",
+ &iface->port))
+ iface->port = 0;
+ if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "mtu",
+ &iface->mtu))
+ iface->mtu = 0;
+ if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan_id",
+ &iface->vlan_id))
+ iface->vlan_id = UINT16_MAX;
+
+ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan_priority",
+ &iface->vlan_priority))
+ iface->vlan_priority = UINT8_MAX;
if (sscanf(iface_kern_id, "ipv%d-iface-%u-%u", &iface_type,
&tmp_host_no, &iface_num) == 3)
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/netlink.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/netlink.c
--- open-iscsi-2.0-872-rc4-bnx2i/usr/netlink.c 2011-10-10 13:57:38.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/netlink.c 2011-10-11 00:40:34.000000000 -0500
@@ -38,6 +38,7 @@
#include "initiator.h"
#include "iscsi_sysfs.h"
#include "transport.h"
+#include "iscsi_netlink.h"
static int ctrl_fd;
static struct sockaddr_nl src_addr, dest_addr;
@@ -63,6 +64,19 @@ static int ctldev_handle(void);
#define NLM_SETPARAM_DEFAULT_MAX (NI_MAXHOST + 1 + sizeof(struct iscsi_uevent))
+struct nlattr *iscsi_nla_alloc(uint16_t type, uint16_t len)
+{
+ struct nlattr *attr;
+
+ attr = calloc(1, ISCSI_NLA_TOTAL_LEN(len));
+ if (!attr)
+ return NULL;
+
+ attr->nla_len = ISCSI_NLA_LEN(len);
+ attr->nla_type = type;
+ return attr;
+}
+
static int
kread(char *data, int count)
{

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +0,0 @@
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-bnx2i.workd/usr/initiator.c
--- open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c 2011-10-28 01:56:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.workd/usr/initiator.c 2011-10-28 01:57:42.000000000 -0500
@@ -1523,9 +1523,15 @@ static void setup_offload_login_phase(is
conn->state = ISCSI_CONN_STATE_IN_LOGIN;
if (ipc->start_conn(session->t->handle, session->id, conn->id,
&rc) || rc) {
- log_error("can't start connection %d:%d retcode %d (%d)",
- session->id, conn->id, rc, errno);
- iscsi_login_eh(conn, c->qtask, ISCSI_ERR_INTERNAL);
+ if (rc == -EEXIST) {
+ log_error("Session already exists.");
+ session_conn_shutdown(conn, c->qtask,
+ ISCSI_ERR_SESS_EXISTS);
+ } else {
+ log_error("can't start connection %d:%d retcode (%d)",
+ session->id, conn->id, rc);
+ iscsi_login_eh(conn, c->qtask, ISCSI_ERR_INTERNAL);
+ }
return;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,371 +0,0 @@
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/configure open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/configure
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/configure 2011-09-01 20:28:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/configure 2011-09-01 20:33:58.000000000 -0500
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for iscsiuio 0.7.0.12.
+# Generated by GNU Autoconf 2.59 for iscsiuio 0.7.0.14.
#
# Report bugs to <eddie.wai@broadcom.com>.
#
@@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='iscsiuio'
PACKAGE_TARNAME='iscsiuio'
-PACKAGE_VERSION='0.7.0.12'
-PACKAGE_STRING='iscsiuio 0.7.0.12'
+PACKAGE_VERSION='0.7.0.14'
+PACKAGE_STRING='iscsiuio 0.7.0.14'
PACKAGE_BUGREPORT='eddie.wai@broadcom.com'
# Factoring default headers for most tests.
@@ -954,7 +954,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures iscsiuio 0.7.0.12 to adapt to many kinds of systems.
+\`configure' configures iscsiuio 0.7.0.14 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1020,7 +1020,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of iscsiuio 0.7.0.12:";;
+ short | recursive ) echo "Configuration of iscsiuio 0.7.0.14:";;
esac
cat <<\_ACEOF
@@ -1161,7 +1161,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-iscsiuio configure 0.7.0.12
+iscsiuio configure 0.7.0.14
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1175,7 +1175,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by iscsiuio $as_me 0.7.0.12, which was
+It was created by iscsiuio $as_me 0.7.0.14, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -21726,7 +21726,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by iscsiuio $as_me 0.7.0.12, which was
+This file was extended by iscsiuio $as_me 0.7.0.14, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21789,7 +21789,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-iscsiuio config.status 0.7.0.12
+iscsiuio config.status 0.7.0.14
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/configure.ac open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/configure.ac
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/configure.ac 2011-09-01 20:28:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/configure.ac 2011-09-01 20:33:58.000000000 -0500
@@ -11,9 +11,9 @@ dnl Maintained by: Eddie Wai (eddie.wai@
dnl
PACKAGE=iscsiuio
-VERSION=0.7.0.12
+VERSION=0.7.0.14
-AC_INIT(iscsiuio, 0.7.0.12, eddie.wai@broadcom.com)
+AC_INIT(iscsiuio, 0.7.0.14, eddie.wai@broadcom.com)
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AC_CONFIG_HEADER(config.h)
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/docs/iscsiuio.8 open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/docs/iscsiuio.8
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/docs/iscsiuio.8 2011-09-01 20:28:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/docs/iscsiuio.8 2011-09-01 20:33:58.000000000 -0500
@@ -3,9 +3,9 @@
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation.
.\"
-.\" bnx2.4,v 0.7.0.12
+.\" bnx2.4,v 0.7.0.14
.\"
-.TH iscsiuio 8 "08/04/2011" "Broadcom Corporation"
+.TH iscsiuio 8 "08/23/2011" "Broadcom Corporation"
.\"
.\" NAME part
.\"
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/include/uip_mgmt_ipc.h open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/include/uip_mgmt_ipc.h
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/include/uip_mgmt_ipc.h 2011-09-01 20:28:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/include/uip_mgmt_ipc.h 2011-09-01 20:33:47.000000000 -0500
@@ -50,11 +50,11 @@ typedef struct iscsid_uip_broadcast {
typedef enum iscsid_uip_mgmt_ipc_err {
ISCSID_UIP_MGMT_IPC_OK = 0,
- ISCISD_UIP_MGMT_IPC_ERR = 1,
- ISCISD_UIP_MGMT_IPC_ERR_NOT_FOUND = 2,
- ISCISD_UIP_MGMT_IPC_ERR_NOMEM = 3,
- ISCISD_UIP_MGMT_IPC_DEVICE_UP = 4,
- ISCISD_UIP_MGMT_IPC_DEVICE_INITIALIZING = 5,
+ ISCSID_UIP_MGMT_IPC_ERR = 1,
+ ISCSID_UIP_MGMT_IPC_ERR_NOT_FOUND = 2,
+ ISCSID_UIP_MGMT_IPC_ERR_NOMEM = 3,
+ ISCSID_UIP_MGMT_IPC_DEVICE_UP = 4,
+ ISCSID_UIP_MGMT_IPC_DEVICE_INITIALIZING = 5,
} iscsid_uip_mgmt_ipc_err_e;
/* IPC Response */
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/README open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/README
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/README 2011-09-01 20:28:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/README 2011-09-01 20:33:58.000000000 -0500
@@ -1,6 +1,6 @@
-Broadcom iSCSI Userspace Tools
-Version 0.7.0.12
-Aug 04, 2011
+iscsiuio Userspace Tools
+Version 0.7.0.14
+Aug 23, 2011
------------------------------------------------------
This tools is to be used in conjunction with the Broadcom NetXtreme II Linux
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/RELEASE.TXT open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/RELEASE.TXT
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/RELEASE.TXT 2011-09-01 20:28:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/RELEASE.TXT 2011-09-01 20:33:58.000000000 -0500
@@ -1,7 +1,7 @@
Release Notes
Broadcom uIP Linux Driver
- Version 0.7.0.12
- 08/04/2011
+ Version 0.7.0.14
+ 08/23/2011
Broadcom Corporation
5300 California Avenue,
@@ -10,6 +10,36 @@
Copyright (c) 2004 - 2011 Broadcom Corporation
All rights reserved
+uIP v0.7.0.14 (Aug 23, 2011)
+=======================================================
+ Fixes
+ -----
+ 1. Problem: Cont00057840 - RHEL6.2 inbox: Unable to connect to
+ targets with 5709
+ Cause: For cases when the bnx2/bnx2x driver gets removed, the
+ uio database that was built by cnic would have the device
+ ->net reference removed. This has caused an unnecessary
+ timeout of 5s for each stale uio entry in the database.
+ Change: Adjusted the routine which seeks the device->net entry
+ to include more logic instead of hard waiting for 5s.
+
+ Enhancements
+ ------------
+ 1. Change: Added support for RHEL6.2 for out-of-box release
+ 2. Change: Updated the man page with -h and -p info
+ 3. Change: Updated the -h info
+
+
+uIP v0.7.0.13 (Aug 10, 2011)
+=======================================================
+ Fixes
+ -----
+ 1. Problem: Cont00057768 - iscsiuio logrotate causes daemon failure
+ Cause: The logrotate script will send a SIGUSR1 signal to notify
+ the iscsiuio daemon of such action. However, the daemon
+ wasn't programmed to catch this signal.
+ Change: Restored the catching of this signal
+
uIP v0.7.0.12 (Aug 04, 2011)
=======================================================
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/iscsid_ipc.c open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/iscsid_ipc.c
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/iscsid_ipc.c 2011-09-01 20:28:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/iscsid_ipc.c 2011-09-01 20:33:53.000000000 -0500
@@ -217,18 +217,23 @@ static int parse_iface(void *arg)
struct in_addr netmask;
int i, prefix_len = 64;
struct ip_addr_mask ipam;
+ struct iface_rec *rec;
data = (iscsid_uip_broadcast_t *) arg;
+ rec = &data->u.iface_rec.rec;
LOG_INFO(PFX "Received request for '%s' to set IP address: '%s' "
- "VLAN: '%d'",
- data->u.iface_rec.rec.netdev,
- data->u.iface_rec.rec.ipaddress, data->u.iface_rec.rec.vlan_id);
+ "VLAN: '%d'", rec->netdev, rec->ipaddress, rec->vlan_id);
- vlan = data->u.iface_rec.rec.vlan_id;
+ vlan = rec->vlan_id;
+ if (vlan && valid_vlan(vlan) == 0) {
+ LOG_ERR(PFX "Invalid VLAN tag: %d", rec->vlan_id);
+ rc = -EIO;
+ goto early_exit;
+ }
/* Detect for CIDR notation and strip off the netmask if present */
- rc = decode_cidr(data->u.iface_rec.rec.ipaddress, &ipam, &prefix_len);
+ rc = decode_cidr(rec->ipaddress, &ipam, &prefix_len);
if (rc && !ipam.ip_type) {
LOG_ERR(PFX "decode_cidr: rc=%d, ipam.ip_type=%d",
rc, ipam.ip_type)
@@ -251,30 +256,29 @@ static int parse_iface(void *arg)
if (i >= 10) {
LOG_WARN(PFX "Could not aquire nic_list_mutex lock");
-
rc = -EIO;
goto early_exit;
}
/* Check if we can find the NIC device using the netdev
* name */
- rc = from_netdev_name_find_nic(data->u.iface_rec.rec.netdev, &nic);
+ rc = from_netdev_name_find_nic(rec->netdev, &nic);
if (rc != 0) {
LOG_WARN(PFX "Couldn't find NIC: %s, creating an instance",
- data->u.iface_rec.rec.netdev);
+ rec->netdev);
nic = nic_init();
if (nic == NULL) {
LOG_ERR(PFX "Couldn't allocate space for NIC %s",
- data->u.iface_rec.rec.netdev);
+ rec->netdev);
rc = -ENOMEM;
goto done;
}
strncpy(nic->eth_device_name,
- data->u.iface_rec.rec.netdev,
+ rec->netdev,
sizeof(nic->eth_device_name));
nic->config_device_name = nic->eth_device_name;
nic->log_name = nic->eth_device_name;
@@ -288,7 +292,7 @@ static int parse_iface(void *arg)
nic_add(nic);
} else {
LOG_INFO(PFX " %s, using existing NIC",
- data->u.iface_rec.rec.netdev);
+ rec->netdev);
}
if (nic->flags & NIC_GOING_DOWN) {
@@ -335,12 +339,12 @@ static int parse_iface(void *arg)
&transport_name_size);
if (strncmp(transport_name,
- data->u.iface_rec.rec.transport_name,
+ rec->transport_name,
transport_name_size) != 0) {
LOG_ERR(PFX "%s Transport name is not equal "
"expected: %s got: %s",
nic->log_name,
- data->u.iface_rec.rec.transport_name,
+ rec->transport_name,
transport_name);
}
} else {
@@ -548,11 +552,10 @@ enable_nic:
LOG_INFO(PFX "ISCSID_UIP_IPC_GET_IFACE: command: %x "
"name: %s, netdev: %s ipaddr: %s vlan: %d transport_name:%s",
- data->header.command, data->u.iface_rec.rec.name,
- data->u.iface_rec.rec.netdev,
- (ipam.ip_type ==
- AF_INET) ? inet_ntoa(ipam.addr4) : ipv6_buf_str, vlan,
- data->u.iface_rec.rec.transport_name);
+ data->header.command, rec->name, rec->netdev,
+ (ipam.ip_type == AF_INET) ? inet_ntoa(ipam.addr4) :
+ ipv6_buf_str,
+ vlan, rec->transport_name);
done:
pthread_mutex_unlock(&nic_list_mutex);
@@ -617,15 +620,15 @@ int process_iscsid_broadcast(int s2)
switch (rc) {
case 0:
rsp.command = cmd;
- rsp.err = ISCISD_UIP_MGMT_IPC_DEVICE_UP;
+ rsp.err = ISCSID_UIP_MGMT_IPC_DEVICE_UP;
break;
case -EAGAIN:
rsp.command = cmd;
- rsp.err = ISCISD_UIP_MGMT_IPC_DEVICE_INITIALIZING;
+ rsp.err = ISCSID_UIP_MGMT_IPC_DEVICE_INITIALIZING;
break;
default:
rsp.command = cmd;
- rsp.err = ISCISD_UIP_MGMT_IPC_ERR;
+ rsp.err = ISCSID_UIP_MGMT_IPC_ERR;
}
break;
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/main.c open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/main.c
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/main.c 2011-09-01 20:28:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/main.c 2011-09-01 20:33:42.000000000 -0500
@@ -172,10 +172,10 @@ static void main_usage()
printf("\nUsage: %s [OPTION]\n", APP_NAME);
printf("\
-Broadcom uIP daemon.\n\
+iscsiuio daemon.\n\
-f, --foreground make the program run in the foreground\n\
-d, --debug debuglevel print debugging information\n\
- -p, --pid=pidfile use pid file (default %s ).\n\
+ -p, --pid=pidfile use pid file (default %s).\n\
-h, --help display this help and exit\n\
-v, --version display version and exit\n\
", default_pid_filepath);
@@ -336,6 +336,7 @@ int main(int argc, char *argv[])
sigaddset(&set, SIGINT);
sigaddset(&set, SIGQUIT);
sigaddset(&set, SIGTERM);
+ sigaddset(&set, SIGUSR1);
rc = pthread_sigmask(SIG_SETMASK, &set, NULL);
/* Spin off the signal handling thread */
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/nic_utils.c open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/nic_utils.c
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/nic_utils.c 2011-09-01 20:28:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/nic_utils.c 2011-09-01 20:33:37.000000000 -0500
@@ -473,6 +473,7 @@ static int from_uio_find_associated_eth_
char *search_paths[] = { "/sys/class/uio/uio%i/device/",
"/sys/class/uio/uio%i/device/net"
};
+ int path_to[] = { 5, 1 };
int (*search_filters[]) (const struct dirent *) = {
filter_net_name, filter_dot_out,};
char *(*extract_name[]) (struct dirent ** files) = {
@@ -492,7 +493,7 @@ static int from_uio_find_associated_eth_
/* Build the path to determine uio name */
rc = sprintf(path, search_paths[path_iterator], uio_minor);
- wait_for_file_node_timed(nic, path, 5);
+ wait_for_file_node_timed(nic, path, path_to[path_iterator]);
count = scandir(path, &files,
search_filters[path_iterator], alphasort);
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/options.h open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/options.h
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/options.h 2011-09-01 20:28:53.000000000 -0500
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/options.h 2011-09-01 20:33:42.000000000 -0500
@@ -78,7 +78,7 @@
#define ETHERTYPE_VLAN 0x8100 /* IEEE 802.1Q VLAN tagging */
#endif /* ETHERTYPE_VLAN */
-#define APP_NAME "uIP"
+#define APP_NAME "iscsiuio"
/* BUILD_DATE is automatically generated from the Makefile */
#define DEBUG_OFF 0x1

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/include/iscsi_err.h open-iscsi-2.0-872-rc4-bnx2i.build/include/iscsi_err.h diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/include/iscsi_err.h open-iscsi-2.0-872-rc4-bnx2i.work/include/iscsi_err.h
--- open-iscsi-2.0-872-rc4-bnx2i.base/include/iscsi_err.h 2011-08-14 16:49:44.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i/include/iscsi_err.h 2012-03-05 23:36:21.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/include/iscsi_err.h 2011-08-14 16:56:54.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/include/iscsi_err.h 2012-03-05 23:36:29.000000000 -0600
@@ -58,6 +58,8 @@ enum { @@ -58,6 +58,8 @@ enum {
ISCSI_ERR_ISNS_QUERY = 25, ISCSI_ERR_ISNS_QUERY = 25,
/* iSNS registration/deregistration failed */ /* iSNS registration/deregistration failed */
@ -10,21 +10,21 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/include/iscsi_err.h open-iscsi-2.0
/* Always last. Indicates end of error code space */ /* Always last. Indicates end of error code space */
ISCSI_MAX_ERR_VAL, ISCSI_MAX_ERR_VAL,
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/Makefile open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/Makefile diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/Makefile open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/Makefile
--- open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/Makefile 2011-08-14 16:55:23.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i/libiscsi/Makefile 2012-03-05 23:36:21.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/Makefile 2011-08-14 16:56:54.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/Makefile 2012-03-05 23:37:25.000000000 -0600
@@ -13,7 +13,7 @@ TESTS += tests/test_set_auth tests/test_ @@ -13,7 +13,7 @@ TESTS += tests/test_set_auth tests/test_
COMMON_SRCS = sysdeps.o COMMON_SRCS = sysdeps.o
# sources shared between iscsid, iscsiadm and iscsistart # sources shared between iscsid, iscsiadm and iscsistart
-ISCSI_LIB_SRCS = netlink.o transport.o cxgbi.o be2iscsi.o iscsi_timer.o initiator_common.o iscsi_err.o session_info.o iscsi_util.o dcb_app.o io.o auth.o discovery.o login.o log.o md5.o sha1.o iface.o idbm.o sysfs.o iscsi_sysfs.o iscsi_net_util.o iscsid_req.o -ISCSI_LIB_SRCS = netlink.o transport.o iser.o cxgbi.o be2iscsi.o iscsi_timer.o initiator_common.o iscsi_err.o session_info.o iscsi_util.o dcb_app.o io.o auth.o discovery.o login.o log.o md5.o sha1.o iface.o idbm.o sysfs.o iscsi_sysfs.o iscsi_net_util.o iscsid_req.o
+ISCSI_LIB_SRCS = netlink.o uip_mgmt_ipc.o transport.o cxgbi.o be2iscsi.o iscsi_timer.o initiator_common.o iscsi_err.o session_info.o iscsi_util.o dcb_app.o io.o auth.o discovery.o login.o log.o md5.o sha1.o iface.o idbm.o sysfs.o iscsi_sysfs.o iscsi_net_util.o iscsid_req.o +ISCSI_LIB_SRCS = netlink.o uip_mgmt_ipc.o transport.o iser.o cxgbi.o be2iscsi.o iscsi_timer.o initiator_common.o iscsi_err.o session_info.o iscsi_util.o dcb_app.o io.o auth.o discovery.o login.o log.o md5.o sha1.o iface.o idbm.o sysfs.o iscsi_sysfs.o iscsi_net_util.o iscsid_req.o
FW_PARAM_SRCS = fw_entry.o prom_lex.o prom_parse.tab.o fwparam_ppc.o fwparam_sysfs.o FW_PARAM_SRCS = fw_entry.o prom_lex.o prom_parse.tab.o fwparam_ppc.o fwparam_sysfs.o
# sources shared with the userspace utils, note we build these separately # sources shared with the userspace utils, note we build these separately
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/initiator.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c 2011-08-14 16:49:44.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c 2012-03-05 23:36:21.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/initiator.c 2011-08-14 16:56:54.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator.c 2012-03-05 23:36:29.000000000 -0600
@@ -45,6 +45,7 @@ @@ -45,6 +45,7 @@
#include "iscsi_sysfs.h" #include "iscsi_sysfs.h"
#include "iscsi_settings.h" #include "iscsi_settings.h"
@ -32,7 +32,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872
+#include "host.h" +#include "host.h"
#include "sysdeps.h" #include "sysdeps.h"
#include "iscsi_err.h" #include "iscsi_err.h"
#include "kern_err_table.h"
@@ -557,6 +558,48 @@ static int iscsi_conn_connect(struct isc @@ -557,6 +558,48 @@ static int iscsi_conn_connect(struct isc
return 0; return 0;
} }
@ -94,7 +94,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872
if (iscsi_conn_connect(conn, qtask)) { if (iscsi_conn_connect(conn, qtask)) {
delay = ISCSI_CONN_ERR_REOPEN_DELAY; delay = ISCSI_CONN_ERR_REOPEN_DELAY;
goto queue_reopen; goto queue_reopen;
@@ -1659,6 +1707,53 @@ failed_login: @@ -1667,6 +1715,53 @@ failed_login:
} }
@ -148,7 +148,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872
static int iscsi_sched_ev_context(struct iscsi_ev_context *ev_context, static int iscsi_sched_ev_context(struct iscsi_ev_context *ev_context,
struct iscsi_conn *conn, unsigned long tmo, struct iscsi_conn *conn, unsigned long tmo,
int event) int event)
@@ -1700,6 +1795,11 @@ static int iscsi_sched_ev_context(struct @@ -1708,6 +1803,11 @@ static int iscsi_sched_ev_context(struct
ev_context); ev_context);
actor_schedule(&ev_context->actor); actor_schedule(&ev_context->actor);
break; break;
@ -160,7 +160,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872
case EV_CONN_LOGOUT_TIMER: case EV_CONN_LOGOUT_TIMER:
actor_timer(&ev_context->actor, tmo * 1000, actor_timer(&ev_context->actor, tmo * 1000,
iscsi_logout_timedout, ev_context); iscsi_logout_timedout, ev_context);
@@ -1833,7 +1933,17 @@ session_login_task(node_rec_t *rec, queu @@ -1841,7 +1941,17 @@ session_login_task(node_rec_t *rec, queu
conn = &session->conn[0]; conn = &session->conn[0];
qtask->conn = conn; qtask->conn = conn;
@ -179,7 +179,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872
__session_destroy(session); __session_destroy(session);
return ISCSI_ERR_LOGIN; return ISCSI_ERR_LOGIN;
} }
@@ -1990,6 +2100,7 @@ iscsi_host_send_targets(queue_task_t *qt @@ -1998,6 +2108,7 @@ iscsi_host_send_targets(queue_task_t *qt
struct sockaddr_storage *ss) struct sockaddr_storage *ss)
{ {
struct iscsi_transport *t; struct iscsi_transport *t;
@ -187,9 +187,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872
t = iscsi_sysfs_get_transport_by_hba(host_no); t = iscsi_sysfs_get_transport_by_hba(host_no);
if (!t) { if (!t) {
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator_common.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/initiator_common.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator_common.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator_common.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator_common.c 2011-08-14 16:49:44.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i/usr/initiator_common.c 2012-03-05 23:36:21.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/initiator_common.c 2011-08-14 16:56:54.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator_common.c 2012-03-05 23:36:29.000000000 -0600
@@ -561,6 +561,36 @@ TODO handle this @@ -561,6 +561,36 @@ TODO handle this
return 0; return 0;
} }
@ -238,9 +238,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator_common.c open-iscsi-
rc = host_set_param(t, session->hostno, rc = host_set_param(t, session->hostno,
ISCSI_HOST_PARAM_IPADDRESS, ISCSI_HOST_PARAM_IPADDRESS,
iface->ipaddress, ISCSI_STRING); iface->ipaddress, ISCSI_STRING);
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.h open-iscsi-2.0-872-rc4-bnx2i.build/usr/initiator.h diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator.h
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.h 2011-08-14 16:49:44.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.h 2012-03-05 23:36:21.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/initiator.h 2011-08-14 16:58:14.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator.h 2012-03-05 23:36:29.000000000 -0600
@@ -83,6 +83,7 @@ typedef enum iscsi_event_e { @@ -83,6 +83,7 @@ typedef enum iscsi_event_e {
EV_CONN_LOGOUT_TIMER, EV_CONN_LOGOUT_TIMER,
EV_CONN_STOP, EV_CONN_STOP,
@ -258,9 +258,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.h open-iscsi-2.0-872
+ struct iface_rec *iface); + struct iface_rec *iface);
#endif /* INITIATOR_H */ #endif /* INITIATOR_H */
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsid_req.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/iscsid_req.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsid_req.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsid_req.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsid_req.c 2011-08-14 16:49:44.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsid_req.c 2012-03-05 23:36:21.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/iscsid_req.c 2011-08-14 16:56:54.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsid_req.c 2012-03-05 23:36:29.000000000 -0600
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -391,9 +391,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsid_req.c open-iscsi-2.0-87
+ close(fd); + close(fd);
+ return err; + return err;
+} +}
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsid_req.h open-iscsi-2.0-872-rc4-bnx2i.build/usr/iscsid_req.h diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsid_req.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsid_req.h
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsid_req.h 2011-08-14 16:49:44.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsid_req.h 2012-03-05 23:36:21.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/iscsid_req.h 2011-08-14 16:56:54.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsid_req.h 2012-03-05 23:36:29.000000000 -0600
@@ -33,4 +33,6 @@ extern int iscsid_req_by_rec(int cmd, st @@ -33,4 +33,6 @@ extern int iscsid_req_by_rec(int cmd, st
extern int iscsid_req_by_sid_async(int cmd, int sid, int *fd); extern int iscsid_req_by_sid_async(int cmd, int sid, int *fd);
extern int iscsid_req_by_sid(int cmd, int sid); extern int iscsid_req_by_sid(int cmd, int sid);
@ -401,9 +401,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsid_req.h open-iscsi-2.0-87
+extern int uip_broadcast(void *buf, size_t buf_len); +extern int uip_broadcast(void *buf, size_t buf_len);
+ +
#endif #endif
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsi_err.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/iscsi_err.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_err.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_err.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsi_err.c 2011-08-14 16:49:44.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_err.c 2012-03-05 23:36:21.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/iscsi_err.c 2011-08-14 16:56:54.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_err.c 2012-03-05 23:36:29.000000000 -0600
@@ -49,6 +49,7 @@ static char *iscsi_err_msgs[] = { @@ -49,6 +49,7 @@ static char *iscsi_err_msgs[] = {
/* 24 */ "iSCSI login failed due to authorization failure", /* 24 */ "iSCSI login failed due to authorization failure",
/* 25 */ "iSNS query failed", /* 25 */ "iSNS query failed",
@ -412,22 +412,22 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsi_err.c open-iscsi-2.0-872
}; };
char *iscsi_err_to_str(int err) char *iscsi_err_to_str(int err)
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/Makefile open-iscsi-2.0-872-rc4-bnx2i.build/usr/Makefile diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/Makefile open-iscsi-2.0-872-rc4-bnx2i.work/usr/Makefile
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/Makefile 2011-08-14 16:55:23.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i/usr/Makefile 2012-03-05 23:36:21.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/Makefile 2011-08-14 16:58:57.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/Makefile 2012-03-05 23:38:00.000000000 -0600
@@ -42,7 +42,8 @@ SYSDEPS_SRCS = $(wildcard ../utils/sysde @@ -42,7 +42,8 @@ SYSDEPS_SRCS = $(wildcard ../utils/sysde
ISCSI_LIB_SRCS = iscsi_util.o io.o auth.o iscsi_timer.o login.o log.o md5.o \ ISCSI_LIB_SRCS = iscsi_util.o io.o auth.o iscsi_timer.o login.o log.o md5.o \
sha1.o iface.o idbm.o sysfs.o host.o session_info.o iscsi_sysfs.o \ sha1.o iface.o idbm.o sysfs.o host.o session_info.o iscsi_sysfs.o \
iscsi_net_util.o iscsid_req.o transport.o cxgbi.o be2iscsi.o \ iscsi_net_util.o iscsid_req.o transport.o iser.o cxgbi.o be2iscsi.o \
- initiator_common.o iscsi_err.o $(IPC_OBJ) $(SYSDEPS_SRCS) $(DCB_OBJ) - initiator_common.o iscsi_err.o $(IPC_OBJ) $(SYSDEPS_SRCS) $(DCB_OBJ)
+ initiator_common.o iscsi_err.o uip_mgmt_ipc.o \ + initiator_common.o iscsi_err.o uip_mgmt_ipc.o \
+ $(IPC_OBJ) $(SYSDEPS_SRCS) $(DCB_OBJ) + $(IPC_OBJ) $(SYSDEPS_SRCS) $(DCB_OBJ)
# core initiator files # core initiator files
INITIATOR_SRCS = initiator.o scsi.o actor.o event_poll.o mgmt_ipc.o INITIATOR_SRCS = initiator.o scsi.o actor.o event_poll.o mgmt_ipc.o kern_err_table.o
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/transport.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/transport.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/transport.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/transport.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/transport.c 2011-08-14 16:49:44.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i/usr/transport.c 2012-03-05 23:36:21.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/transport.c 2011-08-14 16:56:54.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/transport.c 2012-03-05 23:36:29.000000000 -0600
@@ -25,6 +25,7 @@ @@ -25,6 +25,7 @@
#include "log.h" #include "log.h"
#include "iscsi_util.h" #include "iscsi_util.h"
@ -435,8 +435,8 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/transport.c open-iscsi-2.0-872
+#include "uip_mgmt_ipc.h" +#include "uip_mgmt_ipc.h"
#include "cxgbi.h" #include "cxgbi.h"
#include "be2iscsi.h" #include "be2iscsi.h"
#include "iser.h"
@@ -67,6 +68,7 @@ struct iscsi_transport_template bnx2i = @@ -69,6 +70,7 @@ struct iscsi_transport_template bnx2i =
.ep_connect = ktransport_ep_connect, .ep_connect = ktransport_ep_connect,
.ep_poll = ktransport_ep_poll, .ep_poll = ktransport_ep_poll,
.ep_disconnect = ktransport_ep_disconnect, .ep_disconnect = ktransport_ep_disconnect,
@ -444,9 +444,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/transport.c open-iscsi-2.0-872
}; };
struct iscsi_transport_template be2iscsi = { struct iscsi_transport_template be2iscsi = {
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/transport.h open-iscsi-2.0-872-rc4-bnx2i.build/usr/transport.h diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/transport.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/transport.h
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/transport.h 2011-08-14 16:49:34.000000000 -0500 --- open-iscsi-2.0-872-rc4-bnx2i/usr/transport.h 2012-03-05 23:36:21.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/transport.h 2011-08-14 16:56:54.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/transport.h 2012-03-05 23:36:29.000000000 -0600
@@ -35,6 +35,9 @@ struct iscsi_transport_template { @@ -35,6 +35,9 @@ struct iscsi_transport_template {
int (*ep_poll) (struct iscsi_conn *conn, int timeout_ms); int (*ep_poll) (struct iscsi_conn *conn, int timeout_ms);
void (*ep_disconnect) (struct iscsi_conn *conn); void (*ep_disconnect) (struct iscsi_conn *conn);
@ -457,9 +457,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/transport.h open-iscsi-2.0-872
}; };
/* represents data path provider */ /* represents data path provider */
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/uip_mgmt_ipc.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/uip_mgmt_ipc.c diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/uip_mgmt_ipc.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/uip_mgmt_ipc.c
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/uip_mgmt_ipc.c 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i/usr/uip_mgmt_ipc.c 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/uip_mgmt_ipc.c 2011-08-14 16:56:54.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/uip_mgmt_ipc.c 2012-03-05 23:36:29.000000000 -0600
@@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
+/* +/*
+ * uIP iSCSI Daemon/Admin Management IPC + * uIP iSCSI Daemon/Admin Management IPC
@ -502,9 +502,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/uip_mgmt_ipc.c open-iscsi-2.0-
+ sizeof(iscsid_uip_broadcast_header_t) + + sizeof(iscsid_uip_broadcast_header_t) +
+ sizeof(*iface)); + sizeof(*iface));
+} +}
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/uip_mgmt_ipc.h open-iscsi-2.0-872-rc4-bnx2i.build/usr/uip_mgmt_ipc.h diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/uip_mgmt_ipc.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/uip_mgmt_ipc.h
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/uip_mgmt_ipc.h 1969-12-31 18:00:00.000000000 -0600 --- open-iscsi-2.0-872-rc4-bnx2i/usr/uip_mgmt_ipc.h 1969-12-31 18:00:00.000000000 -0600
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/uip_mgmt_ipc.h 2011-08-14 16:56:54.000000000 -0500 +++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/uip_mgmt_ipc.h 2012-03-05 23:36:29.000000000 -0600
@@ -0,0 +1,73 @@ @@ -0,0 +1,73 @@
+/* +/*
+ * uIP iSCSI Daemon/Admin Management IPC + * uIP iSCSI Daemon/Admin Management IPC

View File

@ -3,15 +3,16 @@
Summary: iSCSI daemon and utility programs Summary: iSCSI daemon and utility programs
Name: iscsi-initiator-utils Name: iscsi-initiator-utils
Version: 6.2.0.872 Version: 6.2.0.872
Release: 35%{?dist} Release: 36%{?dist}
Source0: http://people.redhat.com/mchristi/iscsi/rhel6.0/source/open-iscsi-2.0-872-rc4-bnx2i.tar.gz Source0: http://people.redhat.com/mchristi/iscsi/rhel6.0/source/open-iscsi-2.0-872-rc4-bnx2i.tar.gz
Source1: iscsid.init Source1: iscsid.init
Source2: iscsidevs.init Source2: iscsidevs.init
Source3: 04-iscsi Source3: 04-iscsi
# sync brcm to 0.7.0.12 # sync brcm to 0.7.2.1
Patch0: iscsi-initiator-utils-sync-uio-0.7.0.8.patch Patch0: iscsi-initiator-utils-sync-uio-0.7.2.1.patch
# sync iscsi tools to upstream commit e8c5b1d34ee5ce0a755ff54518829156dfa5fabe # sync iscsi tools to upstream commit 2e342633db5ac211947ffad1d8da718f6f065d3e
# (iscsi tools: update iscsi_if.h for host event)
Patch1: iscsi-initiator-utils-sync-iscsi.patch Patch1: iscsi-initiator-utils-sync-iscsi.patch
# Add Red Hat specific info to docs. # Add Red Hat specific info to docs.
Patch2: iscsi-initiator-utils-update-initscripts-and-docs.patch Patch2: iscsi-initiator-utils-update-initscripts-and-docs.patch
@ -27,40 +28,17 @@ Patch6: iscsi-initiator-utils-uip-mgmt.patch
Patch7: iscsi-initiator-utils-dont-use-static.patch Patch7: iscsi-initiator-utils-dont-use-static.patch
# Remove the OFFLOAD_BOOT_SUPPORTED #ifdef. # Remove the OFFLOAD_BOOT_SUPPORTED #ifdef.
Patch8: iscsi-initiator-utils-remove-the-offload-boot-supported-ifdef.patch Patch8: iscsi-initiator-utils-remove-the-offload-boot-supported-ifdef.patch
# brcm uio: handle the different iface_rec structures in iscsid and brcm.
Patch9: iscsi-initiator-utils-uio-handle-different-iface_rec.patch
# Document missing brcm arguments
Patch10: iscsi-initiator-utils-brcm-man.patch
# setup default ifaces for all ifaces in kernel
Patch11: iscsi-initiator-utils-fix-default-bindings.patch
# fix iscsiadm return value/msg when login fails
Patch12: iscsi-initiator-utils-fix-iscsiadm-return.patch
# don't use openssl-devel
Patch13: iscsi-initiator-utils-dont-use-openssl.patch
# sync uio to 0.7.0.14
Patch14: iscsi-initiator-utils-sync-uio-0.7.0.14.patch
# fix nl msglen
Patch15: iscsi-initiator-utils-fix-nlmsglen.patch
# fixes for offload iface support
Patch16: iscsi-initiator-utils-ofl-iface-fixes.patch
# fix ipv6 ibft/firmware boot # fix ipv6 ibft/firmware boot
Patch17: iscsi-initiator-utils-fix-ipv6-boot.patch Patch9: iscsi-initiator-utils-fix-ipv6-boot.patch
# netconfig libiscsi support # netconfig libiscsi support
Patch18: iscsi-initiator-utils-Add-Netconfig-support-through-libiscsi.patch Patch10: iscsi-initiator-utils-Add-Netconfig-support-through-libiscsi.patch
# libiscsi offload support # libiscsi offload support
Patch19: iscsi-initiator-utils-libiscsi-to-support-offload.patch Patch11: iscsi-initiator-utils-libiscsi-to-support-offload.patch
# sync iscsiuio to 0.7.0.14g # sync to upstream commit f9f627fbf0fc96545931ae65aa2b6214841bfd4e to
Patch20: iscsi-initiator-utils-sync-uio-0.7.0.14g.patch # add iscsiadm ping and host chap support and fix default iface handling
# return on exists Patch12: iscsi-initiator-utils-ping-and-chap.patch
Patch21: iscsi-initiator-utils-return-on-exists.patch
# don't sync kernel sessions.
Patch22: iscsi-initiator-utils-dont-sync-kern-sess.patch
# allow iscsistart to take in any setting
Patch23: iscsi-initiator-utils-iscsistart-param.patch
# fix -i mode use
Patch24: iscsi-initiator-utils-fix-readme-imode.patch
# add rhel version info to iscsi tools # add rhel version info to iscsi tools
Patch25: iscsi-initiator-utils-add-rh-ver.patch Patch13: iscsi-initiator-utils-add-rh-ver.patch
Group: System Environment/Daemons Group: System Environment/Daemons
License: GPLv2+ License: GPLv2+
@ -88,7 +66,7 @@ developing applications that use %{name}.
%prep %prep
%setup -q -n open-iscsi-2.0-872-rc4-bnx2i %setup -q -n open-iscsi-2.0-872-rc4-bnx2i
%patch0 -p1 -b .sync-uio-0.7.0.8 %patch0 -p1 -b .sync-uio-0.7.2.1
%patch1 -p1 -b .sync-iscsi %patch1 -p1 -b .sync-iscsi
%patch2 -p1 -b .update-initscripts-and-docs %patch2 -p1 -b .update-initscripts-and-docs
%patch3 -p1 -b .use-var-for-config %patch3 -p1 -b .use-var-for-config
@ -97,23 +75,11 @@ developing applications that use %{name}.
%patch6 -p1 -b .uip-mgmt %patch6 -p1 -b .uip-mgmt
%patch7 -p1 -b .dont-use-static %patch7 -p1 -b .dont-use-static
%patch8 -p1 -b .remove-the-offload-boot-supported-ifdef %patch8 -p1 -b .remove-the-offload-boot-supported-ifdef
%patch9 -p1 -b .uio-handle-different-iface_rec %patch9 -p1 -b .fix-ipv6-boot
%patch10 -p1 -b .brcm-man %patch10 -p1 -b .Add-Netconfig-support-through-libiscsi
%patch11 -p1 -b .fix-default-bindings %patch11 -p1 -b .libiscsi-to-support-offload
%patch12 -p1 -b .fix-iscsiadm-return %patch12 -p1 -b .ping-and-chap
%patch13 -p1 -b .dont-use-openssl %patch13 -p1 -b .add-rh-ver
%patch14 -p1 -b .sync-uio-0.7.0.14
%patch15 -p1 -b .fix-nlmsglen
%patch16 -p1 -b .ofl-iface-fixes
%patch17 -p1 -b .fix-ipv6-boot
%patch18 -p1 -b .Add-Netconfig-support-through-libiscsi
%patch19 -p1 -b .libiscsi-to-support-offload
%patch20 -p1 -b .sync-uio-0.7.0.14g
%patch21 -p1 -b .return-on-exists
%patch22 -p1 -b .dont-sync-kern-sess
%patch23 -p1 -b .iscsistart-param
%patch24 -p1 -b .fix-readme-imode
%patch25 -p1 -b .add-rh-ver
%build %build
cd utils/open-isns cd utils/open-isns
@ -239,6 +205,11 @@ fi
%{_includedir}/libiscsi.h %{_includedir}/libiscsi.h
%changelog %changelog
* Mon Mar 5 2012 Mike Christie <mcrhsit@redhat.com> 6.2.0.872.36
- 740054 sync iscsiuio to 0.7.2.1
- 790609 Add ping and host chap support to iscsiadm
- 636013 scalability testing.
* Sun Feb 26 2012 Mike Christie <mcrhsit@redhat.com> 6.2.0.872.35 * Sun Feb 26 2012 Mike Christie <mcrhsit@redhat.com> 6.2.0.872.35
- 738192 Allow iscsistart to take any parameter. - 738192 Allow iscsistart to take any parameter.
- 739049 Fix -i use in README. - 739049 Fix -i use in README.