parent
e16d7fc569
commit
3c9800208a
@ -1,7 +1,7 @@
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.c open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/libiscsi.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.c 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/libiscsi.c 2011-01-31 03:00:37.000000000 -0600
|
||||
@@ -0,0 +1,580 @@
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.c open-iscsi-2.0-872-rc4-bnx2i.build/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.build/libiscsi/libiscsi.c 2011-08-14 16:53:58.000000000 -0500
|
||||
@@ -0,0 +1,612 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
+ *
|
||||
@ -98,6 +98,16 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.c open-iscsi-2.0-872-
|
||||
+ free(context);
|
||||
+}
|
||||
+
|
||||
+static void free_iface_list(struct list_head *ifaces)
|
||||
+{
|
||||
+ struct iface_rec *iface, *tmp_iface;
|
||||
+
|
||||
+ list_for_each_entry_safe(iface, tmp_iface, ifaces, list) {
|
||||
+ list_del(&iface->list);
|
||||
+ free(iface);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void free_rec_list(struct list_head *rec_list)
|
||||
+{
|
||||
+ struct node_rec *rec, *tmp;
|
||||
@ -181,6 +191,8 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.c open-iscsi-2.0-872-
|
||||
+ strlcpy((*found_nodes)[found].address,
|
||||
+ rec->conn[0].address, NI_MAXHOST);
|
||||
+ (*found_nodes)[found].port = rec->conn[0].port;
|
||||
+ strlcpy((*found_nodes)[found].iface,
|
||||
+ rec->iface.name, LIBISCSI_VALUE_MAXLEN);
|
||||
+ found++;
|
||||
+ }
|
||||
+ }
|
||||
@ -193,69 +205,84 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.c open-iscsi-2.0-872-
|
||||
+int libiscsi_discover_firmware(struct libiscsi_context *context,
|
||||
+ int *nr_found, struct libiscsi_node **found_nodes)
|
||||
+{
|
||||
+ struct boot_context fw_entry;
|
||||
+ struct node_rec rec;
|
||||
+ struct list_head targets, ifaces, rec_list;
|
||||
+ discovery_rec_t drec;
|
||||
+ int rc = 0;
|
||||
+
|
||||
+ if (nr_found)
|
||||
+ *nr_found = 0;
|
||||
+ if (found_nodes)
|
||||
+ *found_nodes = NULL;
|
||||
+ INIT_LIST_HEAD(&targets);
|
||||
+ INIT_LIST_HEAD(&ifaces);
|
||||
+ INIT_LIST_HEAD(&rec_list);
|
||||
+
|
||||
+ memset(&fw_entry, 0, sizeof fw_entry);
|
||||
+ rc = fw_get_entry(&fw_entry);
|
||||
+ if (nr_found) {
|
||||
+ *nr_found = 0;
|
||||
+ }
|
||||
+
|
||||
+ if (found_nodes) {
|
||||
+ *found_nodes = NULL;
|
||||
+ }
|
||||
+
|
||||
+ rc = fw_get_targets(&targets);
|
||||
+ if (rc) {
|
||||
+ strcpy(context->error_str, "Could not read fw values.");
|
||||
+ log_error("%s: Could not get list of targets from firmware "
|
||||
+ "(err %d).\n", __func__, rc);
|
||||
+ return rc;
|
||||
+ }
|
||||
+
|
||||
+ memset(&rec, 0, sizeof rec);
|
||||
+ idbm_node_setup_defaults(&rec);
|
||||
+ CHECK(iface_create_ifaces_from_boot_contexts(&ifaces, &targets));
|
||||
+
|
||||
+ strlcpy(rec.name, fw_entry.targetname, TARGET_NAME_MAXLEN);
|
||||
+ rec.tpgt = 1;
|
||||
+ strlcpy(rec.conn[0].address, fw_entry.target_ipaddr, NI_MAXHOST);
|
||||
+ rec.conn[0].port = fw_entry.target_port;
|
||||
+ memset(&drec, 0, sizeof(drec));
|
||||
+ drec.type = DISCOVERY_TYPE_FW;
|
||||
+ rc = idbm_bind_ifaces_to_nodes(discovery_fw, &drec, &ifaces, &rec_list);
|
||||
+ if (rc) {
|
||||
+ log_error("%s: Could not determine target nodes from firmware "
|
||||
+ "(err %d).\n", __func__, rc);
|
||||
+ goto leave;
|
||||
+ }
|
||||
+
|
||||
+ iface_setup_defaults(&rec.iface);
|
||||
+ strncpy(rec.iface.iname, fw_entry.initiatorname,
|
||||
+ sizeof(fw_entry.initiatorname));
|
||||
+ strncpy(rec.session.auth.username, fw_entry.chap_name,
|
||||
+ sizeof(fw_entry.chap_name));
|
||||
+ strncpy((char *)rec.session.auth.password, fw_entry.chap_password,
|
||||
+ sizeof(fw_entry.chap_password));
|
||||
+ strncpy(rec.session.auth.username_in, fw_entry.chap_name_in,
|
||||
+ sizeof(fw_entry.chap_name_in));
|
||||
+ strncpy((char *)rec.session.auth.password_in,
|
||||
+ fw_entry.chap_password_in,
|
||||
+ sizeof(fw_entry.chap_password_in));
|
||||
+ rec.session.auth.password_length =
|
||||
+ strlen((char *)fw_entry.chap_password);
|
||||
+ rec.session.auth.password_in_length =
|
||||
+ strlen((char *)fw_entry.chap_password_in);
|
||||
+ int node_count = 0;
|
||||
+ struct list_head *pos;
|
||||
+ list_for_each(pos, &rec_list) {
|
||||
+ ++node_count;
|
||||
+ }
|
||||
+
|
||||
+ CHECK(idbm_add_node(&rec, NULL, 1 /* overwrite */))
|
||||
+ struct libiscsi_node* new_nodes;
|
||||
+ /* allocate enough space for all the nodes */
|
||||
+ new_nodes = calloc(node_count, sizeof *new_nodes);
|
||||
+ if (new_nodes == NULL) {
|
||||
+ rc = ENOMEM;
|
||||
+ log_error("%s: %s.\n", __func__, strerror(ENOMEM));
|
||||
+ goto leave;
|
||||
+ }
|
||||
+
|
||||
+ if (nr_found)
|
||||
+ *nr_found = 1;
|
||||
+ struct node_rec *rec;
|
||||
+ struct libiscsi_node *new_node = new_nodes;
|
||||
+ /* in one loop, add nodes to idbm and create libiscsi_node entries */
|
||||
+ list_for_each_entry(rec, &rec_list, list) {
|
||||
+ CHECK(idbm_add_node(rec, NULL, 1 /* overwrite */));
|
||||
+
|
||||
+ strlcpy(new_node->name, rec->name, LIBISCSI_VALUE_MAXLEN);
|
||||
+ new_node->tpgt = rec->tpgt;
|
||||
+ strlcpy(new_node->address, rec->conn[0].address, NI_MAXHOST);
|
||||
+ new_node->port = rec->conn[0].port;
|
||||
+ strlcpy(new_node->iface, rec->iface.name, LIBISCSI_VALUE_MAXLEN);
|
||||
+
|
||||
+ ++new_node;
|
||||
+ }
|
||||
+
|
||||
+ /* update output parameters */
|
||||
+ if (nr_found) {
|
||||
+ *nr_found = node_count;
|
||||
+ }
|
||||
+ if (found_nodes) {
|
||||
+ *found_nodes = calloc(1, sizeof **found_nodes);
|
||||
+ if (*found_nodes == NULL) {
|
||||
+ snprintf(context->error_str,
|
||||
+ sizeof(context->error_str), strerror(ENOMEM));
|
||||
+ rc = ENOMEM;
|
||||
+ goto leave;
|
||||
+ }
|
||||
+ strlcpy((*found_nodes)[0].name, rec.name,
|
||||
+ LIBISCSI_VALUE_MAXLEN);
|
||||
+ (*found_nodes)[0].tpgt = rec.tpgt;
|
||||
+ strlcpy((*found_nodes)[0].address,
|
||||
+ rec.conn[0].address, NI_MAXHOST);
|
||||
+ (*found_nodes)[0].port = rec.conn[0].port;
|
||||
+ *found_nodes = new_nodes;
|
||||
+ }
|
||||
+
|
||||
+leave:
|
||||
+ fw_free_targets(&targets);
|
||||
+
|
||||
+ free_iface_list(&ifaces);
|
||||
+ free_rec_list(&rec_list);
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
@ -382,6 +409,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.c open-iscsi-2.0-872-
|
||||
+
|
||||
+int login_helper(void *data, node_rec_t *rec)
|
||||
+{
|
||||
+ char *iface = (char*)data;
|
||||
+ if (strcmp(iface, rec->iface.name))
|
||||
+ /* different iface, skip it */
|
||||
+ return -1;
|
||||
+
|
||||
+ int rc = iscsid_req_by_rec(MGMT_IPC_SESSION_LOGIN, rec);
|
||||
+ if (rc) {
|
||||
+ iscsi_err_print_msg(rc);
|
||||
@ -395,7 +427,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.c open-iscsi-2.0-872-
|
||||
+{
|
||||
+ int nr_found = 0, rc;
|
||||
+
|
||||
+ CHECK(idbm_for_each_iface(&nr_found, NULL, login_helper,
|
||||
+ CHECK(idbm_for_each_iface(&nr_found, (void*)node->iface, login_helper,
|
||||
+ (char *)node->name, node->tpgt,
|
||||
+ (char *)node->address, node->port))
|
||||
+ if (nr_found == 0) {
|
||||
@ -582,9 +614,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.c open-iscsi-2.0-872-
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.doxy open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/libiscsi.doxy
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.doxy 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/libiscsi.doxy 2011-01-31 02:35:29.000000000 -0600
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.doxy open-iscsi-2.0-872-rc4-bnx2i.build/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.build/libiscsi/libiscsi.doxy 2011-08-14 16:46:24.000000000 -0500
|
||||
@@ -0,0 +1,1473 @@
|
||||
+# Doxyfile 1.5.7.1
|
||||
+
|
||||
@ -2059,10 +2091,10 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.doxy open-iscsi-2.0-8
|
||||
+# used. If set to NO the values of all tags below this one will be ignored.
|
||||
+
|
||||
+SEARCHENGINE = NO
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.h open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/libiscsi.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.h 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/libiscsi.h 2011-01-31 02:35:29.000000000 -0600
|
||||
@@ -0,0 +1,343 @@
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.h open-iscsi-2.0-872-rc4-bnx2i.build/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.build/libiscsi/libiscsi.h 2011-08-14 16:53:58.000000000 -0500
|
||||
@@ -0,0 +1,344 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
+ *
|
||||
@ -2133,6 +2165,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.h open-iscsi-2.0-872-
|
||||
+ get used anywhere, so we keep things simple and assume one connection */
|
||||
+ char address[NI_MAXHOST] /** Portal hostname or IP-address. */;
|
||||
+ int port /** Portal port number. */;
|
||||
+ char iface[LIBISCSI_VALUE_MAXLEN] /** Interface to connect through. */;
|
||||
+};
|
||||
+
|
||||
+/** \brief libiscsi CHAP authentication information struct
|
||||
@ -2406,9 +2439,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/libiscsi.h open-iscsi-2.0-872-
|
||||
+#endif /* __cplusplus */
|
||||
+
|
||||
+#endif
|
||||
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/libiscsi/Makefile 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/Makefile 2011-01-31 03:03:47.000000000 -0600
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/Makefile open-iscsi-2.0-872-rc4-bnx2i.build/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.build/libiscsi/Makefile 2011-08-14 16:46:24.000000000 -0500
|
||||
@@ -0,0 +1,61 @@
|
||||
+# This Makefile will work only with GNU make.
|
||||
+
|
||||
@ -2425,7 +2458,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/Makefile open-iscsi-2.0-872-rc
|
||||
+
|
||||
+COMMON_SRCS = sysdeps.o
|
||||
+# 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 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 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
|
||||
+
|
||||
+# sources shared with the userspace utils, note we build these separately
|
||||
@ -2471,10 +2504,10 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/Makefile open-iscsi-2.0-872-rc
|
||||
+ gcc $(CFLAGS) -M `ls *.c` > .depend
|
||||
+
|
||||
+-include .depend ../usr/.depend
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/pylibiscsi.c open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/pylibiscsi.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/libiscsi/pylibiscsi.c 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/pylibiscsi.c 2011-01-31 02:35:29.000000000 -0600
|
||||
@@ -0,0 +1,624 @@
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/pylibiscsi.c open-iscsi-2.0-872-rc4-bnx2i.build/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.build/libiscsi/pylibiscsi.c 2011-08-14 16:53:58.000000000 -0500
|
||||
@@ -0,0 +1,638 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
+ *
|
||||
@ -2675,25 +2708,27 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/pylibiscsi.c open-iscsi-2.0-87
|
||||
+static int PyIscsiNode_init(PyObject *self, PyObject *args, PyObject *kwds)
|
||||
+{
|
||||
+ PyIscsiNode *node = (PyIscsiNode *)self;
|
||||
+ char *kwlist[] = {"name", "tpgt", "address", "port", NULL};
|
||||
+ const char *name = NULL, *address = NULL;
|
||||
+ char *kwlist[] = {"name", "tpgt", "address", "port", "iface", NULL};
|
||||
+ const char *name = NULL, *address = NULL, *iface = NULL;
|
||||
+ int tpgt = -1, port = 3260;
|
||||
+
|
||||
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|isi:node.__init__",
|
||||
+ kwlist, &name, &tpgt, &address, &port))
|
||||
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|isis:node.__init__",
|
||||
+ kwlist, &name, &tpgt, &address,
|
||||
+ &port, &iface))
|
||||
+ return -1;
|
||||
+ if (address == NULL) {
|
||||
+ PyErr_SetString(PyExc_ValueError, "address not set");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (check_string(name) || check_string(address))
|
||||
+ if (check_string(name) || check_string(address) || check_string(iface))
|
||||
+ return -1;
|
||||
+
|
||||
+ strcpy(node->node.name, name);
|
||||
+ node->node.tpgt = tpgt;
|
||||
+ strcpy(node->node.address, address);
|
||||
+ node->node.port = port;
|
||||
+
|
||||
+ strcpy(node->node.iface, iface);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
@ -2710,6 +2745,8 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/pylibiscsi.c open-iscsi-2.0-87
|
||||
+ return PyString_FromString(node->node.address);
|
||||
+ } else if (!strcmp(attr, "port")) {
|
||||
+ return PyInt_FromLong(node->node.port);
|
||||
+ } else if (!strcmp(attr, "iface")) {
|
||||
+ return PyString_FromString(node->node.iface);
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
@ -2737,6 +2774,10 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/pylibiscsi.c open-iscsi-2.0-87
|
||||
+ if (!PyArg_Parse(value, "i", &i))
|
||||
+ return -1;
|
||||
+ node->node.port = i;
|
||||
+ } else if (!strcmp(attr, "iface")) {
|
||||
+ if (!PyArg_Parse(value, "s", &str) || check_string(str))
|
||||
+ return -1;
|
||||
+ strcpy(node->node.iface, str);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
@ -2764,6 +2805,10 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/pylibiscsi.c open-iscsi-2.0-87
|
||||
+ if (self->node.port > other->node.port)
|
||||
+ return -1;
|
||||
+
|
||||
+ res = strcmp(self->node.iface, other->node.iface);
|
||||
+ if (res)
|
||||
+ return res;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
@ -2917,6 +2962,8 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/pylibiscsi.c open-iscsi-2.0-87
|
||||
+ "address", "address"},
|
||||
+ {"port", (getter)PyIscsiNode_get, (setter)PyIscsiNode_set,
|
||||
+ "port", "port"},
|
||||
+ {"iface", (getter)PyIscsiNode_get, (setter)PyIscsiNode_set,
|
||||
+ "iface", "iface"},
|
||||
+ {NULL}
|
||||
+};
|
||||
+
|
||||
@ -3099,9 +3146,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/pylibiscsi.c open-iscsi-2.0-87
|
||||
+ Py_INCREF(&PyIscsiNode_Type);
|
||||
+ PyModule_AddObject(m, "node", (PyObject *) &PyIscsiNode_Type);
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/setup.py open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/setup.py
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/libiscsi/setup.py 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/setup.py 2011-01-31 02:35:29.000000000 -0600
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/setup.py open-iscsi-2.0-872-rc4-bnx2i.build/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.build/libiscsi/setup.py 2011-08-14 16:46:24.000000000 -0500
|
||||
@@ -0,0 +1,9 @@
|
||||
+from distutils.core import setup, Extension
|
||||
+
|
||||
@ -3112,9 +3159,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/setup.py open-iscsi-2.0-872-rc
|
||||
+
|
||||
+setup (name = 'PyIscsi',version = '1.0',
|
||||
+ description = 'libiscsi python bindings', ext_modules = [module1])
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/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/libiscsi/tests/test_discovery_firmware.c 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_discovery_firmware.c 2011-01-31 02:35:29.000000000 -0600
|
||||
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
|
||||
--- 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
|
||||
@@ -0,0 +1,53 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3169,9 +3216,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/tests/test_discovery_firmware.
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/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/libiscsi/tests/test_discovery_sendtargets.c 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_discovery_sendtargets.c 2011-01-31 02:35:29.000000000 -0600
|
||||
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
|
||||
--- 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
|
||||
@@ -0,0 +1,60 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3233,9 +3280,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/tests/test_discovery_sendtarge
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/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/libiscsi/tests/test_get_auth.c 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_get_auth.c 2011-01-31 02:35:29.000000000 -0600
|
||||
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
|
||||
--- 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
|
||||
@@ -0,0 +1,70 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3307,9 +3354,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/tests/test_get_auth.c open-isc
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/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/libiscsi/tests/test_get_initiator_name.c 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_get_initiator_name.c 2011-01-31 02:35:29.000000000 -0600
|
||||
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
|
||||
--- 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
|
||||
@@ -0,0 +1,38 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3349,9 +3396,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/tests/test_get_initiator_name.
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/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/libiscsi/tests/test_get_network_config.c 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_get_network_config.c 2011-01-31 02:35:29.000000000 -0600
|
||||
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
|
||||
--- 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
|
||||
@@ -0,0 +1,45 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3398,9 +3445,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/tests/test_get_network_config.
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/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/libiscsi/tests/test_login.c 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_login.c 2011-01-31 02:35:29.000000000 -0600
|
||||
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
|
||||
--- 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
|
||||
@@ -0,0 +1,52 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3454,9 +3501,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/tests/test_login.c open-iscsi-
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/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/libiscsi/tests/test_logout.c 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_logout.c 2011-01-31 02:35:29.000000000 -0600
|
||||
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
|
||||
--- 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
|
||||
@@ -0,0 +1,51 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3509,9 +3556,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/tests/test_logout.c open-iscsi
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/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/libiscsi/tests/test_params.c 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_params.c 2011-01-31 02:35:29.000000000 -0600
|
||||
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
|
||||
--- 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
|
||||
@@ -0,0 +1,103 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3616,9 +3663,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/tests/test_params.c open-iscsi
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/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/libiscsi/tests/test_set_auth.c 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/tests/test_set_auth.c 2011-01-31 02:35:29.000000000 -0600
|
||||
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
|
||||
--- 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
|
||||
@@ -0,0 +1,58 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3678,9 +3725,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/libiscsi/tests/test_set_auth.c open-isc
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/Makefile open-iscsi-2.0-872-rc4-bnx2i.work/Makefile
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/Makefile 2011-01-31 02:35:12.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/Makefile 2011-01-31 02:35:29.000000000 -0600
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/Makefile open-iscsi-2.0-872-rc4-bnx2i.build/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.build/Makefile 2011-08-14 16:46:24.000000000 -0500
|
||||
@@ -32,6 +32,7 @@ user: ;
|
||||
$(MAKE) -C utils/fwparam_ibft
|
||||
$(MAKE) -C usr
|
||||
@ -3697,9 +3744,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/Makefile open-iscsi-2.0-872-rc4-bnx2i.w
|
||||
$(MAKE) -C utils/sysdeps clean
|
||||
$(MAKE) -C utils/fwparam_ibft clean
|
||||
$(MAKE) -C utils clean
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/discovery.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/discovery.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/discovery.c 2011-01-31 02:35:13.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/discovery.c 2011-01-31 02:57:55.000000000 -0600
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/discovery.c open-iscsi-2.0-872-rc4-bnx2i.build/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.build/usr/discovery.c 2011-08-14 16:46:24.000000000 -0500
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "types.h"
|
||||
#include "iscsi_proto.h"
|
||||
@ -3728,7 +3775,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/discovery.c open-iscsi-2.0-872-rc4-
|
||||
void discovery_isns_free_servername(void)
|
||||
{
|
||||
if (isns_config.ic_server_name)
|
||||
@@ -371,6 +375,7 @@ retry:
|
||||
@@ -377,6 +381,7 @@ retry:
|
||||
discovery_isns_free_servername();
|
||||
return rc;
|
||||
}
|
||||
@ -3736,10 +3783,10 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/discovery.c open-iscsi-2.0-872-rc4-
|
||||
|
||||
int discovery_fw(void *data, struct iface_rec *iface,
|
||||
struct list_head *rec_list)
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.c 2011-01-31 02:35:13.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.c 2011-01-31 02:47:52.000000000 -0600
|
||||
@@ -1214,9 +1214,9 @@ int idbm_print_all_discovery(int info_le
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.c open-iscsi-2.0-872-rc4-bnx2i.build/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.build/usr/idbm.c 2011-08-14 16:46:24.000000000 -0500
|
||||
@@ -1274,9 +1274,9 @@ int idbm_print_all_discovery(int info_le
|
||||
* 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.
|
||||
*/
|
||||
@ -3752,10 +3799,10 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.c open-iscsi-2.0-872-rc4-bnx2i
|
||||
{
|
||||
DIR *iface_dirfd;
|
||||
struct dirent *iface_dent;
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.h 2011-01-31 02:35:13.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.h 2011-01-31 02:48:39.000000000 -0600
|
||||
@@ -96,6 +96,9 @@ struct rec_op_data {
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.h open-iscsi-2.0-872-rc4-bnx2i.build/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.build/usr/idbm.h 2011-08-14 16:46:24.000000000 -0500
|
||||
@@ -98,6 +98,9 @@ struct rec_op_data {
|
||||
node_rec_t *match_rec;
|
||||
idbm_iface_op_fn *fn;
|
||||
};
|
||||
@ -3765,20 +3812,20 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.h open-iscsi-2.0-872-rc4-bnx2i
|
||||
extern int idbm_for_each_portal(int *found, void *data,
|
||||
idbm_portal_op_fn *fn, char *targetname);
|
||||
extern int idbm_for_each_node(int *found, void *data,
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_ipc.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_ipc.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_ipc.h 2011-01-31 02:35:13.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_ipc.h 2011-01-31 02:35:29.000000000 -0600
|
||||
@@ -131,4 +131,6 @@ struct iscsi_ipc {
|
||||
int (*recv_pdu_end) (struct iscsi_conn *conn);
|
||||
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
|
||||
--- 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.build/usr/iscsi_ipc.h 2011-08-14 16:46:24.000000000 -0500
|
||||
@@ -136,4 +136,6 @@ struct iscsi_ipc {
|
||||
int (*recv_conn_state) (struct iscsi_conn *conn, uint32_t *state);
|
||||
};
|
||||
|
||||
+struct iscsi_ipc *ipc;
|
||||
+
|
||||
#endif /* ISCSI_IPC_H */
|
||||
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/usr/Makefile 2011-01-31 02:35:13.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/Makefile 2011-01-31 02:57:55.000000000 -0600
|
||||
@@ -31,7 +31,7 @@ endif
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/Makefile open-iscsi-2.0-872-rc4-bnx2i.build/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.build/usr/Makefile 2011-08-14 16:46:24.000000000 -0500
|
||||
@@ -33,7 +33,7 @@ endif
|
||||
OPTFLAGS ?= -O2 -g
|
||||
WARNFLAGS ?= -Wall -Wstrict-prototypes
|
||||
CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -I../include -I. -I../utils/open-isns \
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/brcm_iscsi_uio/docs/brcm_iscsiuio.8 open-iscsi-2.0-872-rc4-bnx2i.work/brcm_iscsi_uio/docs/brcm_iscsiuio.8
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/brcm_iscsi_uio/docs/brcm_iscsiuio.8 2011-01-31 19:38:19.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/brcm_iscsi_uio/docs/brcm_iscsiuio.8 2011-01-31 19:38:44.000000000 -0600
|
||||
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
|
||||
@ -8,7 +8,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i/brcm_iscsi_uio/docs/brcm_iscsiuio.8 open
|
||||
+.PP
|
||||
+.TP
|
||||
+.BI -p <pidfile>
|
||||
+Use pidfile (default /var/run/brcm_iscsiuio.pid )
|
||||
+Use pidfile (default /var/run/iscsiuio.pid )
|
||||
+.PP
|
||||
+.TP
|
||||
+.BI -h
|
||||
|
@ -1,614 +0,0 @@
|
||||
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/libiscsi/Makefile 2011-02-03 23:56:36.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/Makefile 2011-02-03 23:57:29.000000000 -0600
|
||||
@@ -13,7 +13,7 @@ TESTS += tests/test_set_auth tests/test_
|
||||
|
||||
COMMON_SRCS = sysdeps.o
|
||||
# sources shared between iscsid, iscsiadm and iscsistart
|
||||
-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 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 = dcb_app.o 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 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
|
||||
|
||||
# sources shared with the userspace utils, note we build these separately
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/dcb_app.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/dcb_app.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/dcb_app.c 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/dcb_app.c 2011-02-03 23:54:11.000000000 -0600
|
||||
@@ -0,0 +1,246 @@
|
||||
+/*******************************************************************************
|
||||
+
|
||||
+ DCB application support
|
||||
+ Copyright(c) 2007-2010 Intel Corporation.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify it
|
||||
+ under the terms and conditions of the GNU General Public License,
|
||||
+ version 2, as published by the Free Software Foundation.
|
||||
+
|
||||
+ This program is distributed in the hope 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.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License along with
|
||||
+ this program; if not, write to the Free Software Foundation, Inc.,
|
||||
+ 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+
|
||||
+ The full GNU General Public License is included in this distribution in
|
||||
+ the file called "COPYING".
|
||||
+
|
||||
+ Contact Information:
|
||||
+ e1000-eedc Mailing List <e1000-eedc@lists.sourceforge.net>
|
||||
+ Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
+
|
||||
+*******************************************************************************/
|
||||
+
|
||||
+#include <unistd.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+#include <errno.h>
|
||||
+#include <asm/errno.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <net/if.h>
|
||||
+#include <linux/netlink.h>
|
||||
+#include <linux/rtnetlink.h>
|
||||
+#include <linux/dcbnl.h>
|
||||
+#include "dcb_app.h"
|
||||
+#include "sysfs.h"
|
||||
+
|
||||
+#define NLA_DATA(nla) ((void *)((char*)(nla) + NLA_HDRLEN))
|
||||
+
|
||||
+/* Maximum size of response requested or message sent */
|
||||
+#define MAX_MSG_SIZE 1024
|
||||
+
|
||||
+static struct nlmsghdr *start_dcbmsg(__u16 msg_type, __u8 arg)
|
||||
+{
|
||||
+ struct nlmsghdr *nlh;
|
||||
+ struct dcbmsg *d;
|
||||
+
|
||||
+ nlh = malloc(MAX_MSG_SIZE);
|
||||
+ if (!nlh)
|
||||
+ return NULL;
|
||||
+ memset(nlh, 0, MAX_MSG_SIZE);
|
||||
+ nlh->nlmsg_type = msg_type;
|
||||
+ nlh->nlmsg_flags = NLM_F_REQUEST;
|
||||
+ nlh->nlmsg_seq = 0;
|
||||
+ nlh->nlmsg_pid = getpid();
|
||||
+ if (msg_type != RTM_GETDCB) {
|
||||
+ free(nlh);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct dcbmsg));
|
||||
+ d = NLMSG_DATA(nlh);
|
||||
+ d->cmd = arg;
|
||||
+ d->dcb_family = AF_UNSPEC;
|
||||
+ d->dcb_pad = 0;
|
||||
+
|
||||
+ return nlh;
|
||||
+}
|
||||
+
|
||||
+static struct rtattr *add_rta(struct nlmsghdr *nlh, __u16 rta_type,
|
||||
+ void *attr, __u16 rta_len)
|
||||
+{
|
||||
+ struct rtattr *rta;
|
||||
+
|
||||
+ rta = (struct rtattr *)((char *)nlh + nlh->nlmsg_len);
|
||||
+ rta->rta_type = rta_type;
|
||||
+ rta->rta_len = rta_len + NLA_HDRLEN;
|
||||
+ if (attr)
|
||||
+ memcpy(NLA_DATA(rta), attr, rta_len);
|
||||
+ nlh->nlmsg_len += NLMSG_ALIGN(rta->rta_len);
|
||||
+
|
||||
+ return rta;
|
||||
+}
|
||||
+
|
||||
+static int dcbnl_send_msg(int nl_sd, struct nlmsghdr *nlh)
|
||||
+{
|
||||
+ struct sockaddr_nl nladdr;
|
||||
+ void *buf = nlh;
|
||||
+ int r, len = nlh->nlmsg_len;
|
||||
+
|
||||
+ memset(&nladdr, 0, sizeof(nladdr));
|
||||
+ nladdr.nl_family = AF_NETLINK;
|
||||
+
|
||||
+ do {
|
||||
+ r = sendto(nl_sd, buf, len, 0, (struct sockaddr *)&nladdr,
|
||||
+ sizeof(nladdr));
|
||||
+ } while (r < 0 && errno == EINTR);
|
||||
+
|
||||
+ if (r < 0)
|
||||
+ return 1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct nlmsghdr *dcbnl_get_msg(int nl_sd)
|
||||
+{
|
||||
+ struct nlmsghdr *nlh;
|
||||
+ int len;
|
||||
+
|
||||
+ nlh = malloc(MAX_MSG_SIZE);
|
||||
+ if (!nlh)
|
||||
+ return NULL;
|
||||
+ memset(nlh, 0, MAX_MSG_SIZE);
|
||||
+
|
||||
+ len = recv(nl_sd, (void *)nlh, MAX_MSG_SIZE, 0);
|
||||
+
|
||||
+ if (len < 0 || nlh->nlmsg_type == NLMSG_ERROR ||
|
||||
+ !NLMSG_OK(nlh, (unsigned int)len)) {
|
||||
+ free(nlh);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ return nlh;
|
||||
+}
|
||||
+
|
||||
+static int get_app_cfg(const char *ifname, __u8 req_idtype, __u16 req_id)
|
||||
+{
|
||||
+ struct nlmsghdr *nlh;
|
||||
+ struct dcbmsg *d;
|
||||
+ struct rtattr *rta_parent, *rta_child;
|
||||
+ int rval = 0;
|
||||
+ int nl_sd;
|
||||
+ unsigned int seq;
|
||||
+ __u8 idtype;
|
||||
+ __u16 id;
|
||||
+
|
||||
+ nlh = start_dcbmsg(RTM_GETDCB, DCB_CMD_GAPP);
|
||||
+ if (!nlh)
|
||||
+ return -EIO;
|
||||
+
|
||||
+ seq = nlh->nlmsg_seq;
|
||||
+ add_rta(nlh, DCB_ATTR_IFNAME, (void *)ifname, strlen(ifname) + 1);
|
||||
+ rta_parent = add_rta(nlh, DCB_ATTR_APP, NULL, 0);
|
||||
+
|
||||
+ rta_child = add_rta(nlh, DCB_APP_ATTR_IDTYPE,
|
||||
+ (void *)&req_idtype, sizeof(__u8));
|
||||
+ rta_parent->rta_len += NLA_ALIGN(rta_child->rta_len);
|
||||
+
|
||||
+ rta_child = add_rta(nlh, DCB_APP_ATTR_ID,
|
||||
+ (void *)&req_id, sizeof(__u16));
|
||||
+ rta_parent->rta_len += NLA_ALIGN(rta_child->rta_len);
|
||||
+
|
||||
+ nl_sd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
|
||||
+ if (nl_sd < 0)
|
||||
+ return nl_sd;
|
||||
+
|
||||
+ rval = dcbnl_send_msg(nl_sd, nlh);
|
||||
+ free(nlh);
|
||||
+ if (rval) {
|
||||
+ close(nl_sd);
|
||||
+ return -EIO;
|
||||
+ }
|
||||
+
|
||||
+ nlh = dcbnl_get_msg(nl_sd);
|
||||
+ close(nl_sd);
|
||||
+ if (!nlh)
|
||||
+ return -EIO;
|
||||
+
|
||||
+ d = (struct dcbmsg *)NLMSG_DATA(nlh);
|
||||
+ rta_parent = (struct rtattr *)(((char *)d) +
|
||||
+ NLMSG_ALIGN(sizeof(struct dcbmsg)));
|
||||
+
|
||||
+ if (d->cmd != DCB_CMD_GAPP) {
|
||||
+ rval = -EIO;
|
||||
+ goto get_error;
|
||||
+ }
|
||||
+ if (rta_parent->rta_type != DCB_ATTR_APP) {
|
||||
+ rval = -EIO;
|
||||
+ goto get_error;
|
||||
+ }
|
||||
+
|
||||
+ rta_child = NLA_DATA(rta_parent);
|
||||
+ rta_parent = (struct rtattr *)((char *)rta_parent +
|
||||
+ NLMSG_ALIGN(rta_parent->rta_len));
|
||||
+
|
||||
+ idtype = *(__u8 *)NLA_DATA(rta_child);
|
||||
+ rta_child = (struct rtattr *)((char *)rta_child +
|
||||
+ NLMSG_ALIGN(rta_child->rta_len));
|
||||
+ if (idtype != req_idtype) {
|
||||
+ rval = -EIO;
|
||||
+ goto get_error;
|
||||
+ }
|
||||
+
|
||||
+ id = *(__u16 *)NLA_DATA(rta_child);
|
||||
+ rta_child = (struct rtattr *)((char *)rta_child +
|
||||
+ NLMSG_ALIGN(rta_child->rta_len));
|
||||
+ if (id != req_id) {
|
||||
+ rval = -EIO;
|
||||
+ goto get_error;
|
||||
+ }
|
||||
+
|
||||
+ rval = *(__u8 *)NLA_DATA(rta_child);
|
||||
+ rta_child = (struct rtattr *)((char *)rta_child +
|
||||
+ NLMSG_ALIGN(rta_child->rta_len));
|
||||
+
|
||||
+get_error:
|
||||
+ free(nlh);
|
||||
+ return rval;
|
||||
+}
|
||||
+
|
||||
+static int get_link_ifname(const char *ifname, char *link_ifname)
|
||||
+{
|
||||
+ int ifindex;
|
||||
+
|
||||
+ if (sysfs_get_int(ifname, "net", "iflink", &ifindex))
|
||||
+ return -EIO;
|
||||
+
|
||||
+ if (!if_indextoname(ifindex, link_ifname))
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int get_dcb_app_pri_by_port(const char *ifname, int port)
|
||||
+{
|
||||
+ char link_ifname[IFNAMSIZ];
|
||||
+
|
||||
+ if (get_link_ifname(ifname, link_ifname))
|
||||
+ return 0;
|
||||
+
|
||||
+ return get_app_cfg(link_ifname, DCB_APP_IDTYPE_PORTNUM, port);
|
||||
+}
|
||||
+
|
||||
+int get_dcb_app_pri_by_ethtype(const char *ifname, int ethtype)
|
||||
+{
|
||||
+ char link_ifname[IFNAMSIZ];
|
||||
+
|
||||
+ if (get_link_ifname(ifname, link_ifname))
|
||||
+ return 0;
|
||||
+
|
||||
+ return get_app_cfg(link_ifname, DCB_APP_IDTYPE_ETHTYPE, ethtype);
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/dcb_app.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/dcb_app.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/dcb_app.h 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/dcb_app.h 2011-02-03 23:54:07.000000000 -0600
|
||||
@@ -0,0 +1,34 @@
|
||||
+/*******************************************************************************
|
||||
+
|
||||
+ DCB application support
|
||||
+ Copyright(c) 2007-2010 Intel Corporation.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify it
|
||||
+ under the terms and conditions of the GNU General Public License,
|
||||
+ version 2, as published by the Free Software Foundation.
|
||||
+
|
||||
+ This program is distributed in the hope 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.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License along with
|
||||
+ this program; if not, write to the Free Software Foundation, Inc.,
|
||||
+ 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+
|
||||
+ The full GNU General Public License is included in this distribution in
|
||||
+ the file called "COPYING".
|
||||
+
|
||||
+ Contact Information:
|
||||
+ e1000-eedc Mailing List <e1000-eedc@lists.sourceforge.net>
|
||||
+ Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
+
|
||||
+*******************************************************************************/
|
||||
+
|
||||
+#ifndef _DCB_APP_H_
|
||||
+#define _DCB_APP_H_
|
||||
+
|
||||
+int get_dcb_app_pri_by_port(const char *iface, int port);
|
||||
+int get_dcb_app_pri_by_ethtype(const char *iface, int ethtype);
|
||||
+
|
||||
+#endif /* _DCB_APP_H_ */
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/io.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/io.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/io.c 2011-02-04 00:02:19.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/io.c 2011-02-03 23:54:15.000000000 -0600
|
||||
@@ -26,11 +26,14 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <ifaddrs.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "iscsi_proto.h"
|
||||
+#include "iscsi_settings.h"
|
||||
#include "initiator.h"
|
||||
#include "iscsi_ipc.h"
|
||||
#include "log.h"
|
||||
@@ -38,6 +41,7 @@
|
||||
#include "idbm.h"
|
||||
#include "iface.h"
|
||||
#include "sysdeps.h"
|
||||
+#include "dcb_app.h"
|
||||
|
||||
#define LOG_CONN_CLOSED(conn) \
|
||||
do { \
|
||||
@@ -53,6 +57,13 @@ do { \
|
||||
log_error("Connection to Discovery Address %s failed", conn->host); \
|
||||
} while (0)
|
||||
|
||||
+union sockaddr_u {
|
||||
+ struct sockaddr_storage ss;
|
||||
+ struct sockaddr sa;
|
||||
+ struct sockaddr_in si;
|
||||
+ struct sockaddr_in6 si6;
|
||||
+};
|
||||
+
|
||||
static int timedout;
|
||||
|
||||
static void
|
||||
@@ -76,6 +87,90 @@ set_non_blocking(int fd)
|
||||
|
||||
}
|
||||
|
||||
+static int select_priority(struct iscsi_conn *conn, int pri_mask)
|
||||
+{
|
||||
+ int msk;
|
||||
+
|
||||
+ if (!pri_mask)
|
||||
+ return 0;
|
||||
+
|
||||
+ /*
|
||||
+ * TODO: Configure priority selection from the mask
|
||||
+ * For now, just always take the highest
|
||||
+ */
|
||||
+
|
||||
+ /* Find highest bit set */
|
||||
+ while ((msk = pri_mask & (pri_mask - 1)))
|
||||
+ pri_mask = msk;
|
||||
+
|
||||
+ return ffs(pri_mask) - 1;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+inet_cmp_addr(const union sockaddr_u *s1, const union sockaddr_u *s2)
|
||||
+{
|
||||
+ const struct sockaddr_in *si1 = &s1->si;
|
||||
+ const struct sockaddr_in *si2 = &s2->si;
|
||||
+
|
||||
+ return si1->sin_addr.s_addr != si2->sin_addr.s_addr;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+inet6_cmp_addr(const union sockaddr_u *s1, const union sockaddr_u *s2)
|
||||
+{
|
||||
+ const struct sockaddr_in6 *si1 = &s1->si6;
|
||||
+ const struct sockaddr_in6 *si2 = &s2->si6;
|
||||
+
|
||||
+ return memcmp(&si1->sin6_addr, &si2->sin6_addr, sizeof(si1->sin6_addr));
|
||||
+}
|
||||
+
|
||||
+static char *
|
||||
+find_ifname(const struct ifaddrs *ifa, const union sockaddr_u *ss)
|
||||
+{
|
||||
+ for (; ifa; ifa = ifa->ifa_next) {
|
||||
+ if (ss->ss.ss_family != ifa->ifa_addr->sa_family)
|
||||
+ continue;
|
||||
+ switch (ss->ss.ss_family) {
|
||||
+ case AF_INET:
|
||||
+ if (inet_cmp_addr(ss, (union sockaddr_u *)ifa->ifa_addr) == 0)
|
||||
+ return ifa->ifa_name;
|
||||
+ break;
|
||||
+ case AF_INET6:
|
||||
+ if (inet6_cmp_addr(ss, (union sockaddr_u *)ifa->ifa_addr) == 0)
|
||||
+ return ifa->ifa_name;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static void set_dcb_priority(struct iscsi_conn *conn, const char *devname)
|
||||
+{
|
||||
+ int pri_mask = 0;
|
||||
+
|
||||
+ pri_mask = get_dcb_app_pri_by_port(devname, ISCSI_DEFAULT_PORT);
|
||||
+ if (pri_mask < 0)
|
||||
+ log_debug(2, "Getting priority for %s returned %d",
|
||||
+ devname, pri_mask);
|
||||
+ else if (pri_mask == 0)
|
||||
+ log_debug(2, "No priority for %s", devname);
|
||||
+ else {
|
||||
+ int pri = select_priority(conn, pri_mask);
|
||||
+ int rc;
|
||||
+
|
||||
+ log_debug(1, "Setting socket %d priority to %d",
|
||||
+ conn->socket_fd, pri);
|
||||
+ rc = setsockopt(conn->socket_fd, SOL_SOCKET,
|
||||
+ SO_PRIORITY, &pri, sizeof(pri));
|
||||
+ if (rc < 0) {
|
||||
+ log_warning("Setting socket %d priority to %d failed "
|
||||
+ "with errno %d", conn->socket_fd,
|
||||
+ pri, errno);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
#if 0
|
||||
/* not used by anyone */
|
||||
static int get_hwaddress_from_netdev(char *netdev, char *hwaddress)
|
||||
@@ -320,6 +415,10 @@ iscsi_io_tcp_connect(iscsi_conn_t *conn,
|
||||
log_debug(1, "connecting to %s:%s", conn->host, serv);
|
||||
if (non_blocking)
|
||||
set_non_blocking(conn->socket_fd);
|
||||
+
|
||||
+ if (conn->session->netdev[0])
|
||||
+ set_dcb_priority(conn, conn->session->netdev);
|
||||
+
|
||||
rc = connect(conn->socket_fd, (struct sockaddr *) ss, sizeof (*ss));
|
||||
return rc;
|
||||
}
|
||||
@@ -368,8 +467,9 @@ iscsi_io_tcp_poll(iscsi_conn_t *conn, in
|
||||
}
|
||||
|
||||
len = sizeof(ss);
|
||||
- if (log_level > 0 &&
|
||||
- getsockname(conn->socket_fd, (struct sockaddr *) &ss, &len) >= 0) {
|
||||
+ if (log_level > 0 || !conn->session->netdev)
|
||||
+ rc = getsockname(conn->socket_fd, (struct sockaddr *)&ss, &len);
|
||||
+ if (log_level > 0 && rc >= 0) {
|
||||
getnameinfo((struct sockaddr *) &conn->saddr,
|
||||
sizeof(conn->saddr), conn->host,
|
||||
sizeof(conn->host), serv, sizeof(serv),
|
||||
@@ -381,6 +481,22 @@ iscsi_io_tcp_poll(iscsi_conn_t *conn, in
|
||||
log_debug(1, "connected local port %s to %s:%s",
|
||||
lserv, conn->host, serv);
|
||||
}
|
||||
+
|
||||
+ if (!conn->session->netdev[0] && rc >= 0) {
|
||||
+ struct ifaddrs *ifa;
|
||||
+ char *ifname;
|
||||
+
|
||||
+ rc = getifaddrs(&ifa);
|
||||
+ if (rc < 0)
|
||||
+ log_error("getifaddrs failed with %d\n", errno);
|
||||
+ else {
|
||||
+ ifname = find_ifname(ifa, (union sockaddr_u *)&ss);
|
||||
+ if (ifname)
|
||||
+ set_dcb_priority(conn, ifname);
|
||||
+ freeifaddrs(ifa);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return 1;
|
||||
}
|
||||
|
||||
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/usr/Makefile 2011-02-04 00:02:19.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/Makefile 2011-02-03 23:54:31.000000000 -0600
|
||||
@@ -21,10 +21,12 @@ ifeq ($(OSNAME),Linux)
|
||||
endif
|
||||
endif
|
||||
IPC_OBJ=netlink.o
|
||||
+DCB_OBJ=dcb_app.o
|
||||
else
|
||||
ifeq ($(OSNAME),FreeBSD)
|
||||
IPC_CFLAGS=
|
||||
IPC_OBJ=ioctl.o
|
||||
+DCB_OBJ=
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -40,7 +42,7 @@ SYSDEPS_SRCS = $(wildcard ../utils/sysde
|
||||
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 \
|
||||
iscsi_net_util.o iscsid_req.o transport.o cxgbi.o be2iscsi.o \
|
||||
- initiator_common.o iscsi_err.o uip_mgmt_ipc.o $(IPC_OBJ) $(SYSDEPS_SRCS)
|
||||
+ initiator_common.o iscsi_err.o uip_mgmt_ipc.o $(DCB_OBJ) $(IPC_OBJ) $(SYSDEPS_SRCS)
|
||||
# core initiator files
|
||||
INITIATOR_SRCS = initiator.o scsi.o actor.o event_poll.o mgmt_ipc.o
|
||||
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/Makefile.orig open-iscsi-2.0-872-rc4-bnx2i.work/usr/Makefile.orig
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/Makefile.orig 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/Makefile.orig 2011-02-03 23:53:53.000000000 -0600
|
||||
@@ -0,0 +1,71 @@
|
||||
+# This Makefile will work only with GNU make.
|
||||
+
|
||||
+OSNAME=$(shell uname -s)
|
||||
+
|
||||
+# allow users to override these
|
||||
+# eg to compile for a kernel that you aren't currently running
|
||||
+KERNELRELEASE ?= $(shell uname -r)
|
||||
+KSRC ?= /lib/modules/$(KERNELRELEASE)/build
|
||||
+
|
||||
+KSUBLEVEL=$(shell cat $(KSRC)/Makefile | awk -F= '/^SUBLEVEL =/ {print $$2}' | \
|
||||
+ sed 's/^[ \t]*//;s/[ \t]*$$//')
|
||||
+
|
||||
+ifeq ($(OSNAME),Linux)
|
||||
+ ifeq ($(KSUBLEVEL),11)
|
||||
+ IPC_CFLAGS=-DNETLINK_ISCSI=12 -D_GNU_SOURCE
|
||||
+ else
|
||||
+ ifeq ($(KSUBLEVEL),12)
|
||||
+ IPC_CFLAGS=-DNETLINK_ISCSI=12 -D_GNU_SOURCE
|
||||
+ else
|
||||
+ IPC_CFLAGS=-DNETLINK_ISCSI=8 -D_GNU_SOURCE
|
||||
+ endif
|
||||
+ endif
|
||||
+IPC_OBJ=netlink.o
|
||||
+else
|
||||
+ifeq ($(OSNAME),FreeBSD)
|
||||
+IPC_CFLAGS=
|
||||
+IPC_OBJ=ioctl.o
|
||||
+endif
|
||||
+endif
|
||||
+
|
||||
+OPTFLAGS ?= -O2 -g
|
||||
+WARNFLAGS ?= -Wall -Wstrict-prototypes
|
||||
+CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -I../include -I. -I../utils/open-isns \
|
||||
+ -D$(OSNAME) $(IPC_CFLAGS) -DISNS_ENABLE
|
||||
+PROGRAMS = iscsid iscsiadm iscsistart
|
||||
+
|
||||
+# libc compat files
|
||||
+SYSDEPS_SRCS = $(wildcard ../utils/sysdeps/*.o)
|
||||
+# sources shared between iscsid, iscsiadm and iscsistart
|
||||
+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 \
|
||||
+ iscsi_net_util.o iscsid_req.o transport.o cxgbi.o be2iscsi.o \
|
||||
+ initiator_common.o iscsi_err.o uip_mgmt_ipc.o $(IPC_OBJ) $(SYSDEPS_SRCS)
|
||||
+# core initiator files
|
||||
+INITIATOR_SRCS = initiator.o scsi.o actor.o event_poll.o mgmt_ipc.o
|
||||
+
|
||||
+# fw boot files
|
||||
+FW_BOOT_SRCS = $(wildcard ../utils/fwparam_ibft/*.o)
|
||||
+
|
||||
+# core discovery files
|
||||
+DISCOVERY_SRCS = $(FW_BOOT_SRCS) strings.o discovery.o
|
||||
+
|
||||
+all: $(PROGRAMS)
|
||||
+
|
||||
+iscsid: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(DISCOVERY_SRCS) \
|
||||
+ iscsid.o session_mgmt.o discoveryd.o
|
||||
+ $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns
|
||||
+
|
||||
+iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o
|
||||
+ $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns
|
||||
+
|
||||
+iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
|
||||
+ iscsistart.o statics.o
|
||||
+ $(CC) $(CFLAGS) $^ -o $@
|
||||
+clean:
|
||||
+ rm -f *.o $(PROGRAMS) .depend $(LIBSYS)
|
||||
+
|
||||
+depend:
|
||||
+ gcc $(CFLAGS) -M `ls *.c` > .depend
|
||||
+
|
||||
+-include .depend
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/sysfs.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/sysfs.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/sysfs.c 2011-02-04 00:02:19.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/sysfs.c 2011-02-03 23:54:03.000000000 -0600
|
||||
@@ -547,7 +547,7 @@ found:
|
||||
}
|
||||
|
||||
|
||||
-char *sysfs_get_value(char *id, char *subsys, char *param)
|
||||
+char *sysfs_get_value(const char *id, char *subsys, char *param)
|
||||
{
|
||||
char devpath[PATH_SIZE];
|
||||
char *sysfs_value;
|
||||
@@ -590,7 +590,7 @@ int sysfs_get_uint(char *id, char *subsy
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int sysfs_get_int(char *id, char *subsys, char *param, int *value)
|
||||
+int sysfs_get_int(const char *id, char *subsys, char *param, int *value)
|
||||
{
|
||||
char *sysfs_value;
|
||||
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/sysfs.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/sysfs.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/sysfs.h 2011-02-04 00:02:19.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/sysfs.h 2011-02-03 23:54:03.000000000 -0600
|
||||
@@ -51,10 +51,10 @@ extern char *sysfs_attr_get_value(const
|
||||
extern int sysfs_resolve_link(char *path, size_t size);
|
||||
extern int sysfs_lookup_devpath_by_subsys_id(char *devpath, size_t len, const char *subsystem, const char *id);
|
||||
|
||||
-extern char *sysfs_get_value(char *id, char *subsys, char *param);
|
||||
+extern char *sysfs_get_value(const char *id, char *subsys, char *param);
|
||||
extern int sysfs_get_uint(char *id, char *subsys, char *param,
|
||||
unsigned int *value);
|
||||
-extern int sysfs_get_int(char *id, char *subsys, char *param, int *value);
|
||||
+extern int sysfs_get_int(const char *id, char *subsys, char *param, int *value);
|
||||
extern int sysfs_get_str(char *id, char *subsys, char *param, char *value,
|
||||
int value_size);
|
||||
extern int sysfs_get_uint64(char *id, char *subsys, char *param,
|
@ -1,39 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/Makefile open-iscsi-2.0-872-rc4-bnx2i.work/Makefile
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/Makefile 2011-04-18 12:50:45.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/Makefile 2011-04-19 21:16:13.000000000 -0500
|
||||
@@ -27,7 +27,7 @@ IFACEFILES = etc/iface.example
|
||||
all: user kernel
|
||||
|
||||
user: ;
|
||||
- cd utils/open-isns; ./configure; $(MAKE)
|
||||
+ cd utils/open-isns; ./configure --with-security=no; $(MAKE)
|
||||
$(MAKE) -C utils/sysdeps
|
||||
$(MAKE) -C utils/fwparam_ibft
|
||||
$(MAKE) -C usr
|
||||
diff -aurp 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/usr/Makefile 2011-04-18 12:50:45.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/Makefile 2011-04-19 21:16:13.000000000 -0500
|
||||
@@ -56,10 +56,10 @@ all: $(PROGRAMS)
|
||||
|
||||
iscsid: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(DISCOVERY_SRCS) \
|
||||
iscsid.o session_mgmt.o discoveryd.o
|
||||
- $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns -lcrypto
|
||||
+ $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns
|
||||
|
||||
iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o
|
||||
- $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns -lcrypto
|
||||
+ $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns
|
||||
|
||||
iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
|
||||
iscsistart.o statics.o
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/Makefile.in open-iscsi-2.0-872-rc4-bnx2i.work/utils/open-isns/Makefile.in
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/Makefile.in 2011-04-18 12:50:45.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/utils/open-isns/Makefile.in 2011-04-19 21:16:13.000000000 -0500
|
||||
@@ -32,7 +32,6 @@ LIBOBJS = server.o \
|
||||
security.o \
|
||||
authblock.o \
|
||||
policy.o \
|
||||
- pki.o \
|
||||
register.o \
|
||||
query.o \
|
||||
getnext.o \
|
@ -1,114 +0,0 @@
|
||||
diff -aurp 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-04-18 12:50:45.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iface.c 2011-04-18 12:51:50.000000000 -0500
|
||||
@@ -788,42 +788,50 @@ void iface_link_ifaces(struct list_head
|
||||
int iface_setup_from_boot_context(struct iface_rec *iface,
|
||||
struct boot_context *context)
|
||||
{
|
||||
+ struct iscsi_transport *t;
|
||||
+ uint32_t hostno;
|
||||
+ int rc;
|
||||
+
|
||||
if (strlen(context->initiatorname))
|
||||
strlcpy(iface->iname, context->initiatorname,
|
||||
sizeof(iface->iname));
|
||||
|
||||
if (strlen(context->scsi_host_name)) {
|
||||
- struct iscsi_transport *t;
|
||||
- uint32_t hostno;
|
||||
-
|
||||
if (sscanf(context->scsi_host_name, "iscsi_boot%u", &hostno) != 1) {
|
||||
log_error("Could not parse %s's host no.",
|
||||
context->scsi_host_name);
|
||||
return 0;
|
||||
}
|
||||
- t = iscsi_sysfs_get_transport_by_hba(hostno);
|
||||
- if (!t) {
|
||||
- log_error("Could not get transport for %s. "
|
||||
- "Make sure the iSCSI driver is loaded.",
|
||||
- context->scsi_host_name);
|
||||
+ } else if (strlen(context->iface)) {
|
||||
+ hostno = iscsi_sysfs_get_host_no_from_hwaddress(context->mac,
|
||||
+ &rc);
|
||||
+ if (rc) {
|
||||
+ /*
|
||||
+ * If the MAC in the boot info does not match a iscsi
|
||||
+ * host then the MAC must be for network card, so boot
|
||||
+ * is not going to be offloaded.
|
||||
+ */
|
||||
+ log_debug(3, "Could not match %s to host\n",
|
||||
+ context->mac);
|
||||
return 0;
|
||||
}
|
||||
|
||||
- log_debug(3, "boot context has %s transport %s",
|
||||
- context->scsi_host_name, t->name);
|
||||
- strcpy(iface->transport_name, t->name);
|
||||
- } else if (strlen(context->iface) &&
|
||||
- (!net_get_transport_name_from_netdev(context->iface,
|
||||
- iface->transport_name))) {
|
||||
- log_debug(3, "boot context has netdev %s",
|
||||
- context->iface);
|
||||
- strlcpy(iface->netdev, context->iface,
|
||||
- sizeof(iface->netdev));
|
||||
+ strlcpy(iface->netdev, context->iface, sizeof(iface->netdev));
|
||||
} else
|
||||
return 0;
|
||||
+
|
||||
/*
|
||||
* set up for access through a offload card.
|
||||
*/
|
||||
+ t = iscsi_sysfs_get_transport_by_hba(hostno);
|
||||
+ if (!t) {
|
||||
+ log_error("Could not get transport for host%u. "
|
||||
+ "Make sure the iSCSI driver is loaded.",
|
||||
+ hostno);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ strcpy(iface->transport_name, t->name);
|
||||
+
|
||||
memset(iface->name, 0, sizeof(iface->name));
|
||||
snprintf(iface->name, sizeof(iface->name), "%s.%s",
|
||||
iface->transport_name, context->mac);
|
||||
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-04-18 12:50:45.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_sysfs.c 2011-04-18 12:51:30.000000000 -0500
|
||||
@@ -332,7 +332,7 @@ static int __get_host_no_from_hwaddress(
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static uint32_t get_host_no_from_hwaddress(char *address, int *rc)
|
||||
+uint32_t iscsi_sysfs_get_host_no_from_hwaddress(char *hwaddress, int *rc)
|
||||
{
|
||||
uint32_t host_no = -1;
|
||||
struct host_info *info;
|
||||
@@ -345,7 +345,7 @@ static uint32_t get_host_no_from_hwaddre
|
||||
*rc = ISCSI_ERR_NOMEM;
|
||||
return -1;
|
||||
}
|
||||
- strcpy(info->iface.hwaddress, address);
|
||||
+ strcpy(info->iface.hwaddress, hwaddress);
|
||||
|
||||
local_rc = iscsi_sysfs_for_each_host(info, &nr_found,
|
||||
__get_host_no_from_hwaddress);
|
||||
@@ -401,7 +401,8 @@ uint32_t iscsi_sysfs_get_host_no_from_hw
|
||||
|
||||
if (strlen(iface->hwaddress) &&
|
||||
strcasecmp(iface->hwaddress, DEFAULT_HWADDRESS))
|
||||
- host_no = get_host_no_from_hwaddress(iface->hwaddress, &tmp_rc);
|
||||
+ host_no = iscsi_sysfs_get_host_no_from_hwaddress(
|
||||
+ iface->hwaddress, &tmp_rc);
|
||||
else if (strlen(iface->netdev) &&
|
||||
strcasecmp(iface->netdev, DEFAULT_NETDEV))
|
||||
host_no = get_host_no_from_netdev(iface->netdev, &tmp_rc);
|
||||
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-04-18 12:50:45.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_sysfs.h 2011-04-18 12:51:30.000000000 -0500
|
||||
@@ -51,6 +51,7 @@ extern int iscsi_sysfs_for_each_host(voi
|
||||
extern uint32_t iscsi_sysfs_get_host_no_from_sid(uint32_t sid, int *err);
|
||||
extern uint32_t iscsi_sysfs_get_host_no_from_hwinfo(struct iface_rec *iface,
|
||||
int *rc);
|
||||
+extern uint32_t iscsi_sysfs_get_host_no_from_hwaddress(char *hwaddress, int *rc);
|
||||
extern int iscsi_sysfs_get_hostinfo_by_host_no(struct host_info *hinfo);
|
||||
extern int iscsi_sysfs_get_sid_from_path(char *session);
|
||||
extern char *iscsi_sysfs_get_blockdev_from_lun(int hostno, int target, int sid);
|
172
iscsi-initiator-utils-fix-default-bindings.patch
Normal file
172
iscsi-initiator-utils-fix-default-bindings.patch
Normal file
@ -0,0 +1,172 @@
|
||||
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;
|
@ -1,97 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/io.c open-iscsi-2.0-872-rc4-bnx2i.fix/usr/io.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/io.c 2011-04-02 01:40:02.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.fix/usr/io.c 2011-04-02 05:23:15.000000000 -0500
|
||||
@@ -296,6 +296,9 @@ static int bind_conn_to_iface(iscsi_conn
|
||||
{
|
||||
struct iscsi_session *session = conn->session;
|
||||
|
||||
+ if (strcmp(iface->transport_name, DEFAULT_TRANSPORT))
|
||||
+ return 0;
|
||||
+
|
||||
memset(session->netdev, 0, IFNAMSIZ);
|
||||
if (iface_is_bound_by_hwaddr(iface) &&
|
||||
net_get_netdev_from_hwaddress(iface->hwaddress, session->netdev)) {
|
||||
@@ -467,7 +470,7 @@ iscsi_io_tcp_poll(iscsi_conn_t *conn, in
|
||||
}
|
||||
|
||||
len = sizeof(ss);
|
||||
- if (log_level > 0 || !conn->session->netdev)
|
||||
+ if (log_level > 0 || !conn->session->netdev[0])
|
||||
rc = getsockname(conn->socket_fd, (struct sockaddr *)&ss, &len);
|
||||
if (log_level > 0 && rc >= 0) {
|
||||
getnameinfo((struct sockaddr *) &conn->saddr,
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_err.c open-iscsi-2.0-872-rc4-bnx2i.fix/usr/iscsi_err.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_err.c 2011-04-02 01:40:02.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.fix/usr/iscsi_err.c 2011-04-02 05:22:51.000000000 -0500
|
||||
@@ -44,7 +44,7 @@ static char *iscsi_err_msgs[] = {
|
||||
/* 19 */ "encountered non-retryable iSCSI login failure",
|
||||
/* 20 */ "could not connect to iscsid",
|
||||
/* 21 */ "no objects found",
|
||||
- /* 23 */ "sysfs lookup failure",
|
||||
+ /* 22 */ "sysfs lookup failure",
|
||||
/* 23 */ "host not found",
|
||||
/* 24 */ "iSCSI login failed due to authorization failure",
|
||||
/* 25 */ "iSNS query failed",
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/netlink.c open-iscsi-2.0-872-rc4-bnx2i.fix/usr/netlink.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/netlink.c 2011-04-02 01:40:02.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.fix/usr/netlink.c 2011-04-02 05:23:10.000000000 -0500
|
||||
@@ -53,15 +53,15 @@ static struct iscsi_ipc_ev_clbk *ipc_ev_
|
||||
|
||||
static int ctldev_handle(void);
|
||||
|
||||
-#define NLM_BUF_DEFAULT_MAX \
|
||||
- (NLMSG_SPACE(ISCSI_DEF_MAX_RECV_SEG_LEN + \
|
||||
- sizeof(struct iscsi_hdr)))
|
||||
+#define NLM_BUF_DEFAULT_MAX (NLMSG_SPACE(ISCSI_DEF_MAX_RECV_SEG_LEN + \
|
||||
+ sizeof(struct iscsi_uevent) + \
|
||||
+ sizeof(struct iscsi_hdr)))
|
||||
+
|
||||
+#define PDU_SENDBUF_DEFAULT_MAX (ISCSI_DEF_MAX_RECV_SEG_LEN + \
|
||||
+ sizeof(struct iscsi_uevent) + \
|
||||
+ sizeof(struct iscsi_hdr))
|
||||
|
||||
-#define PDU_SENDBUF_DEFAULT_MAX \
|
||||
- (ISCSI_DEF_MAX_RECV_SEG_LEN + sizeof(struct iscsi_hdr))
|
||||
-
|
||||
-#define NLM_SETPARAM_DEFAULT_MAX \
|
||||
- (NI_MAXHOST + 1 + sizeof(struct iscsi_uevent))
|
||||
+#define NLM_SETPARAM_DEFAULT_MAX (NI_MAXHOST + 1 + sizeof(struct iscsi_uevent))
|
||||
|
||||
static int
|
||||
kread(char *data, int count)
|
||||
@@ -108,6 +108,12 @@ nlpayload_read(int ctrl_fd, char *data,
|
||||
|
||||
iov.iov_base = nlm_recvbuf;
|
||||
iov.iov_len = NLMSG_SPACE(count);
|
||||
+
|
||||
+ if (iov.iov_len > NLM_BUF_DEFAULT_MAX) {
|
||||
+ log_error("Cannot read %lu bytes. nlm_recvbuf too small.",
|
||||
+ iov.iov_len);
|
||||
+ return -1;
|
||||
+ }
|
||||
memset(iov.iov_base, 0, iov.iov_len);
|
||||
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
@@ -517,6 +523,7 @@ ksend_pdu_begin(uint64_t transport_handl
|
||||
int hdr_size, int data_size)
|
||||
{
|
||||
struct iscsi_uevent *ev;
|
||||
+ int total_xmitlen = sizeof(*ev) + hdr_size + data_size;
|
||||
|
||||
log_debug(7, "in %s", __FUNCTION__);
|
||||
|
||||
@@ -525,8 +532,13 @@ ksend_pdu_begin(uint64_t transport_handl
|
||||
exit(-EIO);
|
||||
}
|
||||
|
||||
+ if (total_xmitlen > PDU_SENDBUF_DEFAULT_MAX) {
|
||||
+ log_error("BUG: Cannot send %d bytes.", total_xmitlen);
|
||||
+ exit(-EINVAL);
|
||||
+ }
|
||||
+
|
||||
xmitbuf = pdu_sendbuf;
|
||||
- memset(xmitbuf, 0, sizeof(*ev) + hdr_size + data_size);
|
||||
+ memset(xmitbuf, 0, total_xmitlen);
|
||||
xmitlen = sizeof(*ev);
|
||||
ev = xmitbuf;
|
||||
memset(ev, 0, sizeof(*ev));
|
@ -1,168 +0,0 @@
|
||||
From 203290639399b4cc3c5039b2f3e653002eb2a9cb Mon Sep 17 00:00:00 2001
|
||||
From: Ales Kozumplik <akozumpl@redhat.com>
|
||||
Date: Tue, 14 Dec 2010 10:57:59 +0100
|
||||
Subject: [PATCH 2/2] Make libiscsi nodes remember the interface they connect through.
|
||||
|
||||
Also, make sure we log through that particular interface when more nodes
|
||||
with the same target exist.
|
||||
|
||||
Related: rhbz#529443
|
||||
---
|
||||
libiscsi/libiscsi.c | 14 +++++++++++---
|
||||
libiscsi/libiscsi.h | 1 +
|
||||
libiscsi/pylibiscsi.c | 26 ++++++++++++++++++++------
|
||||
3 files changed, 32 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c
|
||||
index 2ee2017..d4afcf0 100644
|
||||
--- a/libiscsi/libiscsi.c
|
||||
+++ b/libiscsi/libiscsi.c
|
||||
@@ -188,6 +188,8 @@ int libiscsi_discover_sendtargets(struct libiscsi_context *context,
|
||||
strlcpy((*found_nodes)[found].address,
|
||||
rec->conn[0].address, NI_MAXHOST);
|
||||
(*found_nodes)[found].port = rec->conn[0].port;
|
||||
+ strlcpy((*found_nodes)[found].iface,
|
||||
+ rec->iface.name, LIBISCSI_VALUE_MAXLEN);
|
||||
found++;
|
||||
}
|
||||
}
|
||||
@@ -207,7 +209,7 @@ int libiscsi_discover_firmware(struct libiscsi_context *context,
|
||||
INIT_LIST_HEAD(&targets);
|
||||
INIT_LIST_HEAD(&ifaces);
|
||||
INIT_LIST_HEAD(&rec_list);
|
||||
-
|
||||
+
|
||||
if (nr_found) {
|
||||
*nr_found = 0;
|
||||
}
|
||||
@@ -224,7 +226,7 @@ int libiscsi_discover_firmware(struct libiscsi_context *context,
|
||||
}
|
||||
|
||||
CHECK(iface_create_ifaces_from_boot_contexts(&ifaces, &targets));
|
||||
-
|
||||
+
|
||||
memset(&drec, 0, sizeof(drec));
|
||||
drec.type = DISCOVERY_TYPE_FW;
|
||||
rc = idbm_bind_ifaces_to_nodes(discovery_fw, &drec, &ifaces, &rec_list);
|
||||
@@ -259,6 +261,7 @@ int libiscsi_discover_firmware(struct libiscsi_context *context,
|
||||
new_node->tpgt = rec->tpgt;
|
||||
strlcpy(new_node->address, rec->conn[0].address, NI_MAXHOST);
|
||||
new_node->port = rec->conn[0].port;
|
||||
+ strlcpy(new_node->iface, rec->iface.name, LIBISCSI_VALUE_MAXLEN);
|
||||
|
||||
++new_node;
|
||||
}
|
||||
@@ -403,6 +406,11 @@ static void node_to_rec(const struct libiscsi_node *node,
|
||||
|
||||
int login_helper(void *data, node_rec_t *rec)
|
||||
{
|
||||
+ char *iface = (char*)data;
|
||||
+ if (strcmp(iface, rec->iface.name))
|
||||
+ /* different iface, skip it */
|
||||
+ return -1;
|
||||
+
|
||||
int rc = iscsid_req_by_rec(MGMT_IPC_SESSION_LOGIN, rec);
|
||||
if (rc) {
|
||||
iscsi_err_print_msg(rc);
|
||||
@@ -416,7 +424,7 @@ int libiscsi_node_login(struct libiscsi_context *context,
|
||||
{
|
||||
int nr_found = 0, rc;
|
||||
|
||||
- CHECK(idbm_for_each_iface(&nr_found, NULL, login_helper,
|
||||
+ CHECK(idbm_for_each_iface(&nr_found, (void*)node->iface, login_helper,
|
||||
(char *)node->name, node->tpgt,
|
||||
(char *)node->address, node->port))
|
||||
if (nr_found == 0) {
|
||||
diff --git a/libiscsi/libiscsi.h b/libiscsi/libiscsi.h
|
||||
index a7d05a5..756590e 100644
|
||||
--- a/libiscsi/libiscsi.h
|
||||
+++ b/libiscsi/libiscsi.h
|
||||
@@ -68,6 +68,7 @@ struct libiscsi_node {
|
||||
get used anywhere, so we keep things simple and assume one connection */
|
||||
char address[NI_MAXHOST] /** Portal hostname or IP-address. */;
|
||||
int port /** Portal port number. */;
|
||||
+ char iface[LIBISCSI_VALUE_MAXLEN] /** Interface to connect through. */;
|
||||
};
|
||||
|
||||
/** \brief libiscsi CHAP authentication information struct
|
||||
diff --git a/libiscsi/pylibiscsi.c b/libiscsi/pylibiscsi.c
|
||||
index 69bfaa0..2c1889a 100644
|
||||
--- a/libiscsi/pylibiscsi.c
|
||||
+++ b/libiscsi/pylibiscsi.c
|
||||
@@ -199,25 +199,27 @@ typedef struct {
|
||||
static int PyIscsiNode_init(PyObject *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
PyIscsiNode *node = (PyIscsiNode *)self;
|
||||
- char *kwlist[] = {"name", "tpgt", "address", "port", NULL};
|
||||
- const char *name = NULL, *address = NULL;
|
||||
+ char *kwlist[] = {"name", "tpgt", "address", "port", "iface", NULL};
|
||||
+ const char *name = NULL, *address = NULL, *iface = NULL;
|
||||
int tpgt = -1, port = 3260;
|
||||
|
||||
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|isi:node.__init__",
|
||||
- kwlist, &name, &tpgt, &address, &port))
|
||||
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|isis:node.__init__",
|
||||
+ kwlist, &name, &tpgt, &address,
|
||||
+ &port, &iface))
|
||||
return -1;
|
||||
if (address == NULL) {
|
||||
PyErr_SetString(PyExc_ValueError, "address not set");
|
||||
return -1;
|
||||
}
|
||||
- if (check_string(name) || check_string(address))
|
||||
+ if (check_string(name) || check_string(address) || check_string(iface))
|
||||
return -1;
|
||||
|
||||
strcpy(node->node.name, name);
|
||||
node->node.tpgt = tpgt;
|
||||
strcpy(node->node.address, address);
|
||||
node->node.port = port;
|
||||
-
|
||||
+ strcpy(node->node.iface, iface);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -234,6 +236,8 @@ static PyObject *PyIscsiNode_get(PyObject *self, void *data)
|
||||
return PyString_FromString(node->node.address);
|
||||
} else if (!strcmp(attr, "port")) {
|
||||
return PyInt_FromLong(node->node.port);
|
||||
+ } else if (!strcmp(attr, "iface")) {
|
||||
+ return PyString_FromString(node->node.iface);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -261,6 +265,10 @@ static int PyIscsiNode_set(PyObject *self, PyObject *value, void *data)
|
||||
if (!PyArg_Parse(value, "i", &i))
|
||||
return -1;
|
||||
node->node.port = i;
|
||||
+ } else if (!strcmp(attr, "iface")) {
|
||||
+ if (!PyArg_Parse(value, "s", &str) || check_string(str))
|
||||
+ return -1;
|
||||
+ strcpy(node->node.iface, str);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -288,6 +296,10 @@ static int PyIscsiNode_compare(PyIscsiNode *self, PyIscsiNode *other)
|
||||
if (self->node.port > other->node.port)
|
||||
return -1;
|
||||
|
||||
+ res = strcmp(self->node.iface, other->node.iface);
|
||||
+ if (res)
|
||||
+ return res;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -441,6 +453,8 @@ static struct PyGetSetDef PyIscsiNode_getseters[] = {
|
||||
"address", "address"},
|
||||
{"port", (getter)PyIscsiNode_get, (setter)PyIscsiNode_set,
|
||||
"port", "port"},
|
||||
+ {"iface", (getter)PyIscsiNode_get, (setter)PyIscsiNode_set,
|
||||
+ "iface", "iface"},
|
||||
{NULL}
|
||||
};
|
||||
|
||||
--
|
||||
1.7.3.3
|
||||
|
@ -1,122 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/doc/iscsiadm.8 open-iscsi-2.0-872-rc4-bnx2i.work/doc/iscsiadm.8
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/doc/iscsiadm.8 2011-04-05 14:41:11.804173341 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/doc/iscsiadm.8 2011-04-05 14:41:27.335321234 -0500
|
||||
@@ -171,8 +171,14 @@ sid is passed in.
|
||||
|
||||
.TP
|
||||
\fB\-p\fR, \fB\-\-portal=\fIip[:port]\fR
|
||||
-Use target portal with ip-address \fIip\fR and \fIport\fR, the default
|
||||
-\fIport\fR value is 3260.
|
||||
+Use target portal with ip-address \fIip\fR and \fIport\fR. If port is not passed
|
||||
+in the default \fIport\fR value is 3260.
|
||||
+.IP
|
||||
+IPv6 addresses can bs specified as [ddd.ddd.ddd.ddd]:port or
|
||||
+ddd.ddd.ddd.ddd.
|
||||
+.IP
|
||||
+Hostnames can also be used for the ip argument.
|
||||
+
|
||||
.IP
|
||||
This option is only valid for discovery, or for node operations with
|
||||
the \fInew\fR operator.
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/README open-iscsi-2.0-872-rc4-bnx2i.work/README
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/README 2011-04-05 14:41:11.802173577 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/README 2011-04-05 14:43:04.752687316 -0500
|
||||
@@ -646,6 +646,9 @@ To now log into targets it is the same a
|
||||
If a record does not exist, it will be created using the iscsid.conf
|
||||
discovery settings.
|
||||
|
||||
+ The argument to -p may also be a hostname instead of an address.
|
||||
+ ./iscsiadm -m discoverydb -t st -p smoehost --discover
|
||||
+
|
||||
For the ifaces, iscsiadm will first search /var/lib/iscsi/ifaces for
|
||||
interfaces using software iscsi. If any are found then nodes found
|
||||
during discovery will be setup so that they can logged in through
|
||||
@@ -770,6 +773,10 @@ To now log into targets it is the same a
|
||||
./iscsiadm -m node -T iqn.2005-03.com.max \
|
||||
-p [2001:c90::211:9ff:feb8:a9e9]:3260 -l
|
||||
|
||||
+ To specify a hostname the following can be used:
|
||||
+
|
||||
+ ./iscsiadm -m node -T iqn.2005-03.com.max -p somehost -l
|
||||
+
|
||||
- iSCSI Login to a specific portal through the NIC setup as iface0:
|
||||
|
||||
./iscsiadm -m node -T iqn.2005-03.com.max -p 192.168.0.4:3260 \
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_util.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_util.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_util.c 2011-04-05 14:41:11.817171790 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_util.c 2011-04-05 14:41:27.337320997 -0500
|
||||
@@ -217,6 +217,64 @@ char *cfg_get_string_param(char *pathnam
|
||||
return value;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * iscsi_addr_match - check if the addrs are to the same ip
|
||||
+ * @address1: pattern
|
||||
+ * @address2: address to check
|
||||
+ *
|
||||
+ * If address1 is blank then it matches any string passed in.
|
||||
+ */
|
||||
+static int iscsi_addr_match(char *address1, char *address2)
|
||||
+{
|
||||
+ struct addrinfo hints1, hints2, *res1, *res2;
|
||||
+ int rc;
|
||||
+
|
||||
+ if (!strlen(address1))
|
||||
+ return 1;
|
||||
+
|
||||
+ if (!strcmp(address1, address2))
|
||||
+ return 1;
|
||||
+
|
||||
+ memset(&hints1, 0, sizeof(struct addrinfo));
|
||||
+ hints1.ai_family = AF_UNSPEC;
|
||||
+ hints1.ai_socktype = SOCK_STREAM;
|
||||
+
|
||||
+ memset(&hints2, 0, sizeof(struct addrinfo));
|
||||
+ hints2.ai_family = AF_UNSPEC;
|
||||
+ hints2.ai_socktype = SOCK_STREAM;
|
||||
+
|
||||
+ /*
|
||||
+ * didn't match so we have to resolve to see if one is a dnsname
|
||||
+ * that matches a ip address.
|
||||
+ */
|
||||
+ rc = getaddrinfo(address1, NULL, &hints1, &res1);
|
||||
+ if (rc) {
|
||||
+ log_debug(1, "Match error. Could not resolve %s: %s", address1,
|
||||
+ gai_strerror(rc));
|
||||
+ return 0;
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ rc = getaddrinfo(address2, NULL, &hints2, &res2);
|
||||
+ if (rc) {
|
||||
+ log_debug(1, "Match error. Could not resolve %s: %s", address2,
|
||||
+ gai_strerror(rc));
|
||||
+ rc = 0;
|
||||
+ goto free_res1;
|
||||
+ }
|
||||
+
|
||||
+ if ((res1->ai_addrlen != res2->ai_addrlen) ||
|
||||
+ memcmp(res1->ai_addr, res2->ai_addr, res2->ai_addrlen))
|
||||
+ rc = 0;
|
||||
+ else
|
||||
+ rc = 1;
|
||||
+
|
||||
+ freeaddrinfo(res2);
|
||||
+free_res1:
|
||||
+ freeaddrinfo(res1);
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
int __iscsi_match_session(node_rec_t *rec, char *targetname,
|
||||
char *address, int port, struct iface_rec *iface)
|
||||
{
|
||||
@@ -240,8 +298,7 @@ int __iscsi_match_session(node_rec_t *re
|
||||
if (strlen(rec->name) && strcmp(rec->name, targetname))
|
||||
return 0;
|
||||
|
||||
- if (strlen(rec->conn[0].address) &&
|
||||
- strcmp(rec->conn[0].address, address))
|
||||
+ if (!iscsi_addr_match(rec->conn[0].address, address))
|
||||
return 0;
|
||||
|
||||
if (rec->conn[0].port != -1 && port != rec->conn[0].port)
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
74274
iscsi-initiator-utils-sync-uio-0.7.0.8.patch
Normal file
74274
iscsi-initiator-utils-sync-uio-0.7.0.8.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/brcm_iscsi_uio/include/config.h open-iscsi-2.0-872-rc4-bnx2i.work/brcm_iscsi_uio/include/config.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/brcm_iscsi_uio/include/config.h 2011-01-31 19:30:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/brcm_iscsi_uio/include/config.h 2011-01-31 19:30:05.000000000 -0600
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/iscsiuio/include/config.h open-iscsi-2.0-872-rc4-bnx2i.build2/iscsiuio/include/config.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i.base/iscsiuio/include/config.h 2011-08-14 22:58:02.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build2/iscsiuio/include/config.h 2011-08-14 23:19:55.000000000 -0500
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <netdb.h>
|
||||
@ -9,42 +9,98 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/brcm_iscsi_uio/include/config.h open-is
|
||||
|
||||
/* ISIDs now have a typed naming authority in them. We use an OUI */
|
||||
#define DRIVER_ISID_0 0x00
|
||||
@@ -77,7 +78,7 @@ typedef struct iface_rec {
|
||||
@@ -31,18 +32,35 @@
|
||||
/* max len of interface */
|
||||
#define ISCSI_MAX_IFACE_LEN 65
|
||||
|
||||
-#if (ISCSID_VERSION == 872) /* 2.0-872 (RHEL 6.0) */
|
||||
+#if (ISCSID_VERSION == 872) /* 2.0-872 (RHEL 6.2) */
|
||||
|
||||
#define ISCSI_HWADDRESS_BUF_SIZE 18
|
||||
#define ISCSI_TRANSPORT_NAME_MAXLEN 16
|
||||
+#define ISCSI_MAX_STR_LEN 80
|
||||
|
||||
typedef struct iface_rec {
|
||||
struct list_head list;
|
||||
/* iscsi iface record name */
|
||||
char name[ISCSI_MAX_IFACE_LEN];
|
||||
+ uint32_t iface_num;
|
||||
/* network layer iface name (eth0) */
|
||||
char netdev[IFNAMSIZ];
|
||||
char ipaddress[NI_MAXHOST];
|
||||
+ char subnet_mask[NI_MAXHOST];
|
||||
+ char gateway[NI_MAXHOST];
|
||||
+ char bootproto[ISCSI_MAX_STR_LEN];
|
||||
+ char ipv6_linklocal[NI_MAXHOST];
|
||||
+ char ipv6_router[NI_MAXHOST];
|
||||
+ char ipv6_autocfg[NI_MAXHOST];
|
||||
+ char linklocal_autocfg[NI_MAXHOST];
|
||||
+ char router_autocfg[NI_MAXHOST];
|
||||
+ uint16_t vlan_id;
|
||||
+ uint8_t vlan_priority;
|
||||
+ char vlan_state[ISCSI_MAX_STR_LEN];
|
||||
+ char state[ISCSI_MAX_STR_LEN]; /* 0 = disable,
|
||||
+ * 1 = enable */
|
||||
+ uint16_t mtu;
|
||||
+ uint16_t port;
|
||||
/*
|
||||
* TODO: we may have to make this bigger and interconnect
|
||||
* specific for infinniband
|
||||
@@ -55,8 +73,6 @@ typedef struct iface_rec {
|
||||
*/
|
||||
- char hwaddress[ISCSI_MAX_IFACE_LEN];
|
||||
+ char hwaddress[ISCSI_HWADDRESS_BUF_SIZE];
|
||||
char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN];
|
||||
/*
|
||||
* This is only used for boot now, but the iser guys
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/brcm_iscsi_uio/include/iscsi_net_util.h open-iscsi-2.0-872-rc4-bnx2i.work/brcm_iscsi_uio/include/iscsi_net_util.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/brcm_iscsi_uio/include/iscsi_net_util.h 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/brcm_iscsi_uio/include/iscsi_net_util.h 2011-01-31 19:30:05.000000000 -0600
|
||||
@@ -0,0 +1,14 @@
|
||||
char alias[TARGET_NAME_MAXLEN + 1];
|
||||
char iname[TARGET_NAME_MAXLEN + 1];
|
||||
-
|
||||
- char vlan[ISCSI_MAX_IFACE_LEN];
|
||||
} iface_rec_t;
|
||||
|
||||
#else /* 2.0-871 (RHEL 5.5) */
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/iscsiuio/include/iscsi_net_util.h open-iscsi-2.0-872-rc4-bnx2i.build2/iscsiuio/include/iscsi_net_util.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i.base/iscsiuio/include/iscsi_net_util.h 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build2/iscsiuio/include/iscsi_net_util.h 2011-08-14 23:20:09.000000000 -0500
|
||||
@@ -0,0 +1,11 @@
|
||||
+#ifndef __ISCSI_NET_UTIL_h__
|
||||
+#define __ISCSI_NET_UTIL_h__
|
||||
+
|
||||
+#define ISCSI_HWADDRESS_BUF_SIZE 18
|
||||
+
|
||||
+#if 0
|
||||
+
|
||||
+extern int net_get_transport_name_from_netdev(char *netdev, char *transport);
|
||||
+extern int net_get_netdev_from_hwaddress(char *hwaddress, char *netdev);
|
||||
+extern int net_setup_netdev(char *netdev, char *local_ip, char *mask,
|
||||
+ char *gateway, char *remote_ip, int needs_bringup);
|
||||
+
|
||||
+#endif
|
||||
+#endif
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/brcm_iscsi_uio/src/unix/iscsid_ipc.c open-iscsi-2.0-872-rc4-bnx2i.work/brcm_iscsi_uio/src/unix/iscsid_ipc.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/brcm_iscsi_uio/src/unix/iscsid_ipc.c 2011-01-31 19:30:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/brcm_iscsi_uio/src/unix/iscsid_ipc.c 2011-01-31 19:30:05.000000000 -0600
|
||||
@@ -508,7 +508,7 @@ int process_iscsid_broadcast(int s2)
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/iscsiuio/src/unix/iscsid_ipc.c open-iscsi-2.0-872-rc4-bnx2i.build2/iscsiuio/src/unix/iscsid_ipc.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i.base/iscsiuio/src/unix/iscsid_ipc.c 2011-08-14 22:58:02.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build2/iscsiuio/src/unix/iscsid_ipc.c 2011-08-14 23:37:00.000000000 -0500
|
||||
@@ -221,18 +221,11 @@ static int parse_iface(void *arg)
|
||||
data = (iscsid_uip_broadcast_t *) arg;
|
||||
|
||||
LOG_INFO(PFX "Received request for '%s' to set IP address: '%s' "
|
||||
- "VLAN: '%s'",
|
||||
+ "VLAN: '%d'",
|
||||
data->u.iface_rec.rec.netdev,
|
||||
- data->u.iface_rec.rec.ipaddress, data->u.iface_rec.rec.vlan);
|
||||
+ data->u.iface_rec.rec.ipaddress, data->u.iface_rec.rec.vlan_id);
|
||||
|
||||
- vlan = atoi(data->u.iface_rec.rec.vlan);
|
||||
- if ((valid_vlan(vlan) == 0) &&
|
||||
- (strcmp(data->u.iface_rec.rec.vlan, "") != 0)) {
|
||||
- LOG_ERR(PFX "Invalid VLAN tag: '%s'",
|
||||
- data->u.iface_rec.rec.vlan)
|
||||
- rc = -EIO;
|
||||
- goto early_exit;
|
||||
- }
|
||||
+ vlan = data->u.iface_rec.rec.vlan_id;
|
||||
|
||||
/* Detect for CIDR notation and strip off the netmask if present */
|
||||
rc = decode_cidr(data->u.iface_rec.rec.ipaddress, &ipam, &prefix_len);
|
||||
@@ -590,7 +583,7 @@ int process_iscsid_broadcast(int s2)
|
||||
}
|
||||
|
||||
/* This will be freed by parse_iface_thread() */
|
||||
- data = (iscsid_uip_broadcast_t *) malloc(sizeof(*data));
|
||||
+ data = (iscsid_uip_broadcast_t *) calloc(1, sizeof(*data));
|
||||
if(data == NULL) {
|
||||
if (data == NULL) {
|
||||
LOG_ERR(PFX "Couldn't allocate memory for iface data");
|
||||
return -ENOMEM;
|
||||
|
@ -1,6 +1,6 @@
|
||||
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/include/iscsi_err.h 2011-01-31 03:10:47.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/include/iscsi_err.h 2011-01-31 03:43:51.000000000 -0600
|
||||
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
|
||||
--- 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.build/include/iscsi_err.h 2011-08-14 16:56:54.000000000 -0500
|
||||
@@ -58,6 +58,8 @@ enum {
|
||||
ISCSI_ERR_ISNS_QUERY = 25,
|
||||
/* iSNS registration/deregistration failed */
|
||||
@ -10,21 +10,21 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/include/iscsi_err.h open-iscsi-2.0-872-
|
||||
|
||||
/* Always last. Indicates end of error code space */
|
||||
ISCSI_MAX_ERR_VAL,
|
||||
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/libiscsi/Makefile 2011-01-31 03:10:47.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/libiscsi/Makefile 2011-01-31 03:45:36.000000000 -0600
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/Makefile open-iscsi-2.0-872-rc4-bnx2i.build/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.build/libiscsi/Makefile 2011-08-14 16:56:54.000000000 -0500
|
||||
@@ -13,7 +13,7 @@ TESTS += tests/test_set_auth tests/test_
|
||||
|
||||
COMMON_SRCS = sysdeps.o
|
||||
# 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 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 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 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
|
||||
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
|
||||
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-01-31 03:10:47.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator.c 2011-01-31 06:18:58.000000000 -0600
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872-rc4-bnx2i.build/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.build/usr/initiator.c 2011-08-14 16:56:54.000000000 -0500
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "iscsi_sysfs.h"
|
||||
#include "iscsi_settings.h"
|
||||
@ -33,7 +33,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-
|
||||
#include "sysdeps.h"
|
||||
#include "iscsi_err.h"
|
||||
|
||||
@@ -554,6 +555,48 @@ static int iscsi_conn_connect(struct isc
|
||||
@@ -557,6 +558,48 @@ static int iscsi_conn_connect(struct isc
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-
|
||||
+ }
|
||||
+
|
||||
+ ev_context->data = qtask;
|
||||
+ conn->state = STATE_XPT_WAIT;
|
||||
+ conn->state = ISCSI_CONN_STATE_XPT_WAIT;
|
||||
+
|
||||
+ iscsi_sched_ev_context(ev_context, conn, 0, EV_UIO_POLL);
|
||||
+
|
||||
@ -82,7 +82,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-
|
||||
static void
|
||||
__session_conn_reopen(iscsi_conn_t *conn, queue_task_t *qtask, int do_stop,
|
||||
int redirected)
|
||||
@@ -595,6 +638,11 @@ __session_conn_reopen(iscsi_conn_t *conn
|
||||
@@ -598,6 +641,11 @@ __session_conn_reopen(iscsi_conn_t *conn
|
||||
if (!redirected)
|
||||
session->reopen_cnt++;
|
||||
|
||||
@ -94,8 +94,8 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-
|
||||
if (iscsi_conn_connect(conn, qtask)) {
|
||||
delay = ISCSI_CONN_ERR_REOPEN_DELAY;
|
||||
goto queue_reopen;
|
||||
@@ -1550,6 +1598,53 @@ cleanup:
|
||||
session_conn_shutdown(conn, qtask, err);
|
||||
@@ -1659,6 +1707,53 @@ failed_login:
|
||||
|
||||
}
|
||||
|
||||
+static void session_conn_uio_poll(void *data)
|
||||
@ -135,7 +135,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-
|
||||
+ "login errors iscsid may give up the initial "
|
||||
+ "login early. You should manually login.");
|
||||
+
|
||||
+ conn->state = STATE_XPT_WAIT;
|
||||
+ conn->state = ISCSI_CONN_STATE_XPT_WAIT;
|
||||
+ if (iscsi_conn_connect(conn, qtask)) {
|
||||
+ int delay = ISCSI_CONN_ERR_REOPEN_DELAY;
|
||||
+
|
||||
@ -148,7 +148,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-
|
||||
static int iscsi_sched_ev_context(struct iscsi_ev_context *ev_context,
|
||||
struct iscsi_conn *conn, unsigned long tmo,
|
||||
int event)
|
||||
@@ -1586,6 +1681,11 @@ static int iscsi_sched_ev_context(struct
|
||||
@@ -1700,6 +1795,11 @@ static int iscsi_sched_ev_context(struct
|
||||
ev_context);
|
||||
actor_schedule(&ev_context->actor);
|
||||
break;
|
||||
@ -160,7 +160,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-
|
||||
case EV_CONN_LOGOUT_TIMER:
|
||||
actor_timer(&ev_context->actor, tmo * 1000,
|
||||
iscsi_logout_timedout, ev_context);
|
||||
@@ -1714,7 +1814,17 @@ session_login_task(node_rec_t *rec, queu
|
||||
@@ -1833,7 +1933,17 @@ session_login_task(node_rec_t *rec, queu
|
||||
conn = &session->conn[0];
|
||||
qtask->conn = conn;
|
||||
|
||||
@ -179,7 +179,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-
|
||||
__session_destroy(session);
|
||||
return ISCSI_ERR_LOGIN;
|
||||
}
|
||||
@@ -1864,6 +1974,7 @@ iscsi_host_send_targets(queue_task_t *qt
|
||||
@@ -1990,6 +2100,7 @@ iscsi_host_send_targets(queue_task_t *qt
|
||||
struct sockaddr_storage *ss)
|
||||
{
|
||||
struct iscsi_transport *t;
|
||||
@ -187,10 +187,10 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-
|
||||
|
||||
t = iscsi_sysfs_get_transport_by_hba(host_no);
|
||||
if (!t) {
|
||||
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/usr/initiator_common.c 2011-01-31 03:10:47.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator_common.c 2011-01-31 04:22:50.000000000 -0600
|
||||
@@ -555,6 +555,36 @@ TODO handle this
|
||||
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
|
||||
--- 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.build/usr/initiator_common.c 2011-08-14 16:56:54.000000000 -0500
|
||||
@@ -561,6 +561,36 @@ TODO handle this
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator_common.c open-iscsi-2.0-8
|
||||
int iscsi_host_set_net_params(struct iface_rec *iface,
|
||||
struct iscsi_session *session)
|
||||
{
|
||||
@@ -576,6 +606,10 @@ int iscsi_host_set_net_params(struct ifa
|
||||
@@ -582,6 +612,10 @@ int iscsi_host_set_net_params(struct ifa
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
@ -238,18 +238,18 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator_common.c open-iscsi-2.0-8
|
||||
rc = host_set_param(t, session->hostno,
|
||||
ISCSI_HOST_PARAM_IPADDRESS,
|
||||
iface->ipaddress, ISCSI_STRING);
|
||||
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/usr/initiator.h 2011-01-31 03:10:47.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator.h 2011-01-31 03:40:12.000000000 -0600
|
||||
@@ -89,6 +89,7 @@ typedef enum iscsi_event_e {
|
||||
EV_CONN_ERROR,
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.h open-iscsi-2.0-872-rc4-bnx2i.build/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.build/usr/initiator.h 2011-08-14 16:58:14.000000000 -0500
|
||||
@@ -83,6 +83,7 @@ typedef enum iscsi_event_e {
|
||||
EV_CONN_LOGOUT_TIMER,
|
||||
EV_CONN_STOP,
|
||||
EV_CONN_LOGIN,
|
||||
+ EV_UIO_POLL,
|
||||
} iscsi_event_e;
|
||||
|
||||
struct queue_task;
|
||||
@@ -356,5 +357,8 @@ extern void iscsi_copy_operational_param
|
||||
@@ -353,5 +354,8 @@ extern void iscsi_copy_operational_param
|
||||
extern int iscsi_setup_authentication(struct iscsi_session *session,
|
||||
struct iscsi_auth_config *auth_cfg);
|
||||
extern int iscsi_setup_portal(struct iscsi_conn *conn, char *address, int port);
|
||||
@ -258,9 +258,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.h open-iscsi-2.0-872-rc4-
|
||||
+ struct iface_rec *iface);
|
||||
|
||||
#endif /* INITIATOR_H */
|
||||
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/usr/iscsid_req.c 2011-01-31 03:10:47.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsid_req.c 2011-01-31 03:45:09.000000000 -0600
|
||||
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
|
||||
--- 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.build/usr/iscsid_req.c 2011-08-14 16:56:54.000000000 -0500
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -277,7 +277,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsid_req.c open-iscsi-2.0-872-rc4
|
||||
|
||||
static void iscsid_startup(void)
|
||||
{
|
||||
@@ -52,7 +54,7 @@ static void iscsid_startup(void)
|
||||
@@ -54,7 +56,7 @@ static void iscsid_startup(void)
|
||||
|
||||
#define MAXSLEEP 128
|
||||
|
||||
@ -286,7 +286,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsid_req.c open-iscsi-2.0-872-rc4
|
||||
{
|
||||
int nsec;
|
||||
struct sockaddr_un addr;
|
||||
@@ -65,8 +67,8 @@ static int iscsid_connect(int *fd, int s
|
||||
@@ -67,8 +69,8 @@ static int iscsid_connect(int *fd, int s
|
||||
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sun_family = AF_LOCAL;
|
||||
@ -297,7 +297,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsid_req.c open-iscsi-2.0-872-rc4
|
||||
/*
|
||||
* Trying to connect with exponential backoff
|
||||
*/
|
||||
@@ -94,6 +96,11 @@ static int iscsid_connect(int *fd, int s
|
||||
@@ -96,6 +98,11 @@ static int iscsid_connect(int *fd, int s
|
||||
return ISCSI_ERR_ISCSID_NOTCONN;
|
||||
}
|
||||
|
||||
@ -309,7 +309,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsid_req.c open-iscsi-2.0-872-rc4
|
||||
int iscsid_request(int *fd, iscsiadm_req_t *req, int start_iscsid)
|
||||
{
|
||||
int err;
|
||||
@@ -190,3 +197,81 @@ int iscsid_req_by_sid(iscsiadm_cmd_e cmd
|
||||
@@ -192,3 +199,81 @@ int iscsid_req_by_sid(iscsiadm_cmd_e cmd
|
||||
return err;
|
||||
return iscsid_req_wait(cmd, fd);
|
||||
}
|
||||
@ -391,9 +391,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsid_req.c open-iscsi-2.0-872-rc4
|
||||
+ close(fd);
|
||||
+ return err;
|
||||
+}
|
||||
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/usr/iscsid_req.h 2011-01-31 03:10:47.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsid_req.h 2011-01-31 03:11:02.000000000 -0600
|
||||
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
|
||||
--- 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.build/usr/iscsid_req.h 2011-08-14 16:56:54.000000000 -0500
|
||||
@@ -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(int cmd, int sid);
|
||||
@ -401,9 +401,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsid_req.h open-iscsi-2.0-872-rc4
|
||||
+extern int uip_broadcast(void *buf, size_t buf_len);
|
||||
+
|
||||
#endif
|
||||
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/usr/iscsi_err.c 2011-01-31 03:10:47.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_err.c 2011-01-31 03:44:25.000000000 -0600
|
||||
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
|
||||
--- 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.build/usr/iscsi_err.c 2011-08-14 16:56:54.000000000 -0500
|
||||
@@ -49,6 +49,7 @@ static char *iscsi_err_msgs[] = {
|
||||
/* 24 */ "iSCSI login failed due to authorization failure",
|
||||
/* 25 */ "iSNS query failed",
|
||||
@ -412,21 +412,22 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_err.c open-iscsi-2.0-872-rc4-
|
||||
};
|
||||
|
||||
char *iscsi_err_to_str(int err)
|
||||
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/usr/Makefile 2011-01-31 03:10:47.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/Makefile 2011-01-31 03:23:30.000000000 -0600
|
||||
@@ -40,7 +40,7 @@ SYSDEPS_SRCS = $(wildcard ../utils/sysde
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/Makefile open-iscsi-2.0-872-rc4-bnx2i.build/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.build/usr/Makefile 2011-08-14 16:58:57.000000000 -0500
|
||||
@@ -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 \
|
||||
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 \
|
||||
- initiator_common.o iscsi_err.o $(IPC_OBJ) $(SYSDEPS_SRCS)
|
||||
+ initiator_common.o iscsi_err.o uip_mgmt_ipc.o $(IPC_OBJ) $(SYSDEPS_SRCS)
|
||||
- initiator_common.o iscsi_err.o $(IPC_OBJ) $(SYSDEPS_SRCS) $(DCB_OBJ)
|
||||
+ initiator_common.o iscsi_err.o uip_mgmt_ipc.o \
|
||||
+ $(IPC_OBJ) $(SYSDEPS_SRCS) $(DCB_OBJ)
|
||||
# core initiator files
|
||||
INITIATOR_SRCS = initiator.o scsi.o actor.o event_poll.o mgmt_ipc.o
|
||||
|
||||
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/usr/transport.c 2011-01-31 03:10:47.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/transport.c 2011-01-31 03:37:05.000000000 -0600
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/transport.c open-iscsi-2.0-872-rc4-bnx2i.build/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.build/usr/transport.c 2011-08-14 16:56:54.000000000 -0500
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "log.h"
|
||||
#include "iscsi_util.h"
|
||||
@ -443,9 +444,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/transport.c open-iscsi-2.0-872-rc4-
|
||||
};
|
||||
|
||||
struct iscsi_transport_template be2iscsi = {
|
||||
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/usr/transport.h 2011-01-31 03:10:47.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/transport.h 2011-01-31 03:11:02.000000000 -0600
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/transport.h open-iscsi-2.0-872-rc4-bnx2i.build/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.build/usr/transport.h 2011-08-14 16:56:54.000000000 -0500
|
||||
@@ -35,6 +35,9 @@ struct iscsi_transport_template {
|
||||
int (*ep_poll) (struct iscsi_conn *conn, int timeout_ms);
|
||||
void (*ep_disconnect) (struct iscsi_conn *conn);
|
||||
@ -456,9 +457,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/transport.h open-iscsi-2.0-872-rc4-
|
||||
};
|
||||
|
||||
/* represents data path provider */
|
||||
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/usr/uip_mgmt_ipc.c 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/uip_mgmt_ipc.c 2011-01-31 03:11:02.000000000 -0600
|
||||
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
|
||||
--- 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.build/usr/uip_mgmt_ipc.c 2011-08-14 16:56:54.000000000 -0500
|
||||
@@ -0,0 +1,41 @@
|
||||
+/*
|
||||
+ * uIP iSCSI Daemon/Admin Management IPC
|
||||
@ -501,9 +502,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/uip_mgmt_ipc.c open-iscsi-2.0-872-r
|
||||
+ sizeof(iscsid_uip_broadcast_header_t) +
|
||||
+ sizeof(*iface));
|
||||
+}
|
||||
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/usr/uip_mgmt_ipc.h 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/uip_mgmt_ipc.h 2011-01-31 03:40:12.000000000 -0600
|
||||
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
|
||||
--- 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.build/usr/uip_mgmt_ipc.h 2011-08-14 16:56:54.000000000 -0500
|
||||
@@ -0,0 +1,73 @@
|
||||
+/*
|
||||
+ * uIP iSCSI Daemon/Admin Management IPC
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc3-bnx2i/etc/iscsid.conf open-iscsi-2.0-872-rc3-bnx2i.diff/etc/iscsid.conf
|
||||
--- open-iscsi-2.0-872-rc3-bnx2i/etc/iscsid.conf 2010-07-11 03:45:50.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc3-bnx2i.diff/etc/iscsid.conf 2010-07-11 03:57:57.000000000 -0500
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/etc/iscsid.conf open-iscsi-2.0-872-rc4-bnx2i.build/etc/iscsid.conf
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i.base/etc/iscsid.conf 2011-08-14 16:33:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/etc/iscsid.conf 2011-08-14 16:37:47.000000000 -0500
|
||||
@@ -17,10 +17,10 @@
|
||||
# maintainers.
|
||||
#
|
||||
@ -23,9 +23,9 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/etc/iscsid.conf open-iscsi-2.0-872-rc3-b
|
||||
+# To manually startup the session set to "manual". The default is automatic.
|
||||
+node.startup = automatic
|
||||
|
||||
|
||||
# *************
|
||||
@@ -255,29 +255,26 @@ node.conn[0].iscsi.MaxXmitDataSegmentLen
|
||||
# For "automatic" startup nodes, setting this to "Yes" will try logins on each
|
||||
# available iface until one succeeds, and then stop. The default "No" will try
|
||||
@@ -259,28 +259,27 @@ node.conn[0].iscsi.MaxXmitDataSegmentLen
|
||||
discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768
|
||||
|
||||
# To allow the targets to control the setting of the digest checking,
|
||||
@ -34,36 +34,36 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/etc/iscsid.conf open-iscsi-2.0-872-rc3-b
|
||||
+# the following lines (Data digests are not supported.):
|
||||
#node.conn[0].iscsi.HeaderDigest = CRC32C,None
|
||||
-#node.conn[0].iscsi.DataDigest = CRC32C,None
|
||||
+
|
||||
#
|
||||
# To allow the targets to control the setting of the digest checking,
|
||||
# with the initiator requesting a preference of disabling the checking,
|
||||
-# uncomment one or both of the following lines:
|
||||
+# uncomment the following lines:
|
||||
+# uncomment the following line:
|
||||
#node.conn[0].iscsi.HeaderDigest = None,CRC32C
|
||||
-#node.conn[0].iscsi.DataDigest = None,CRC32C
|
||||
#
|
||||
# To enable CRC32C digest checking for the header and/or data part of
|
||||
-# iSCSI PDUs, uncomment one or both of the following lines:
|
||||
+# iSCSI PDUs, uncomment the following lines:
|
||||
+# iSCSI PDUs, uncomment the following line:
|
||||
#node.conn[0].iscsi.HeaderDigest = CRC32C
|
||||
-#node.conn[0].iscsi.DataDigest = CRC32C
|
||||
#
|
||||
# To disable digest checking for the header and/or data part of
|
||||
-# iSCSI PDUs, uncomment one or both of the following lines:
|
||||
+# iSCSI PDUs, uncomment the following lines:
|
||||
+# iSCSI PDUs, uncomment the following line:
|
||||
#node.conn[0].iscsi.HeaderDigest = None
|
||||
-#node.conn[0].iscsi.DataDigest = None
|
||||
#
|
||||
# The default is to never use DataDigests or HeaderDigests.
|
||||
#
|
||||
-
|
||||
+node.conn[0].iscsi.HeaderDigest = None
|
||||
|
||||
#************
|
||||
# Workarounds
|
||||
diff -aurp open-iscsi-2.0-872-rc3-bnx2i/README open-iscsi-2.0-872-rc3-bnx2i.diff/README
|
||||
--- open-iscsi-2.0-872-rc3-bnx2i/README 2010-07-11 03:45:50.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc3-bnx2i.diff/README 2010-07-11 03:57:57.000000000 -0500
|
||||
# For multipath configurations, you may want more than one session to be
|
||||
# created on each iface record. If node.session.nr_sessions is greater
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/README open-iscsi-2.0-872-rc4-bnx2i.build/README
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i.base/README 2011-08-14 16:33:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/README 2011-08-14 16:34:12.000000000 -0500
|
||||
@@ -74,11 +74,6 @@ the cache sync command will fail.
|
||||
- iscsiadm's -P 3 option will not print out scsi devices.
|
||||
- iscsid will not automatically online devices.
|
||||
@ -76,7 +76,7 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/README open-iscsi-2.0-872-rc3-bnx2i.diff
|
||||
By default the kernel source found at
|
||||
/lib/modules/`uname -a`/build
|
||||
will be used to compile the open-iscsi modules. To specify a different
|
||||
@@ -907,7 +902,7 @@ Red Hat or Fedora:
|
||||
@@ -975,7 +970,7 @@ Red Hat or Fedora:
|
||||
-----------------
|
||||
To start open-iscsi in Red Hat/Fedora you can do:
|
||||
|
||||
@ -85,7 +85,7 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/README open-iscsi-2.0-872-rc3-bnx2i.diff
|
||||
|
||||
To get open-iscsi to automatically start at run time you may have to
|
||||
run:
|
||||
@@ -1115,6 +1110,8 @@ iscsid will only perform rediscovery whe
|
||||
@@ -1183,6 +1178,8 @@ iscsid will only perform rediscovery whe
|
||||
# linux-isns (SLES's iSNS server) where it sometimes does not send SCN
|
||||
# events in the proper format, so they may not get handled.
|
||||
|
||||
@ -94,11 +94,10 @@ diff -aurp open-iscsi-2.0-872-rc3-bnx2i/README open-iscsi-2.0-872-rc3-bnx2i.diff
|
||||
|
||||
Example:
|
||||
--------
|
||||
Only in open-iscsi-2.0-872-rc3-bnx2i.diff/: README.orig
|
||||
diff -aurp open-iscsi-2.0-872-rc3-bnx2i/usr/idbm.c open-iscsi-2.0-872-rc3-bnx2i.diff/usr/idbm.c
|
||||
--- open-iscsi-2.0-872-rc3-bnx2i/usr/idbm.c 2010-07-11 03:45:50.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc3-bnx2i.diff/usr/idbm.c 2010-07-11 03:57:57.000000000 -0500
|
||||
@@ -346,9 +346,13 @@ idbm_recinfo_node(node_rec_t *r, recinfo
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/idbm.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.c 2011-08-14 16:33:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/idbm.c 2011-08-14 16:34:12.000000000 -0500
|
||||
@@ -373,9 +373,13 @@ idbm_recinfo_node(node_rec_t *r, recinfo
|
||||
IDBM_SHOW, "None", "CRC32C", "CRC32C,None",
|
||||
"None,CRC32C", num, 1);
|
||||
sprintf(key, CONN_DATA_DIGEST, i);
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/doc/iscsiadm.8 open-iscsi-2.0-872-rc4-bnx2i.work/doc/iscsiadm.8
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/doc/iscsiadm.8 2011-01-31 02:32:51.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/doc/iscsiadm.8 2011-01-31 02:33:29.000000000 -0600
|
||||
@@ -57,7 +57,7 @@ scsi layer.
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/doc/iscsiadm.8 open-iscsi-2.0-872-rc4-bnx2i.build/doc/iscsiadm.8
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i.base/doc/iscsiadm.8 2011-08-14 16:33:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/doc/iscsiadm.8 2011-08-14 16:41:07.000000000 -0500
|
||||
@@ -57,7 +57,7 @@ MAC address of a scsi host.
|
||||
.TP
|
||||
\fB\-I\fR, \fB\-\-interface=\fI[iface]\fR
|
||||
The interface argument specifies the iSCSI interface to use for the operation.
|
||||
@ -19,7 +19,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i/doc/iscsiadm.8 open-iscsi-2.0-872-rc4-bn
|
||||
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-\-name=\fIname\fR
|
||||
@@ -488,10 +488,10 @@ The configuration file read by \fBiscsid
|
||||
@@ -503,10 +503,10 @@ The configuration file read by \fBiscsid
|
||||
The file containing the iSCSI InitiatorName and InitiatorAlias read by
|
||||
\fBiscsid\fR and \fBiscsiadm\fR on startup.
|
||||
.TP
|
||||
@ -32,9 +32,9 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i/doc/iscsiadm.8 open-iscsi-2.0-872-rc4-bn
|
||||
This directory contains the portals.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/README open-iscsi-2.0-872-rc4-bnx2i.work/README
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/README 2011-01-31 02:32:57.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/README 2011-01-31 02:33:29.000000000 -0600
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/README open-iscsi-2.0-872-rc4-bnx2i.build/README
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i.base/README 2011-08-14 16:41:23.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/README 2011-08-14 16:42:47.000000000 -0500
|
||||
@@ -144,10 +144,10 @@ available on all Linux installations.
|
||||
|
||||
The database contains two tables:
|
||||
@ -49,16 +49,16 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i/README open-iscsi-2.0-872-rc4-bnx2i.work
|
||||
|
||||
The iscsiadm utility is a command-line tool to manage (update, delete,
|
||||
insert, query) the persistent database.
|
||||
@@ -420,7 +420,7 @@ a scsi_host per HBA port).
|
||||
@@ -422,7 +422,7 @@ a scsi_host per HBA port).
|
||||
To manage both types of initiator stacks, iscsiadm uses the interface (iface)
|
||||
structure. For each HBA port or for software iscsi for each network
|
||||
device (ethX) or NIC, that you wish to bind sessions to you must create
|
||||
-a iface config /etc/iscsi/ifaces.
|
||||
+a iface config /var/lib/iscsi/ifaces.
|
||||
|
||||
Running:
|
||||
Prep:
|
||||
|
||||
@@ -428,29 +428,29 @@ Running:
|
||||
@@ -456,29 +456,29 @@ Running:
|
||||
iface0 qla4xxx,00:c0:dd:08:63:e8,20.15.0.7,default,iqn.2005-06.com.redhat:madmax
|
||||
iface1 qla4xxx,00:c0:dd:08:63:ea,20.15.0.9,default,iqn.2005-06.com.redhat:madmax
|
||||
|
||||
@ -93,8 +93,8 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i/README open-iscsi-2.0-872-rc4-bnx2i.work
|
||||
|
||||
iface.transport_name = tcp
|
||||
iface.hwaddress = 00:C0:DD:08:63:E7
|
||||
@@ -499,7 +499,7 @@ iser iser,<empty>,<empty>,<empty>,<empty
|
||||
cxgb3i.00:07:43:05:97:07 cxgb3i,00:07:43:05:97:07,<empty>,<empty>,<empty>
|
||||
@@ -528,7 +528,7 @@ cxgb3i.00:07:43:05:97:07 cxgb3i,00:07:43
|
||||
qla4xxx.00:0e:1e:04:8b:2e qla4xxx,00:0e:1e:04:8b:2e,<empty>,<empty>,<empty>
|
||||
|
||||
|
||||
-Will report iface configurations that are setup in /etc/iscsi/ifaces.
|
||||
@ -102,16 +102,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i/README open-iscsi-2.0-872-rc4-bnx2i.work
|
||||
The format is:
|
||||
|
||||
iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname
|
||||
@@ -515,7 +515,7 @@ default one in /etc/iscsi/initiatorname.
|
||||
|
||||
|
||||
|
||||
-To display these values in a more friendly run:
|
||||
+To display these values in a more friendly way run:
|
||||
|
||||
iscsiadm -m iface -I cxgb3i.00:07:43:05:97:07
|
||||
# BEGIN RECORD 2.0-871
|
||||
@@ -553,7 +553,7 @@ need a seperate network connection to th
|
||||
@@ -614,7 +614,7 @@ need a seperate network connection to th
|
||||
*This will be fixed in the next version of open-iscsi*
|
||||
|
||||
For compatibility reasons, when you run iscsiadm to do discovery, it
|
||||
@ -120,7 +111,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i/README open-iscsi-2.0-872-rc4-bnx2i.work
|
||||
tcp for the iface.transport and it will bind the portals that are discovered
|
||||
so that they will be logged in through those ifaces. This behavior can also
|
||||
be overriden by passing in the interfaces you want to use. For the case
|
||||
@@ -571,7 +571,7 @@ we do not bind a session to a iface, the
|
||||
@@ -632,7 +632,7 @@ we do not bind a session to a iface, the
|
||||
|
||||
iscsiadm -m discoverydb -t st -p ip:port -I default --discover -P 1
|
||||
|
||||
@ -129,7 +120,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i/README open-iscsi-2.0-872-rc4-bnx2i.work
|
||||
not pass anything into iscsiadm, running iscsiadm will do the default
|
||||
behavior, where we allow the network subsystem to decide which
|
||||
device to use.
|
||||
@@ -613,13 +613,13 @@ To now log into targets it is the same a
|
||||
@@ -674,7 +674,7 @@ To now log into targets it is the same a
|
||||
|
||||
./iscsiadm -m discoverydb -t st -p 192.168.1.1:3260 --discover
|
||||
|
||||
@ -138,14 +129,16 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i/README open-iscsi-2.0-872-rc4-bnx2i.work
|
||||
ID [portal = 192.168.1.1:3260 and type = sendtargets. If found it
|
||||
will perform discovery using the settings stored in the record.
|
||||
If a record does not exist, it will be created using the iscsid.conf
|
||||
discovery settings.
|
||||
@@ -683,7 +683,7 @@ To now log into targets it is the same a
|
||||
The argument to -p may also be a hostname instead of an address.
|
||||
./iscsiadm -m discoverydb -t st -p smoehost --discover
|
||||
|
||||
- For the ifaces, iscsiadm will first search /etc/iscsi/ifaces for
|
||||
+ For the ifaces, iscsiadm will first search /var/lib/iscsi/ifaces for
|
||||
interfaces using software iscsi. If any are found then nodes found
|
||||
during discovery will be setup so that they can logged in through
|
||||
those interfaces. To specify a specific iface, pass the
|
||||
@@ -675,7 +675,7 @@ To now log into targets it is the same a
|
||||
@@ -739,7 +739,7 @@ To now log into targets it is the same a
|
||||
This command will perform discovery, but not manipulate the node DB.
|
||||
|
||||
- SendTargets iSCSI Discovery with a specific interface. If you
|
||||
@ -154,7 +147,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i/README open-iscsi-2.0-872-rc4-bnx2i.work
|
||||
then you can pass them in during discovery:
|
||||
|
||||
./iscsiadm -m discoverydb -t sendtargets -p 192.168.1.1:3260 \
|
||||
@@ -982,8 +982,8 @@ where targetname is the name of the targ
|
||||
@@ -1050,8 +1050,8 @@ where targetname is the name of the targ
|
||||
and port of the portal. tpgt, is the portal group tag of
|
||||
the portal, and is not used in iscsiadm commands except for static
|
||||
record creation. And iface name is the name of the iscsi interface
|
||||
@ -165,7 +158,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i/README open-iscsi-2.0-872-rc4-bnx2i.work
|
||||
Default here is iscsi_tcp/tcp to be used over which ever NIC the
|
||||
network layer decides is best.
|
||||
|
||||
@@ -1098,7 +1098,7 @@ If set, iscsid will perform discovery to
|
||||
@@ -1166,7 +1166,7 @@ If set, iscsid will perform discovery to
|
||||
discovery.isns.discoveryd_poll_inval or
|
||||
discovery.sendtargets.discoveryd_poll_inval seconds,
|
||||
and it will log into any portals found from the discovery source using
|
||||
@ -174,10 +167,10 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i/README open-iscsi-2.0-872-rc4-bnx2i.work
|
||||
|
||||
Note that for iSNS the poll_interval does not have to be set. If not set,
|
||||
iscsid will only perform rediscovery when it gets a SCN from the server.
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.c 2011-01-31 02:32:57.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.c 2011-01-31 02:33:29.000000000 -0600
|
||||
@@ -2285,9 +2285,9 @@ free_info:
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/idbm.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.c 2011-08-14 16:41:23.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/idbm.c 2011-08-14 16:41:07.000000000 -0500
|
||||
@@ -2359,9 +2359,9 @@ free_info:
|
||||
int idbm_init(idbm_get_config_file_fn *fn)
|
||||
{
|
||||
/* make sure root db dir is there */
|
||||
@ -190,9 +183,9 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.c open-iscsi-2.0-872-rc4-bnx2i.
|
||||
errno);
|
||||
return errno;
|
||||
}
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.h 2011-01-31 02:32:51.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/idbm.h 2011-01-31 02:33:29.000000000 -0600
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.h open-iscsi-2.0-872-rc4-bnx2i.build/usr/idbm.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.h 2011-08-14 16:33:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/idbm.h 2011-08-14 16:41:07.000000000 -0500
|
||||
@@ -27,12 +27,15 @@
|
||||
#include "initiator.h"
|
||||
#include "config.h"
|
||||
@ -215,9 +208,9 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/idbm.h open-iscsi-2.0-872-rc4-bnx2i.
|
||||
#define ST_CONFIG_NAME "st_config"
|
||||
#define ISNS_CONFIG_NAME "isns_config"
|
||||
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/iface.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/iface.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iface.h 2010-07-11 04:05:58.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iface.h 2011-01-31 02:33:29.000000000 -0600
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iface.h open-iscsi-2.0-872-rc4-bnx2i.build/usr/iface.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i.base/usr/iface.h 2011-08-14 16:33:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/iface.h 2011-08-14 16:41:07.000000000 -0500
|
||||
@@ -20,7 +20,9 @@
|
||||
#ifndef ISCSI_IFACE_H
|
||||
#define ISCSI_IFACE_H
|
||||
|
@ -3,15 +3,15 @@
|
||||
Summary: iSCSI daemon and utility programs
|
||||
Name: iscsi-initiator-utils
|
||||
Version: 6.2.0.872
|
||||
Release: 21%{?dist}
|
||||
Release: 22%{?dist}
|
||||
Source0: http://people.redhat.com/mchristi/iscsi/rhel6.0/source/open-iscsi-2.0-872-rc4-bnx2i.tar.gz
|
||||
Source1: iscsid.init
|
||||
Source2: iscsidevs.init
|
||||
Source3: 04-iscsi
|
||||
|
||||
# sync brcm to 0.6.2.14
|
||||
Patch0: iscsi-initiator-utils-sync-brcm-0.6.2.14.patch
|
||||
# sync iscsi tools to upstream commit 6a9fc9ff0f49eac37da86847268dda437609f1d4
|
||||
# sync brcm to 0.7.0.8
|
||||
Patch0: iscsi-initiator-utils-sync-uio-0.7.0.8.patch
|
||||
# sync iscsi tools to upstream commit e8c5b1d34ee5ce0a755ff54518829156dfa5fabe
|
||||
Patch1: iscsi-initiator-utils-sync-iscsi.patch
|
||||
# Add Red Hat specific info to docs.
|
||||
Patch2: iscsi-initiator-utils-update-initscripts-and-docs.patch
|
||||
@ -25,30 +25,14 @@ Patch5: iscsi-initiator-utils-add-libiscsi.patch
|
||||
Patch6: iscsi-initiator-utils-uip-mgmt.patch
|
||||
# Don't compile iscsistart as static
|
||||
Patch7: iscsi-initiator-utils-dont-use-static.patch
|
||||
# Log message and hint when login failed and using iface binding.
|
||||
Patch8: iscsi-initiator-utils-log-login-failed.patch
|
||||
# Remove the OFFLOAD_BOOT_SUPPORTED #ifdef.
|
||||
Patch9: iscsi-initiator-utils-remove-the-offload-boot-supported-ifdef.patch
|
||||
# libiscsi: reimplement fw discovery so partial devices are used properly.
|
||||
Patch10: iscsi-initiator-utils-libiscsi-partial-offload-discovery.patch
|
||||
Patch8: iscsi-initiator-utils-remove-the-offload-boot-supported-ifdef.patch
|
||||
# brcm uio: handle the different iface_rec structures in iscsid and brcm.
|
||||
Patch11: iscsi-initiator-utils-uio-handle-different-iface_rec.patch
|
||||
Patch9: iscsi-initiator-utils-uio-handle-different-iface_rec.patch
|
||||
# Document missing brcm arguments
|
||||
Patch12: iscsi-initiator-utils-brcm-man.patch
|
||||
# DCB iscsi support
|
||||
Patch13: iscsi-initiator-utils-dcb.patch
|
||||
# libiscsi: nodes remember their interface
|
||||
Patch14: iscsi-initiator-utils-libiscsi-nodes-remember-the-interface.patch
|
||||
# Upstream commit from 9803f14e172c560b0120689cd91945f166c2f07e to
|
||||
# fcd08dfbd02a279ffa69618a5216f6cf4f88e1da (will be rolled into rebase next
|
||||
# release)
|
||||
Patch15: iscsi-initiator-utils-fixes.patch
|
||||
# node mode hostname support
|
||||
Patch16: iscsi-initiator-utils-node-hostname.patch
|
||||
# created offload boot session if ibft and iscsi_host mac match
|
||||
Patch17: iscsi-initiator-utils-fix-bnx2i-mac-match.patch
|
||||
# pki is not used by isns so do not build with it
|
||||
Patch18: iscsi-initiator-utils-disable-crypto.patch
|
||||
Patch10: iscsi-initiator-utils-brcm-man.patch
|
||||
# setup default ifaces for all ifaces in kernel
|
||||
Patch11: iscsi-initiator-utils-fix-default-bindings.patch
|
||||
|
||||
Group: System Environment/Daemons
|
||||
License: GPLv2+
|
||||
@ -76,7 +60,7 @@ developing applications that use %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n open-iscsi-2.0-872-rc4-bnx2i
|
||||
%patch0 -p1 -b .sync-brcm-0.6.2.14
|
||||
%patch0 -p1 -b .sync-uio-0.7.0.8
|
||||
%patch1 -p1 -b .sync-iscsi
|
||||
%patch2 -p1 -b .update-initscripts-and-docs
|
||||
%patch3 -p1 -b .use-var-for-config
|
||||
@ -84,17 +68,10 @@ developing applications that use %{name}.
|
||||
%patch5 -p1 -b .add-libiscsi
|
||||
%patch6 -p1 -b .uip-mgmt
|
||||
%patch7 -p1 -b .dont-use-static
|
||||
%patch8 -p1 -b .log-login-failed
|
||||
%patch9 -p1 -b .remove-the-offload-boot-supported-ifdef
|
||||
%patch10 -p1 -b .libiscsi-partial-offload
|
||||
%patch11 -p1 -b .uio-handle-different-iface_rec
|
||||
%patch12 -p1 -b .brcm-man
|
||||
%patch13 -p1 -b .dcb
|
||||
%patch14 -p1 -b .libiscsi-remember-the-interface
|
||||
%patch15 -p1 -b .fixes
|
||||
%patch16 -p1 -b .node-hostname
|
||||
%patch17 -p1 -b .fix-bnx2i-mac-match
|
||||
%patch18 -p1 -b .disable-crypto
|
||||
%patch8 -p1 -b .remove-the-offload-boot-supported-ifdef
|
||||
%patch9 -p1 -b .uio-handle-different-iface_rec
|
||||
%patch10 -p1 -b .brcm-man
|
||||
%patch11 -p1 -b .fix-default-bindings
|
||||
|
||||
%build
|
||||
cd utils/open-isns
|
||||
@ -107,7 +84,8 @@ make OPTFLAGS="%{optflags}" -C usr
|
||||
make OPTFLAGS="%{optflags}" -C utils
|
||||
make OPTFLAGS="%{optflags}" -C libiscsi
|
||||
|
||||
cd brcm_iscsi_uio
|
||||
cd iscsiuio
|
||||
chmod u+x configure
|
||||
./configure --enable-debug
|
||||
make OPTFLAGS="%{optflags}"
|
||||
cd ..
|
||||
@ -138,7 +116,7 @@ mkdir -p $RPM_BUILD_ROOT%{python_sitearch}
|
||||
|
||||
|
||||
install -p -m 755 usr/iscsid usr/iscsiadm utils/iscsi-iname usr/iscsistart $RPM_BUILD_ROOT/sbin
|
||||
install -m 755 brcm_iscsi_uio/src/unix/brcm_iscsiuio $RPM_BUILD_ROOT/sbin
|
||||
install -m 755 iscsiuio/src/unix/iscsiuio $RPM_BUILD_ROOT/sbin
|
||||
install -p -m 644 doc/iscsiadm.8 $RPM_BUILD_ROOT/%{_mandir}/man8
|
||||
install -p -m 644 doc/iscsid.8 $RPM_BUILD_ROOT/%{_mandir}/man8
|
||||
install -p -m 644 doc/iscsistart.8 $RPM_BUILD_ROOT/%{_mandir}/man8
|
||||
@ -156,6 +134,8 @@ install -p -m 644 libiscsi/libiscsi.h $RPM_BUILD_ROOT%{_includedir}
|
||||
|
||||
install -p -m 755 libiscsi/build/lib.linux-*/libiscsimodule.so \
|
||||
$RPM_BUILD_ROOT%{python_sitearch}
|
||||
#compat support for older tools that are not aware of the name change
|
||||
ln -s iscsiuio $RPM_BUILD_ROOT/sbin/brcm_iscsi_uio
|
||||
|
||||
|
||||
%clean
|
||||
@ -163,6 +143,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
if [ "$1" -eq "1" ]; then
|
||||
if [ ! -f %{_sysconfdir}/iscsi/initiatorname.iscsi ]; then
|
||||
echo "InitiatorName=`/sbin/iscsi-iname`" > %{_sysconfdir}/iscsi/initiatorname.iscsi
|
||||
@ -213,6 +194,10 @@ fi
|
||||
%{_includedir}/libiscsi.h
|
||||
|
||||
%changelog
|
||||
* Sun Aug 14 2011 Mike Christie <mcrhsit@redhat.com> 6.2.0.872.22
|
||||
- 696808 Sync brcm/uio to v0.7.0.8.
|
||||
- 715434 Fix iscsiadm command line help discoverydb/discovery2 description.
|
||||
|
||||
* Tue Apr 19 2011 Mike Christie <mcrhsit@redhat.com> 6.2.0.872.21
|
||||
- 593269 iscsi was built against libcrypto, but was not using the code
|
||||
so this disabled the building of that code [patch from .14 got dropped
|
||||
|
@ -42,7 +42,7 @@ start_iscsid() {
|
||||
modprobe -q cxgb4i
|
||||
modprobe -q bnx2i
|
||||
modprobe -q be2iscsi
|
||||
daemon brcm_iscsiuio
|
||||
daemon iscsiuio
|
||||
daemon $prog
|
||||
retval=$?
|
||||
echo
|
||||
@ -104,8 +104,8 @@ stop() {
|
||||
iscsiadm -k 0 2>/dev/null
|
||||
echo
|
||||
|
||||
killproc brcm_iscsiuio
|
||||
rm -f /var/run/brcm_iscsiuio.pid
|
||||
killproc iscsiuio
|
||||
rm -f /var/run/iscsiuio.pid
|
||||
|
||||
# only remove the iscsi drivers when offload is used
|
||||
rmmod bnx2i 2>/dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user