rebase to latest upstream (2.0.873+) and iscsiuio
This commit is contained in:
parent
9cb10ddbba
commit
0e55d5ba8c
18
.gitignore
vendored
18
.gitignore
vendored
@ -1,16 +1,2 @@
|
||||
open-iscsi-5.0.4.446.tar.gz
|
||||
open-iscsi-5.0.5.476.tar.bz2
|
||||
open-iscsi-5.0.5.595.tar.bz2
|
||||
open-iscsi-6.0.5.595.tar.bz2
|
||||
open-iscsi-1.1-645.tar.bz2
|
||||
open-iscsi-6.1.1.645.tar.bz2
|
||||
open-iscsi-6.1.1.685.tar.bz2
|
||||
open-iscsi-6.2.0.695.tar.bz2
|
||||
open-iscsi-2.0-754.tar.gz
|
||||
open-iscsi-2.0-865.2.tar.gz
|
||||
open-iscsi-2.0-865.13.tar.gz
|
||||
open-iscsi-2.0-868-test1.tar.gz
|
||||
open-iscsi-2.0-870-rc1.tar.gz
|
||||
open-iscsi-2.0-870.1.tar.gz
|
||||
open-iscsi-2.0-872-rc1-bnx2i.tar.gz
|
||||
open-iscsi-2.0-872-rc4-bnx2i.tar.gz
|
||||
/open-iscsi-2.0-873.tar.gz
|
||||
/iscsiuio-0.7.2.1.tar.gz
|
||||
|
43
0001-iscsid-fix-iscsid-segfault-during-qla4xxx-login.patch
Normal file
43
0001-iscsid-fix-iscsid-segfault-during-qla4xxx-login.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 71cd021b74a7094b5186a42bfe59a35e2fa66018 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Christie <michaelc@cs.wisc.edu>
|
||||
Date: Wed, 5 Sep 2012 16:18:16 -0500
|
||||
Subject: iscsid: fix iscsid segfault during qla4xxx login
|
||||
|
||||
If the kernel sends multiple ISCSI_KEVENT_CONN_LOGIN_STATE
|
||||
events for the same login event iscsid will segault.
|
||||
|
||||
When we get a conn error we will set the r_stage to reopen, then when
|
||||
session_conn_process_login handles the first login event we set the r_stage
|
||||
to R_STAGE_NO_CHANGE. But then it looks like if we get a second login event
|
||||
r_stage is no_change and session_conn_process_login will run again and
|
||||
call mgmt_ipc_write_rsp on a bad qtask.
|
||||
---
|
||||
usr/initiator.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/usr/initiator.c b/usr/initiator.c
|
||||
index 79ca32c..d475358 100644
|
||||
--- a/usr/initiator.c
|
||||
+++ b/usr/initiator.c
|
||||
@@ -993,7 +993,7 @@ static void session_scan_host(struct iscsi_session *session, int hostno,
|
||||
exit(0);
|
||||
} else if (pid > 0) {
|
||||
reap_inc();
|
||||
- if (qtask) {
|
||||
+ if (qtask && qtask->mgmt_ipc_fd >= 0) {
|
||||
close(qtask->mgmt_ipc_fd);
|
||||
free(qtask);
|
||||
}
|
||||
@@ -1618,6 +1618,9 @@ static void session_conn_process_login(void *data)
|
||||
if (state == ISCSI_CONN_STATE_FREE)
|
||||
goto failed_login;
|
||||
|
||||
+ if (conn->state == ISCSI_CONN_STATE_LOGGED_IN)
|
||||
+ return;
|
||||
+
|
||||
conn->state = ISCSI_CONN_STATE_LOGGED_IN;
|
||||
/*
|
||||
* ok we were in_login and now we got the notification that we are
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -0,0 +1,37 @@
|
||||
From f0a8c95426d21413d9980d31740e193208e3280e Mon Sep 17 00:00:00 2001
|
||||
From: Eddie Wai <eddie.wai@broadcom.com>
|
||||
Date: Wed, 5 Sep 2012 14:14:20 -0700
|
||||
Subject: ISCSISTART: Bring up the corresponding network interface for iboot
|
||||
|
||||
This is needed for the iSCSI offload boot.
|
||||
|
||||
Snip from M. Christie:
|
||||
Note that we must bring up the interface before iface_setup_from_boot_context,
|
||||
because we will want iscsi_sysfs_get_host_no_from_hwaddress to be able to match
|
||||
a MAC to a iscsi host. For some bnx2i cards, the card has to be ifupd for the
|
||||
iscsi interface to have a MAC. If it is not ifupd we have seen MACs with all
|
||||
zeros or no iscsi_hosts on different cards.
|
||||
|
||||
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
|
||||
---
|
||||
usr/iface.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/usr/iface.c b/usr/iface.c
|
||||
index 3a9582e..4028e34 100644
|
||||
--- a/usr/iface.c
|
||||
+++ b/usr/iface.c
|
||||
@@ -917,6 +917,10 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
|
||||
transport_name))
|
||||
t = iscsi_sysfs_get_transport_by_name(transport_name);
|
||||
|
||||
+ if (net_ifup_netdev(context->iface))
|
||||
+ log_warning("Could not bring up netdev %s for boot",
|
||||
+ context->iface);
|
||||
+
|
||||
hostno = iscsi_sysfs_get_host_no_from_hwaddress(context->mac,
|
||||
&rc);
|
||||
if (rc) {
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -0,0 +1,35 @@
|
||||
From d81fd4903cebb1d00aa48b0718d20e34b00dfde1 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Christie <michaelc@cs.wisc.edu>
|
||||
Date: Wed, 26 Sep 2012 21:19:39 -0500
|
||||
Subject: iscsi tools: fix compile error when OFFLOAD_BOOT_SUPPORT defined
|
||||
|
||||
Fix compile error when OFFLOAD_BOOT_SUPPORT is defined and fix
|
||||
warning when it is defined.
|
||||
---
|
||||
usr/iface.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/usr/iface.c b/usr/iface.c
|
||||
index 4028e34..4f81a76 100644
|
||||
--- a/usr/iface.c
|
||||
+++ b/usr/iface.c
|
||||
@@ -894,7 +894,6 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
|
||||
struct boot_context *context)
|
||||
{
|
||||
struct iscsi_transport *t = NULL;
|
||||
- char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN];
|
||||
uint32_t hostno;
|
||||
|
||||
if (strlen(context->initiatorname))
|
||||
@@ -910,6 +909,8 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
|
||||
} else if (strlen(context->iface)) {
|
||||
/* this ifdef is only temp until distros and firmwares are updated */
|
||||
#ifdef OFFLOAD_BOOT_SUPPORTED
|
||||
+ char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN];
|
||||
+ int rc;
|
||||
|
||||
memset(transport_name, 0, ISCSI_TRANSPORT_NAME_MAXLEN);
|
||||
/* make sure offload driver is loaded */
|
||||
--
|
||||
1.7.11.7
|
||||
|
32
0004-ISCSID-Passing-more-net-params-from-ibft-to-iface.patch
Normal file
32
0004-ISCSID-Passing-more-net-params-from-ibft-to-iface.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 13d08e79090421fbf67fd727aada487ea23ecc2d Mon Sep 17 00:00:00 2001
|
||||
From: Eddie Wai <eddie.wai@broadcom.com>
|
||||
Date: Thu, 27 Sep 2012 13:57:12 -0700
|
||||
Subject: ISCSID: Passing more net params from ibft to iface
|
||||
|
||||
Added the passing of the vlan_id, subnet_mask, and gateway attributes
|
||||
from the ibft context to the iface struct for the connection request.
|
||||
|
||||
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
|
||||
---
|
||||
usr/iface.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/usr/iface.c b/usr/iface.c
|
||||
index 4f81a76..c86892e 100644
|
||||
--- a/usr/iface.c
|
||||
+++ b/usr/iface.c
|
||||
@@ -962,6 +962,11 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
|
||||
sizeof(iface->hwaddress));
|
||||
strlcpy(iface->ipaddress, context->ipaddr,
|
||||
sizeof(iface->ipaddress));
|
||||
+ iface->vlan_id = atoi(context->vlan);
|
||||
+ strlcpy(iface->subnet_mask, context->mask,
|
||||
+ sizeof(iface->subnet_mask));
|
||||
+ strlcpy(iface->gateway, context->gateway,
|
||||
+ sizeof(iface->gateway));
|
||||
log_debug(1, "iface " iface_fmt "\n", iface_str(iface));
|
||||
return 1;
|
||||
}
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -0,0 +1,62 @@
|
||||
From 9dd181dcb1ca299cd82075b8e598fc57d87ee1c0 Mon Sep 17 00:00:00 2001
|
||||
From: Jim Ramsay <jim_ramsay@dell.com>
|
||||
Date: Wed, 3 Oct 2012 09:57:43 -0400
|
||||
Subject: iscsi tools: Convert '-r' argument to an integer before checking if
|
||||
it is a path
|
||||
|
||||
If there is a file in the CWD named '1' and you were trying to run
|
||||
'iscsiadm -m session -r 1 ...', the command would fail with "1 is not a
|
||||
directory".
|
||||
|
||||
Root cause: The code that parses the -r option's argument tries lstat(2)
|
||||
first, falling back to atoi(3) only if lstat fails.
|
||||
|
||||
This change inverts the order of checks, first with strtol(3) to see if
|
||||
the argument given is a positive integer, then falling back to lstat(2)
|
||||
only if it is not.
|
||||
|
||||
Signed-off-by: Jim Ramsay <jim_ramsay@dell.com>
|
||||
---
|
||||
usr/iscsi_sysfs.c | 17 +++++++++--------
|
||||
1 file changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c
|
||||
index 123dde3..4015b35 100644
|
||||
--- a/usr/iscsi_sysfs.c
|
||||
+++ b/usr/iscsi_sysfs.c
|
||||
@@ -740,7 +740,7 @@ int iscsi_sysfs_session_has_leadconn(uint32_t sid)
|
||||
* /sys/devices/platform/hostH/sessionS/targetH:B:I
|
||||
* /sys/devices/platform/hostH/sessionS
|
||||
*
|
||||
- * return the sid S. If just the sid is passed in it will be covnerted
|
||||
+ * return the sid S. If just the sid is passed in it will be converted
|
||||
* to a int.
|
||||
*/
|
||||
int iscsi_sysfs_get_sid_from_path(char *session)
|
||||
@@ -748,15 +748,16 @@ int iscsi_sysfs_get_sid_from_path(char *session)
|
||||
struct sysfs_device *dev_parent, *dev;
|
||||
struct stat statb;
|
||||
char devpath[PATH_SIZE];
|
||||
+ char *end;
|
||||
+ int sid;
|
||||
+
|
||||
+ sid = strtol(session, &end, 10);
|
||||
+ if (sid > 0 && *session != '\0' && *end == '\0')
|
||||
+ return sid;
|
||||
|
||||
if (lstat(session, &statb)) {
|
||||
- log_debug(1, "Could not stat %s failed with %d",
|
||||
- session, errno);
|
||||
- if (index(session, '/')) {
|
||||
- log_error("%s is an invalid session path\n", session);
|
||||
- exit(1);
|
||||
- }
|
||||
- return atoi(session);
|
||||
+ log_error("%s is an invalid session ID or path\n", session);
|
||||
+ exit(1);
|
||||
}
|
||||
|
||||
if (!S_ISDIR(statb.st_mode) && !S_ISLNK(statb.st_mode)) {
|
||||
--
|
||||
1.7.11.7
|
||||
|
49
0006-Update-README-for-removal-of-DBM-requirement.patch
Normal file
49
0006-Update-README-for-removal-of-DBM-requirement.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From 97db3db45c7e96888ea48a54ff19b7ff5d08cca6 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Grover <agrover@redhat.com>
|
||||
Date: Wed, 24 Oct 2012 15:37:28 -0700
|
||||
Subject: Update README for removal of DBM requirement
|
||||
|
||||
Removed in 093b1f4 (2006)
|
||||
|
||||
Signed-off-by: Andy Grover <agrover@redhat.com>
|
||||
---
|
||||
README | 23 ++++++++++++++---------
|
||||
1 file changed, 14 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/README b/README
|
||||
index 7364b2d..ec22098 100644
|
||||
--- a/README
|
||||
+++ b/README
|
||||
@@ -159,15 +159,20 @@ Usage: iscsid [OPTION]
|
||||
5. Open-iSCSI Configuration Utility
|
||||
===================================
|
||||
|
||||
-Open-iSCSI persistent configuration is implemented as a DBM database
|
||||
-available on all Linux installations.
|
||||
-
|
||||
-The database contains two tables:
|
||||
-
|
||||
-- Discovery table (/etc/iscsi/send_targets);
|
||||
-- Node table (/etc/iscsi/nodes).
|
||||
-
|
||||
-The regular place for iSCSI database files: /etc/iscsi/nodes
|
||||
+Open-iSCSI persistent configuration is stored in a number of
|
||||
+directories under a configuration root directory, using a flat-file
|
||||
+format. This configuration root directory is /etc/iscsi by default,
|
||||
+but may also commonly be in /var/lib/iscsi.
|
||||
+
|
||||
+Configuration is contained in directories for:
|
||||
+
|
||||
+- nodes
|
||||
+- slp
|
||||
+- isns
|
||||
+- static
|
||||
+- fw
|
||||
+- send_targets
|
||||
+- ifaces
|
||||
|
||||
The iscsiadm utility is a command-line tool to manage (update, delete,
|
||||
insert, query) the persistent database.
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -0,0 +1,80 @@
|
||||
From 2d086a831dc16d10729d6fce17bed3ade3efd16c Mon Sep 17 00:00:00 2001
|
||||
From: Tomasz Torcz <tomek@pipebreaker.pl>
|
||||
Date: Wed, 28 Nov 2012 13:37:06 +0100
|
||||
Subject: iscsid,iscsiadm: fix abstract socket length in bind() call
|
||||
|
||||
For abstract sockets, the addrlen parameter should be the actual
|
||||
length of socket's name. Otherwise socket gets padded with some
|
||||
number of NULs.
|
||||
---
|
||||
usr/iscsid_req.c | 10 ++++++----
|
||||
usr/mgmt_ipc.c | 9 +++++----
|
||||
2 files changed, 11 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/usr/iscsid_req.c b/usr/iscsid_req.c
|
||||
index 0902011..1c4678d 100644
|
||||
--- a/usr/iscsid_req.c
|
||||
+++ b/usr/iscsid_req.c
|
||||
@@ -56,7 +56,7 @@ static void iscsid_startup(void)
|
||||
|
||||
static int iscsid_connect(int *fd, int start_iscsid)
|
||||
{
|
||||
- int nsec;
|
||||
+ int nsec, addr_len;
|
||||
struct sockaddr_un addr;
|
||||
|
||||
*fd = socket(AF_LOCAL, SOCK_STREAM, 0);
|
||||
@@ -65,15 +65,17 @@ static int iscsid_connect(int *fd, int start_iscsid)
|
||||
return ISCSI_ERR_ISCSID_NOTCONN;
|
||||
}
|
||||
|
||||
+ addr_len = offsetof(struct sockaddr_un, sun_path) + strlen(ISCSIADM_NAMESPACE) + 1;
|
||||
+
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sun_family = AF_LOCAL;
|
||||
- memcpy((char *) &addr.sun_path + 1, ISCSIADM_NAMESPACE,
|
||||
- strlen(ISCSIADM_NAMESPACE));
|
||||
+ memcpy((char *) &addr.sun_path + 1, ISCSIADM_NAMESPACE, addr_len);
|
||||
+
|
||||
/*
|
||||
* Trying to connect with exponential backoff
|
||||
*/
|
||||
for (nsec = 1; nsec <= MAXSLEEP; nsec <<= 1) {
|
||||
- if (connect(*fd, (struct sockaddr *) &addr, sizeof(addr)) == 0)
|
||||
+ if (connect(*fd, (struct sockaddr *) &addr, addr_len) == 0)
|
||||
/* Connection established */
|
||||
return ISCSI_SUCCESS;
|
||||
|
||||
diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c
|
||||
index 5c39c2e..a1dafc9 100644
|
||||
--- a/usr/mgmt_ipc.c
|
||||
+++ b/usr/mgmt_ipc.c
|
||||
@@ -43,7 +43,7 @@
|
||||
int
|
||||
mgmt_ipc_listen(void)
|
||||
{
|
||||
- int fd, err;
|
||||
+ int fd, err, addr_len;
|
||||
struct sockaddr_un addr;
|
||||
|
||||
fd = socket(AF_LOCAL, SOCK_STREAM, 0);
|
||||
@@ -52,12 +52,13 @@ mgmt_ipc_listen(void)
|
||||
return fd;
|
||||
}
|
||||
|
||||
+ addr_len = offsetof(struct sockaddr_un, sun_path) + strlen(ISCSIADM_NAMESPACE) + 1;
|
||||
+
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sun_family = AF_LOCAL;
|
||||
- memcpy((char *) &addr.sun_path + 1, ISCSIADM_NAMESPACE,
|
||||
- strlen(ISCSIADM_NAMESPACE));
|
||||
+ memcpy((char *) &addr.sun_path + 1, ISCSIADM_NAMESPACE, addr_len);
|
||||
|
||||
- if ((err = bind(fd, (struct sockaddr *) &addr, sizeof(addr))) < 0) {
|
||||
+ if ((err = bind(fd, (struct sockaddr *) &addr, addr_len)) < 0 ) {
|
||||
log_error("Can not bind IPC socket");
|
||||
close(fd);
|
||||
return err;
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -0,0 +1,79 @@
|
||||
From 5d0e19fcc1cea77a72647cf96c5d3d773e8ee277 Mon Sep 17 00:00:00 2001
|
||||
From: Tomasz Torcz <tomek@pipebreaker.pl>
|
||||
Date: Wed, 28 Nov 2012 13:37:07 +0100
|
||||
Subject: iscsid: implement systemd-compatible socket activation
|
||||
|
||||
---
|
||||
usr/mgmt_ipc.c | 29 +++++++++++++++++++++++++++++
|
||||
usr/mgmt_ipc.h | 1 +
|
||||
2 files changed, 30 insertions(+)
|
||||
|
||||
diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c
|
||||
index a1dafc9..87bd346 100644
|
||||
--- a/usr/mgmt_ipc.c
|
||||
+++ b/usr/mgmt_ipc.c
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#define PEERUSER_MAX 64
|
||||
#define EXTMSG_MAX (64 * 1024)
|
||||
+#define SD_SOCKET_FDS_START 3
|
||||
|
||||
int
|
||||
mgmt_ipc_listen(void)
|
||||
@@ -46,6 +47,12 @@ mgmt_ipc_listen(void)
|
||||
int fd, err, addr_len;
|
||||
struct sockaddr_un addr;
|
||||
|
||||
+ /* first check if we have fd handled by systemd */
|
||||
+ fd = mgmt_ipc_systemd();
|
||||
+ if (fd >= 0)
|
||||
+ return fd;
|
||||
+
|
||||
+ /* manually establish a socket */
|
||||
fd = socket(AF_LOCAL, SOCK_STREAM, 0);
|
||||
if (fd < 0) {
|
||||
log_error("Can not create IPC socket");
|
||||
@@ -73,6 +80,28 @@ mgmt_ipc_listen(void)
|
||||
return fd;
|
||||
}
|
||||
|
||||
+int mgmt_ipc_systemd(void)
|
||||
+{
|
||||
+ const char *env;
|
||||
+
|
||||
+ env = getenv("LISTEN_PID");
|
||||
+
|
||||
+ if (!env || (strtoul(env, NULL, 10) != getpid()))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ env = getenv("LISTEN_FDS");
|
||||
+
|
||||
+ if (!env)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (strtoul(env, NULL, 10) != 1) {
|
||||
+ log_error("Did not receive exactly one IPC socket from systemd");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ return SD_SOCKET_FDS_START;
|
||||
+}
|
||||
+
|
||||
void
|
||||
mgmt_ipc_close(int fd)
|
||||
{
|
||||
diff --git a/usr/mgmt_ipc.h b/usr/mgmt_ipc.h
|
||||
index 7d8ce72..55972ed 100644
|
||||
--- a/usr/mgmt_ipc.h
|
||||
+++ b/usr/mgmt_ipc.h
|
||||
@@ -112,6 +112,7 @@ typedef int mgmt_ipc_fn_t(struct queue_task *);
|
||||
struct queue_task;
|
||||
void mgmt_ipc_write_rsp(struct queue_task *qtask, int err);
|
||||
int mgmt_ipc_listen(void);
|
||||
+int mgmt_ipc_systemd(void);
|
||||
void mgmt_ipc_close(int fd);
|
||||
void mgmt_ipc_handle(int accept_fd);
|
||||
|
||||
--
|
||||
1.7.11.7
|
||||
|
54
0009-iscsid-add-example-unit-files-for-systemd.patch
Normal file
54
0009-iscsid-add-example-unit-files-for-systemd.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From c34e0bdcbafdb6f9304e1474d51fe1c789c5dea2 Mon Sep 17 00:00:00 2001
|
||||
From: Tomasz Torcz <tomek@pipebreaker.pl>
|
||||
Date: Wed, 28 Nov 2012 13:37:08 +0100
|
||||
Subject: iscsid: add example unit files for systemd
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Those two units, based on the work by Jóhann B. Guðmundsson, exploit
|
||||
on-demand socket activation in iscsid.
|
||||
---
|
||||
etc/systemd/iscsid.service | 13 +++++++++++++
|
||||
etc/systemd/iscsid.socket | 9 +++++++++
|
||||
2 files changed, 22 insertions(+)
|
||||
create mode 100644 etc/systemd/iscsid.service
|
||||
create mode 100644 etc/systemd/iscsid.socket
|
||||
|
||||
diff --git a/etc/systemd/iscsid.service b/etc/systemd/iscsid.service
|
||||
new file mode 100644
|
||||
index 0000000..028e0b3
|
||||
--- /dev/null
|
||||
+++ b/etc/systemd/iscsid.service
|
||||
@@ -0,0 +1,13 @@
|
||||
+[Unit]
|
||||
+Description=Open-iSCSI
|
||||
+Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8)
|
||||
+After=network.target NetworkManager-wait-online.service iscsiuio.service tgtd.service targetcli.service
|
||||
+
|
||||
+[Service]
|
||||
+Type=forking
|
||||
+PIDFile=/var/run/iscsid.pid
|
||||
+ExecStart=/usr/sbin/iscsid
|
||||
+ExecStop=/sbin/iscsiadm -k 0 2
|
||||
+
|
||||
+[Install]
|
||||
+WantedBy=multi-user.target
|
||||
diff --git a/etc/systemd/iscsid.socket b/etc/systemd/iscsid.socket
|
||||
new file mode 100644
|
||||
index 0000000..832451d
|
||||
--- /dev/null
|
||||
+++ b/etc/systemd/iscsid.socket
|
||||
@@ -0,0 +1,9 @@
|
||||
+[Unit]
|
||||
+Description=Open-iSCSI iscsid Socket
|
||||
+Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8)
|
||||
+
|
||||
+[Socket]
|
||||
+ListenStream=@ISCSIADM_ABSTRACT_NAMESPACE
|
||||
+
|
||||
+[Install]
|
||||
+WantedBy=sockets.target
|
||||
--
|
||||
1.7.11.7
|
||||
|
61
0010-iscsi-tools-fix-get_random_bytes-error-handling.patch
Normal file
61
0010-iscsi-tools-fix-get_random_bytes-error-handling.patch
Normal file
@ -0,0 +1,61 @@
|
||||
From a7afdf46c3193eb102cc6ec2a3b61e8d36794437 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Christie <michaelc@cs.wisc.edu>
|
||||
Date: Fri, 14 Dec 2012 12:40:27 -0600
|
||||
Subject: iscsi tools: fix get_random_bytes error handling
|
||||
|
||||
Bug report from Rahul:
|
||||
|
||||
There seems to be a bug in function get_random_bytes(). I reported
|
||||
this earlier as well but somehow it didn't appear here.
|
||||
|
||||
get_random_bytes(unsigned char *data, unsigned int length)
|
||||
{
|
||||
long r;
|
||||
unsigned n;
|
||||
int fd;
|
||||
|
||||
fd = open("/dev/urandom", O_RDONLY);
|
||||
while (length > 0) {
|
||||
|
||||
if (!fd || read(fd, &r, sizeof(long)) != -1) <<<< the condition is
|
||||
incorrect
|
||||
---
|
||||
usr/auth.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/usr/auth.c b/usr/auth.c
|
||||
index c924545..4ff0425 100644
|
||||
--- a/usr/auth.c
|
||||
+++ b/usr/auth.c
|
||||
@@ -189,24 +189,24 @@ get_random_bytes(unsigned char *data, unsigned int length)
|
||||
|
||||
long r;
|
||||
unsigned n;
|
||||
- int fd;
|
||||
+ int fd, r_size = sizeof(r);
|
||||
|
||||
fd = open("/dev/urandom", O_RDONLY);
|
||||
while (length > 0) {
|
||||
|
||||
- if (!fd || read(fd, &r, sizeof(long)) != -1)
|
||||
+ if (fd == -1 || read(fd, &r, r_size) != r_size)
|
||||
r = rand();
|
||||
r = r ^ (r >> 8);
|
||||
r = r ^ (r >> 4);
|
||||
n = r & 0x7;
|
||||
|
||||
- if (!fd || read(fd, &r, sizeof(long)) != -1)
|
||||
+ if (fd == -1 || read(fd, &r, r_size) != r_size)
|
||||
r = rand();
|
||||
r = r ^ (r >> 8);
|
||||
r = r ^ (r >> 5);
|
||||
n = (n << 3) | (r & 0x7);
|
||||
|
||||
- if (!fd || read(fd, &r, sizeof(long)) != -1)
|
||||
+ if (fd == -1 || read(fd, &r, r_size) != r_size)
|
||||
r = rand();
|
||||
r = r ^ (r >> 8);
|
||||
r = r ^ (r >> 5);
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -1,6 +1,52 @@
|
||||
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
|
||||
From 9e68a86626e9085af1d7a457bf28d2347c0d9356 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Leech <cleech@redhat.com>
|
||||
Date: Mon, 19 Nov 2012 16:37:13 -0800
|
||||
Subject: update initscripts and docs
|
||||
|
||||
---
|
||||
README | 9 +++------
|
||||
etc/iscsid.conf | 23 +++++++++++------------
|
||||
usr/idbm.c | 4 ++++
|
||||
3 files changed, 18 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/README b/README
|
||||
index ec22098..2a8319a 100644
|
||||
--- a/README
|
||||
+++ b/README
|
||||
@@ -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.
|
||||
|
||||
-You need to enable "Cryptographic API" under "Cryptographic options" in the
|
||||
-kernel config. And you must enable "CRC32c CRC algorithm" even if
|
||||
-you do not use header or data digests. They are the kernel options,
|
||||
-CONFIG_CRYPTO and CONFIG_CRYPTO_CRC32C, respectively.
|
||||
-
|
||||
By default the kernel's iSCSI modules will be used. Running:
|
||||
|
||||
make
|
||||
@@ -997,7 +992,7 @@ Red Hat or Fedora:
|
||||
-----------------
|
||||
To start open-iscsi in Red Hat/Fedora you can do:
|
||||
|
||||
- service open-iscsi start
|
||||
+ service iscsi start
|
||||
|
||||
To get open-iscsi to automatically start at run time you may have to
|
||||
run:
|
||||
@@ -1205,6 +1200,8 @@ iscsid will only perform rediscovery when it gets a SCN from the server.
|
||||
# linux-isns (SLES's iSNS server) where it sometimes does not send SCN
|
||||
# events in the proper format, so they may not get handled.
|
||||
|
||||
+To set the startup value, so that nodes are not logged into automatically
|
||||
+use the value "manual".
|
||||
|
||||
Example:
|
||||
--------
|
||||
diff --git a/etc/iscsid.conf b/etc/iscsid.conf
|
||||
index ef76dc0..ac1d231 100644
|
||||
--- a/etc/iscsid.conf
|
||||
+++ b/etc/iscsid.conf
|
||||
@@ -17,10 +17,10 @@
|
||||
# maintainers.
|
||||
#
|
||||
@ -25,7 +71,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/etc/iscsid.conf open-iscsi-2.0-872-
|
||||
|
||||
# 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
|
||||
@@ -259,28 +259,27 @@ node.conn[0].iscsi.MaxXmitDataSegmentLength = 0
|
||||
discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768
|
||||
|
||||
# To allow the targets to control the setting of the digest checking,
|
||||
@ -61,43 +107,11 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/etc/iscsid.conf open-iscsi-2.0-872-
|
||||
|
||||
# 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.
|
||||
|
||||
-You need to enable "Cryptographic API" under "Cryptographic options" in the
|
||||
-kernel config. And you must enable "CRC32c CRC algorithm" even if
|
||||
-you do not use header or data digests. They are the kernel options,
|
||||
-CONFIG_CRYPTO and CONFIG_CRYPTO_CRC32C, respectively.
|
||||
-
|
||||
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
|
||||
@@ -975,7 +970,7 @@ Red Hat or Fedora:
|
||||
-----------------
|
||||
To start open-iscsi in Red Hat/Fedora you can do:
|
||||
|
||||
- service open-iscsi start
|
||||
+ service iscsi start
|
||||
|
||||
To get open-iscsi to automatically start at run time you may have to
|
||||
run:
|
||||
@@ -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.
|
||||
|
||||
+To set the startup value, so that nodes are not logged into automatically
|
||||
+use the value "manual".
|
||||
|
||||
Example:
|
||||
--------
|
||||
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
|
||||
diff --git a/usr/idbm.c b/usr/idbm.c
|
||||
index 4d30aa9..a1d7d37 100644
|
||||
--- a/usr/idbm.c
|
||||
+++ b/usr/idbm.c
|
||||
@@ -399,9 +399,13 @@ idbm_recinfo_node(node_rec_t *r, recinfo_t *ri)
|
||||
IDBM_SHOW, "None", "CRC32C", "CRC32C,None",
|
||||
"None,CRC32C", num, 1);
|
||||
sprintf(key, CONN_DATA_DIGEST, i);
|
||||
@ -111,3 +125,6 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.c open-iscsi-2.0-872-rc4-b
|
||||
sprintf(key, CONN_IFMARKER, i);
|
||||
__recinfo_int_o2(key, ri, r, conn[i].iscsi.IFMarker, IDBM_SHOW,
|
||||
"No", "Yes", num, 1);
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -1,55 +1,31 @@
|
||||
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.
|
||||
-iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware
|
||||
+iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware
|
||||
iSCSI (qla4xxx) the iface config must have the hardware address
|
||||
(iface.hwaddress = port's MAC address)
|
||||
and the driver/transport_name (iface.transport_name). The iface's name is
|
||||
@@ -134,7 +134,7 @@ If no other options are specified: for \
|
||||
of their respective records are displayed; for \fIsession\fR, all active
|
||||
sessions and connections are displayed; for \fIfw\fR, all boot firmware
|
||||
values are displayed; for \fIhost\fR, all iSCSI hosts are displayed; and
|
||||
-for \fIiface\fR, all ifaces setup in /etc/iscsi/ifaces are displayed.
|
||||
+for \fIiface\fR, all ifaces setup in /var/lib/iscsi/ifaces are displayed.
|
||||
From d77d9e1ffb1775c3602d8cc9ae56c701aa7c476a Mon Sep 17 00:00:00 2001
|
||||
From: Chris Leech <cleech@redhat.com>
|
||||
Date: Mon, 19 Nov 2012 16:38:45 -0800
|
||||
Subject: use var for config
|
||||
|
||||
---
|
||||
README | 33 ++++++++++++++++-----------------
|
||||
doc/iscsiadm.8 | 8 ++++----
|
||||
usr/idbm.c | 6 +++---
|
||||
usr/idbm.h | 15 +++++++++------
|
||||
usr/iface.h | 4 +++-
|
||||
5 files changed, 35 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/README b/README
|
||||
index 2a8319a..e5ae2c1 100644
|
||||
--- a/README
|
||||
+++ b/README
|
||||
@@ -156,8 +156,7 @@ Usage: iscsid [OPTION]
|
||||
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-\-name=\fIname\fR
|
||||
@@ -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
|
||||
-/etc/iscsi/nodes/
|
||||
+/var/lib/iscsi/nodes/
|
||||
This directory contains the nodes with their targets.
|
||||
.TP
|
||||
-/etc/iscsi/send_targets
|
||||
+/var/lib/iscsi/send_targets
|
||||
This directory contains the portals.
|
||||
Open-iSCSI persistent configuration is stored in a number of
|
||||
directories under a configuration root directory, using a flat-file
|
||||
-format. This configuration root directory is /etc/iscsi by default,
|
||||
-but may also commonly be in /var/lib/iscsi.
|
||||
+format. This configuration root directory is /var/lib/iscsi by default.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
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.
|
||||
Configuration is contained in directories for:
|
||||
|
||||
The database contains two tables:
|
||||
|
||||
-- Discovery table (/etc/iscsi/send_targets);
|
||||
-- Node table (/etc/iscsi/nodes).
|
||||
+- Discovery table (/var/lib/iscsi/send_targets);
|
||||
+- Node table (/var/lib/iscsi/nodes).
|
||||
|
||||
-The regular place for iSCSI database files: /etc/iscsi/nodes
|
||||
+The regular place for iSCSI database files: /var/lib/iscsi/nodes
|
||||
|
||||
The iscsiadm utility is a command-line tool to manage (update, delete,
|
||||
insert, query) the persistent database.
|
||||
@@ -422,7 +422,7 @@ a scsi_host per HBA port).
|
||||
@@ -444,7 +443,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
|
||||
@ -58,7 +34,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/README open-iscsi-2.0-872-rc4-bnx2i
|
||||
|
||||
Prep:
|
||||
|
||||
@@ -456,29 +456,29 @@ Running:
|
||||
@@ -478,29 +477,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,7 +69,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/README open-iscsi-2.0-872-rc4-bnx2i
|
||||
|
||||
iface.transport_name = tcp
|
||||
iface.hwaddress = 00:C0:DD:08:63:E7
|
||||
@@ -528,7 +528,7 @@ cxgb3i.00:07:43:05:97:07 cxgb3i,00:07:43
|
||||
@@ -550,7 +549,7 @@ cxgb3i.00:07:43:05:97:07 cxgb3i,00:07:43:05:97:07,<empty>,<empty>,<empty>
|
||||
qla4xxx.00:0e:1e:04:8b:2e qla4xxx,00:0e:1e:04:8b:2e,<empty>,<empty>,<empty>
|
||||
|
||||
|
||||
@ -102,7 +78,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/README open-iscsi-2.0-872-rc4-bnx2i
|
||||
The format is:
|
||||
|
||||
iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname
|
||||
@@ -614,7 +614,7 @@ need a seperate network connection to th
|
||||
@@ -636,7 +635,7 @@ need a seperate network connection to the target for discovery purposes.
|
||||
*This will be fixed in the next version of open-iscsi*
|
||||
|
||||
For compatibility reasons, when you run iscsiadm to do discovery, it
|
||||
@ -111,7 +87,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/README open-iscsi-2.0-872-rc4-bnx2i
|
||||
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
|
||||
@@ -632,7 +632,7 @@ we do not bind a session to a iface, the
|
||||
@@ -654,7 +653,7 @@ we do not bind a session to a iface, then you can use the special iface
|
||||
|
||||
iscsiadm -m discoverydb -t st -p ip:port -I default --discover -P 1
|
||||
|
||||
@ -120,7 +96,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/README open-iscsi-2.0-872-rc4-bnx2i
|
||||
not pass anything into iscsiadm, running iscsiadm will do the default
|
||||
behavior, where we allow the network subsystem to decide which
|
||||
device to use.
|
||||
@@ -674,7 +674,7 @@ To now log into targets it is the same a
|
||||
@@ -696,7 +695,7 @@ To now log into targets it is the same as with sofware iscsi. See section
|
||||
|
||||
./iscsiadm -m discoverydb -t st -p 192.168.1.1:3260 --discover
|
||||
|
||||
@ -129,7 +105,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/README open-iscsi-2.0-872-rc4-bnx2i
|
||||
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
|
||||
@@ -683,7 +683,7 @@ To now log into targets it is the same a
|
||||
@@ -705,7 +704,7 @@ To now log into targets it is the same as with sofware iscsi. See section
|
||||
The argument to -p may also be a hostname instead of an address.
|
||||
./iscsiadm -m discoverydb -t st -p smoehost --discover
|
||||
|
||||
@ -138,7 +114,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/README open-iscsi-2.0-872-rc4-bnx2i
|
||||
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
|
||||
@@ -739,7 +739,7 @@ To now log into targets it is the same a
|
||||
@@ -761,7 +760,7 @@ To now log into targets it is the same as with sofware iscsi. See section
|
||||
This command will perform discovery, but not manipulate the node DB.
|
||||
|
||||
- SendTargets iSCSI Discovery with a specific interface. If you
|
||||
@ -147,7 +123,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/README open-iscsi-2.0-872-rc4-bnx2i
|
||||
then you can pass them in during discovery:
|
||||
|
||||
./iscsiadm -m discoverydb -t sendtargets -p 192.168.1.1:3260 \
|
||||
@@ -1050,8 +1050,8 @@ where targetname is the name of the targ
|
||||
@@ -1072,8 +1071,8 @@ where targetname is the name of the target and ip_address:port is the address
|
||||
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
|
||||
@ -158,7 +134,7 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/README open-iscsi-2.0-872-rc4-bnx2i
|
||||
Default here is iscsi_tcp/tcp to be used over which ever NIC the
|
||||
network layer decides is best.
|
||||
|
||||
@@ -1166,7 +1166,7 @@ If set, iscsid will perform discovery to
|
||||
@@ -1188,7 +1187,7 @@ If set, iscsid will perform discovery to the address every
|
||||
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
|
||||
@ -167,10 +143,46 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/README open-iscsi-2.0-872-rc4-bnx2i
|
||||
|
||||
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.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:
|
||||
diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8
|
||||
index 7c209f6..e94cca0 100644
|
||||
--- a/doc/iscsiadm.8
|
||||
+++ b/doc/iscsiadm.8
|
||||
@@ -89,7 +89,7 @@ This option is only valid for ping submode.
|
||||
.TP
|
||||
\fB\-I\fR, \fB\-\-interface=\fI[iface]\fR
|
||||
The interface argument specifies the iSCSI interface to use for the operation.
|
||||
-iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware
|
||||
+iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware
|
||||
iSCSI (qla4xxx) the iface config must have the hardware address
|
||||
(iface.hwaddress = port's MAC address)
|
||||
and the driver/transport_name (iface.transport_name). The iface's name is
|
||||
@@ -166,7 +166,7 @@ If no other options are specified: for \fIdiscoverydb\fR and \fInode\fR, all
|
||||
of their respective records are displayed; for \fIsession\fR, all active
|
||||
sessions and connections are displayed; for \fIfw\fR, all boot firmware
|
||||
values are displayed; for \fIhost\fR, all iSCSI hosts are displayed; and
|
||||
-for \fIiface\fR, all ifaces setup in /etc/iscsi/ifaces are displayed.
|
||||
+for \fIiface\fR, all ifaces setup in /var/lib/iscsi/ifaces are displayed.
|
||||
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-\-name=\fIname\fR
|
||||
@@ -535,10 +535,10 @@ The configuration file read by \fBiscsid\fR and \fBiscsiadm\fR on startup.
|
||||
The file containing the iSCSI InitiatorName and InitiatorAlias read by
|
||||
\fBiscsid\fR and \fBiscsiadm\fR on startup.
|
||||
.TP
|
||||
-/etc/iscsi/nodes/
|
||||
+/var/lib/iscsi/nodes/
|
||||
This directory contains the nodes with their targets.
|
||||
.TP
|
||||
-/etc/iscsi/send_targets
|
||||
+/var/lib/iscsi/send_targets
|
||||
This directory contains the portals.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
diff --git a/usr/idbm.c b/usr/idbm.c
|
||||
index a1d7d37..806d90e 100644
|
||||
--- a/usr/idbm.c
|
||||
+++ b/usr/idbm.c
|
||||
@@ -2472,9 +2472,9 @@ free_info:
|
||||
int idbm_init(idbm_get_config_file_fn *fn)
|
||||
{
|
||||
/* make sure root db dir is there */
|
||||
@ -183,12 +195,13 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.c open-iscsi-2.0-872-rc4-b
|
||||
errno);
|
||||
return errno;
|
||||
}
|
||||
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"
|
||||
diff --git a/usr/idbm.h b/usr/idbm.h
|
||||
index 245f046..5d81df7 100644
|
||||
--- a/usr/idbm.h
|
||||
+++ b/usr/idbm.h
|
||||
@@ -28,12 +28,15 @@
|
||||
#include "config.h"
|
||||
#include "list.h"
|
||||
|
||||
-#define NODE_CONFIG_DIR ISCSI_CONFIG_ROOT"nodes"
|
||||
-#define SLP_CONFIG_DIR ISCSI_CONFIG_ROOT"slp"
|
||||
@ -208,9 +221,10 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.h open-iscsi-2.0-872-rc4-b
|
||||
#define ST_CONFIG_NAME "st_config"
|
||||
#define ISNS_CONFIG_NAME "isns_config"
|
||||
|
||||
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
|
||||
diff --git a/usr/iface.h b/usr/iface.h
|
||||
index 01f7074..f396918 100644
|
||||
--- a/usr/iface.h
|
||||
+++ b/usr/iface.h
|
||||
@@ -20,7 +20,9 @@
|
||||
#ifndef ISCSI_IFACE_H
|
||||
#define ISCSI_IFACE_H
|
||||
@ -222,3 +236,6 @@ diff -aurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iface.h open-iscsi-2.0-872-rc4-
|
||||
|
||||
struct iface_rec;
|
||||
struct list_head;
|
||||
--
|
||||
1.7.11.7
|
||||
|
25
0053-use-red-hat-for-name.patch
Normal file
25
0053-use-red-hat-for-name.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 88d864140cacdc1727091ee0ce61fcbd90cae472 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Leech <cleech@redhat.com>
|
||||
Date: Mon, 19 Nov 2012 16:40:04 -0800
|
||||
Subject: use red hat for name
|
||||
|
||||
---
|
||||
utils/iscsi-iname.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/utils/iscsi-iname.c b/utils/iscsi-iname.c
|
||||
index 6347edc..cb2f6c8 100644
|
||||
--- a/utils/iscsi-iname.c
|
||||
+++ b/utils/iscsi-iname.c
|
||||
@@ -73,7 +73,7 @@ main(int argc, char *argv[])
|
||||
exit(0);
|
||||
}
|
||||
} else {
|
||||
- prefix = "iqn.2005-03.org.open-iscsi";
|
||||
+ prefix = "iqn.1994-05.com.redhat";
|
||||
}
|
||||
|
||||
/* try to feed some entropy from the pool to MD5 in order to get
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -1,7 +1,140 @@
|
||||
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 @@
|
||||
From 8f94617e1b332031b01a0363a6757bfb5a039d89 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Leech <cleech@redhat.com>
|
||||
Date: Mon, 19 Nov 2012 16:43:15 -0800
|
||||
Subject: add libiscsi
|
||||
|
||||
---
|
||||
Makefile | 2 +
|
||||
libiscsi/Makefile | 61 ++
|
||||
libiscsi/libiscsi.c | 620 +++++++++++
|
||||
libiscsi/libiscsi.doxy | 1473 +++++++++++++++++++++++++++
|
||||
libiscsi/libiscsi.h | 344 +++++++
|
||||
libiscsi/pylibiscsi.c | 638 ++++++++++++
|
||||
libiscsi/setup.py | 9 +
|
||||
libiscsi/tests/test_discovery_firmware.c | 53 +
|
||||
libiscsi/tests/test_discovery_sendtargets.c | 60 ++
|
||||
libiscsi/tests/test_get_auth.c | 70 ++
|
||||
libiscsi/tests/test_get_initiator_name.c | 38 +
|
||||
libiscsi/tests/test_get_network_config.c | 45 +
|
||||
libiscsi/tests/test_login.c | 52 +
|
||||
libiscsi/tests/test_logout.c | 51 +
|
||||
libiscsi/tests/test_params.c | 103 ++
|
||||
libiscsi/tests/test_set_auth.c | 58 ++
|
||||
usr/Makefile | 2 +-
|
||||
usr/discovery.c | 5 +
|
||||
usr/idbm.c | 6 +-
|
||||
usr/idbm.h | 3 +
|
||||
usr/iscsi_ipc.h | 2 +
|
||||
21 files changed, 3691 insertions(+), 4 deletions(-)
|
||||
create mode 100644 libiscsi/Makefile
|
||||
create mode 100644 libiscsi/libiscsi.c
|
||||
create mode 100644 libiscsi/libiscsi.doxy
|
||||
create mode 100644 libiscsi/libiscsi.h
|
||||
create mode 100644 libiscsi/pylibiscsi.c
|
||||
create mode 100644 libiscsi/setup.py
|
||||
create mode 100644 libiscsi/tests/test_discovery_firmware.c
|
||||
create mode 100644 libiscsi/tests/test_discovery_sendtargets.c
|
||||
create mode 100644 libiscsi/tests/test_get_auth.c
|
||||
create mode 100644 libiscsi/tests/test_get_initiator_name.c
|
||||
create mode 100644 libiscsi/tests/test_get_network_config.c
|
||||
create mode 100644 libiscsi/tests/test_login.c
|
||||
create mode 100644 libiscsi/tests/test_logout.c
|
||||
create mode 100644 libiscsi/tests/test_params.c
|
||||
create mode 100644 libiscsi/tests/test_set_auth.c
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index c5d9700..6dfbde3 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -32,6 +32,7 @@ user: utils/open-isns/Makefile
|
||||
$(MAKE) -C utils/fwparam_ibft
|
||||
$(MAKE) -C usr
|
||||
$(MAKE) -C utils
|
||||
+ $(MAKE) -C libiscsi
|
||||
@echo
|
||||
@echo "Compilation complete Output file"
|
||||
@echo "----------------------------------- ----------------"
|
||||
@@ -56,6 +57,7 @@ kernel: force
|
||||
force: ;
|
||||
|
||||
clean:
|
||||
+ $(MAKE) -C libiscsi clean
|
||||
$(MAKE) -C utils/sysdeps clean
|
||||
$(MAKE) -C utils/fwparam_ibft clean
|
||||
$(MAKE) -C utils clean
|
||||
diff --git a/libiscsi/Makefile b/libiscsi/Makefile
|
||||
new file mode 100644
|
||||
index 0000000..317a7ec
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/Makefile
|
||||
@@ -0,0 +1,61 @@
|
||||
+# This Makefile will work only with GNU make.
|
||||
+
|
||||
+OSNAME=$(shell uname -s)
|
||||
+OPTFLAGS ?= -O2 -g
|
||||
+WARNFLAGS ?= -Wall -Wstrict-prototypes
|
||||
+CFLAGS = $(OPTFLAGS) $(WARNFLAGS) -I../include -I../usr \
|
||||
+ -D$(OSNAME) -fPIC -D_GNU_SOURCE -fvisibility=hidden
|
||||
+LIB = libiscsi.so.0
|
||||
+TESTS = tests/test_discovery_sendtargets tests/test_discovery_firmware
|
||||
+TESTS += tests/test_login tests/test_logout tests/test_params
|
||||
+TESTS += tests/test_get_network_config tests/test_get_initiator_name
|
||||
+TESTS += tests/test_set_auth tests/test_get_auth
|
||||
+
|
||||
+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 iser.o uip_mgmt_ipc.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
|
||||
+# to get PIC versions.
|
||||
+COMMON_OBJS = $(patsubst %.o, common-objs/%.o, $(COMMON_SRCS))
|
||||
+USR_OBJS = $(patsubst %.o, usr-objs/%.o, $(ISCSI_LIB_SRCS) strings.o)
|
||||
+FW_OBJS = $(patsubst %.o, fw-objs/%.o, $(FW_PARAM_SRCS))
|
||||
+
|
||||
+# Flags for the tests
|
||||
+tests/% : CFLAGS = $(OPTFLAGS) $(WARNFLAGS) -I.
|
||||
+
|
||||
+all: lib tests html
|
||||
+
|
||||
+lib: $(LIB)
|
||||
+tests: $(TESTS)
|
||||
+
|
||||
+common-objs/%.o: ../utils/sysdeps/%.c
|
||||
+ mkdir -p common-objs
|
||||
+ $(CC) $(CFLAGS) -c $< -o $@
|
||||
+
|
||||
+usr-objs/%.o: ../usr/%.c
|
||||
+ mkdir -p usr-objs
|
||||
+ $(CC) $(CFLAGS) -c $< -o $@
|
||||
+
|
||||
+fw-objs/%.o: ../utils/fwparam_ibft/%.c
|
||||
+ mkdir -p fw-objs
|
||||
+ $(CC) $(CFLAGS) -c $< -o $@
|
||||
+
|
||||
+$(LIB): $(COMMON_OBJS) $(FW_OBJS) $(USR_OBJS) libiscsi.o
|
||||
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$(LIB) $^ -o $@
|
||||
+ ln -s -f $(LIB) libiscsi.so
|
||||
+
|
||||
+$(TESTS): $(FW_OBJS) $(COMMON_OBJS) $(USR_OBJS) $(LIB)
|
||||
+
|
||||
+html: libiscsi.h libiscsi.doxy
|
||||
+ doxygen libiscsi.doxy
|
||||
+
|
||||
+clean:
|
||||
+ rm -rf *.o common-objs usr-objs fw-objs libuip-objs libiscsi.so* \
|
||||
+ .depend *~ html $(TESTS) tests/*~
|
||||
+
|
||||
+depend:
|
||||
+ gcc $(CFLAGS) -M `ls *.c` > .depend
|
||||
+
|
||||
+-include .depend ../usr/.depend
|
||||
diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c
|
||||
new file mode 100644
|
||||
index 0000000..2a176e8
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/libiscsi.c
|
||||
@@ -0,0 +1,620 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
+ *
|
||||
@ -478,18 +611,26 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.c open-iscsi-2.0
|
||||
+ const char *parameter, const char *value)
|
||||
+{
|
||||
+ int nr_found = 0, rc;
|
||||
+ struct db_set_param set_param = {
|
||||
+ .name = (char *)parameter,
|
||||
+ .value = (char *)value,
|
||||
+ };
|
||||
+ struct user_param *param;
|
||||
+ struct list_head params;
|
||||
+
|
||||
+ CHECK(idbm_for_each_iface(&nr_found, &set_param, idbm_node_set_param,
|
||||
+ INIT_LIST_HEAD(¶ms);
|
||||
+ param = idbm_alloc_user_param(parameter, value);
|
||||
+ if (!param) {
|
||||
+ rc = ENOMEM;
|
||||
+ goto leave;
|
||||
+ }
|
||||
+ list_add_tail(¶ms, ¶m->list);
|
||||
+
|
||||
+ CHECK(idbm_for_each_iface(&nr_found, ¶ms, idbm_node_set_param,
|
||||
+ (char *)node->name, node->tpgt,
|
||||
+ (char *)node->address, node->port))
|
||||
+ if (nr_found == 0) {
|
||||
+ strcpy(context->error_str, "No such node");
|
||||
+ rc = ENODEV;
|
||||
+ }
|
||||
+ free(param->name);
|
||||
+ free(param);
|
||||
+leave:
|
||||
+ return rc;
|
||||
+}
|
||||
@ -614,9 +755,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.c open-iscsi-2.0
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.doxy open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/libiscsi.doxy
|
||||
--- 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
|
||||
diff --git a/libiscsi/libiscsi.doxy b/libiscsi/libiscsi.doxy
|
||||
new file mode 100644
|
||||
index 0000000..663770f
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/libiscsi.doxy
|
||||
@@ -0,0 +1,1473 @@
|
||||
+# Doxyfile 1.5.7.1
|
||||
+
|
||||
@ -2091,9 +2234,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.doxy open-iscsi-
|
||||
+# used. If set to NO the values of all tags below this one will be ignored.
|
||||
+
|
||||
+SEARCHENGINE = NO
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.h open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/libiscsi.h
|
||||
--- 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
|
||||
diff --git a/libiscsi/libiscsi.h b/libiscsi/libiscsi.h
|
||||
new file mode 100644
|
||||
index 0000000..756590e
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/libiscsi.h
|
||||
@@ -0,0 +1,344 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -2439,74 +2584,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/libiscsi.h open-iscsi-2.0
|
||||
+#endif /* __cplusplus */
|
||||
+
|
||||
+#endif
|
||||
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.
|
||||
+
|
||||
+OSNAME=$(shell uname -s)
|
||||
+OPTFLAGS ?= -O2 -g
|
||||
+WARNFLAGS ?= -Wall -Wstrict-prototypes
|
||||
+CFLAGS = $(OPTFLAGS) $(WARNFLAGS) -I../include -I../usr \
|
||||
+ -D$(OSNAME) -fPIC -D_GNU_SOURCE -fvisibility=hidden
|
||||
+LIB = libiscsi.so.0
|
||||
+TESTS = tests/test_discovery_sendtargets tests/test_discovery_firmware
|
||||
+TESTS += tests/test_login tests/test_logout tests/test_params
|
||||
+TESTS += tests/test_get_network_config tests/test_get_initiator_name
|
||||
+TESTS += tests/test_set_auth tests/test_get_auth
|
||||
+
|
||||
+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 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
|
||||
+# to get PIC versions.
|
||||
+COMMON_OBJS = $(patsubst %.o, common-objs/%.o, $(COMMON_SRCS))
|
||||
+USR_OBJS = $(patsubst %.o, usr-objs/%.o, $(ISCSI_LIB_SRCS) strings.o)
|
||||
+FW_OBJS = $(patsubst %.o, fw-objs/%.o, $(FW_PARAM_SRCS))
|
||||
+
|
||||
+# Flags for the tests
|
||||
+tests/% : CFLAGS = $(OPTFLAGS) $(WARNFLAGS) -I.
|
||||
+
|
||||
+all: lib tests html
|
||||
+
|
||||
+lib: $(LIB)
|
||||
+tests: $(TESTS)
|
||||
+
|
||||
+common-objs/%.o: ../utils/sysdeps/%.c
|
||||
+ mkdir -p common-objs
|
||||
+ $(CC) $(CFLAGS) -c $< -o $@
|
||||
+
|
||||
+usr-objs/%.o: ../usr/%.c
|
||||
+ mkdir -p usr-objs
|
||||
+ $(CC) $(CFLAGS) -c $< -o $@
|
||||
+
|
||||
+fw-objs/%.o: ../utils/fwparam_ibft/%.c
|
||||
+ mkdir -p fw-objs
|
||||
+ $(CC) $(CFLAGS) -c $< -o $@
|
||||
+
|
||||
+$(LIB): $(COMMON_OBJS) $(FW_OBJS) $(USR_OBJS) libiscsi.o
|
||||
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$(LIB) $^ -o $@
|
||||
+ ln -s -f $(LIB) libiscsi.so
|
||||
+
|
||||
+$(TESTS): $(FW_OBJS) $(COMMON_OBJS) $(USR_OBJS) $(LIB)
|
||||
+
|
||||
+html: libiscsi.h libiscsi.doxy
|
||||
+ doxygen libiscsi.doxy
|
||||
+
|
||||
+clean:
|
||||
+ rm -rf *.o common-objs usr-objs fw-objs libuip-objs libiscsi.so* \
|
||||
+ .depend *~ html $(TESTS) tests/*~
|
||||
+
|
||||
+depend:
|
||||
+ gcc $(CFLAGS) -M `ls *.c` > .depend
|
||||
+
|
||||
+-include .depend ../usr/.depend
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/pylibiscsi.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/pylibiscsi.c
|
||||
--- 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
|
||||
diff --git a/libiscsi/pylibiscsi.c b/libiscsi/pylibiscsi.c
|
||||
new file mode 100644
|
||||
index 0000000..4b09aa7
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/pylibiscsi.c
|
||||
@@ -0,0 +1,638 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3146,9 +3228,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/pylibiscsi.c open-iscsi-2
|
||||
+ Py_INCREF(&PyIscsiNode_Type);
|
||||
+ PyModule_AddObject(m, "node", (PyObject *) &PyIscsiNode_Type);
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/setup.py open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/setup.py
|
||||
--- 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
|
||||
diff --git a/libiscsi/setup.py b/libiscsi/setup.py
|
||||
new file mode 100644
|
||||
index 0000000..bb4329b
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/setup.py
|
||||
@@ -0,0 +1,9 @@
|
||||
+from distutils.core import setup, Extension
|
||||
+
|
||||
@ -3159,9 +3243,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/setup.py open-iscsi-2.0-8
|
||||
+
|
||||
+setup (name = 'PyIscsi',version = '1.0',
|
||||
+ description = 'libiscsi python bindings', ext_modules = [module1])
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_discovery_firmware.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_discovery_firmware.c
|
||||
--- 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
|
||||
diff --git a/libiscsi/tests/test_discovery_firmware.c b/libiscsi/tests/test_discovery_firmware.c
|
||||
new file mode 100644
|
||||
index 0000000..76e852a
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/tests/test_discovery_firmware.c
|
||||
@@ -0,0 +1,53 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3216,9 +3302,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_discovery_firm
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_discovery_sendtargets.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_discovery_sendtargets.c
|
||||
--- 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
|
||||
diff --git a/libiscsi/tests/test_discovery_sendtargets.c b/libiscsi/tests/test_discovery_sendtargets.c
|
||||
new file mode 100644
|
||||
index 0000000..1a3c12e
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/tests/test_discovery_sendtargets.c
|
||||
@@ -0,0 +1,60 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3280,9 +3368,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_discovery_send
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_auth.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_get_auth.c
|
||||
--- 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
|
||||
diff --git a/libiscsi/tests/test_get_auth.c b/libiscsi/tests/test_get_auth.c
|
||||
new file mode 100644
|
||||
index 0000000..5e234da
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/tests/test_get_auth.c
|
||||
@@ -0,0 +1,70 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3354,9 +3444,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_auth.c ope
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_initiator_name.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_get_initiator_name.c
|
||||
--- 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
|
||||
diff --git a/libiscsi/tests/test_get_initiator_name.c b/libiscsi/tests/test_get_initiator_name.c
|
||||
new file mode 100644
|
||||
index 0000000..997c053
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/tests/test_get_initiator_name.c
|
||||
@@ -0,0 +1,38 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3396,9 +3488,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_initiator_
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_network_config.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_get_network_config.c
|
||||
--- 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
|
||||
diff --git a/libiscsi/tests/test_get_network_config.c b/libiscsi/tests/test_get_network_config.c
|
||||
new file mode 100644
|
||||
index 0000000..2dedd61
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/tests/test_get_network_config.c
|
||||
@@ -0,0 +1,45 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3445,9 +3539,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_get_network_co
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_login.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_login.c
|
||||
--- 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
|
||||
diff --git a/libiscsi/tests/test_login.c b/libiscsi/tests/test_login.c
|
||||
new file mode 100644
|
||||
index 0000000..3eb70d6
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/tests/test_login.c
|
||||
@@ -0,0 +1,52 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3501,9 +3597,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_login.c open-i
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_logout.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_logout.c
|
||||
--- 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
|
||||
diff --git a/libiscsi/tests/test_logout.c b/libiscsi/tests/test_logout.c
|
||||
new file mode 100644
|
||||
index 0000000..b734dca
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/tests/test_logout.c
|
||||
@@ -0,0 +1,51 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3556,9 +3654,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_logout.c open-
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_params.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_params.c
|
||||
--- 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
|
||||
diff --git a/libiscsi/tests/test_params.c b/libiscsi/tests/test_params.c
|
||||
new file mode 100644
|
||||
index 0000000..d3223be
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/tests/test_params.c
|
||||
@@ -0,0 +1,103 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3663,9 +3763,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_params.c open-
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_set_auth.c open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/tests/test_set_auth.c
|
||||
--- 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
|
||||
diff --git a/libiscsi/tests/test_set_auth.c b/libiscsi/tests/test_set_auth.c
|
||||
new file mode 100644
|
||||
index 0000000..a21f888
|
||||
--- /dev/null
|
||||
+++ b/libiscsi/tests/test_set_auth.c
|
||||
@@ -0,0 +1,58 @@
|
||||
+/*
|
||||
+ * iSCSI Administration library
|
||||
@ -3725,28 +3827,23 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/tests/test_set_auth.c ope
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
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
|
||||
$(MAKE) -C utils
|
||||
+ $(MAKE) -C libiscsi
|
||||
@echo
|
||||
@echo "Compilation complete Output file"
|
||||
@echo "----------------------------------- ----------------"
|
||||
@@ -53,6 +54,7 @@ kernel: force
|
||||
force: ;
|
||||
diff --git a/usr/Makefile b/usr/Makefile
|
||||
index 1506111..015f1b9 100644
|
||||
--- a/usr/Makefile
|
||||
+++ b/usr/Makefile
|
||||
@@ -31,7 +31,7 @@ endif
|
||||
OPTFLAGS ?= -O2 -g
|
||||
WARNFLAGS ?= -Wall -Wstrict-prototypes
|
||||
CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -I../include -I. -I../utils/open-isns \
|
||||
- -D$(OSNAME) $(IPC_CFLAGS)
|
||||
+ -D$(OSNAME) $(IPC_CFLAGS) -DISNS_ENABLE
|
||||
PROGRAMS = iscsid iscsiadm iscsistart
|
||||
|
||||
clean:
|
||||
+ $(MAKE) -C libiscsi clean
|
||||
$(MAKE) -C utils/sysdeps clean
|
||||
$(MAKE) -C utils/fwparam_ibft clean
|
||||
$(MAKE) -C utils clean
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/discovery.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/discovery.c
|
||||
--- 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
|
||||
# libc compat files
|
||||
diff --git a/usr/discovery.c b/usr/discovery.c
|
||||
index afce6c0..0c93749 100644
|
||||
--- a/usr/discovery.c
|
||||
+++ b/usr/discovery.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "types.h"
|
||||
#include "iscsi_proto.h"
|
||||
@ -3783,10 +3880,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/discovery.c open-iscsi-2.0-872
|
||||
|
||||
int discovery_fw(void *data, struct iface_rec *iface,
|
||||
struct list_head *rec_list)
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/idbm.c
|
||||
--- 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
|
||||
diff --git a/usr/idbm.c b/usr/idbm.c
|
||||
index 806d90e..c20f7d9 100644
|
||||
--- a/usr/idbm.c
|
||||
+++ b/usr/idbm.c
|
||||
@@ -1335,9 +1335,9 @@ int idbm_print_all_discovery(int info_level)
|
||||
* 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.
|
||||
*/
|
||||
@ -3799,10 +3897,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.c open-iscsi-2.0-872-rc4-
|
||||
{
|
||||
DIR *iface_dirfd;
|
||||
struct dirent *iface_dent;
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.h open-iscsi-2.0-872-rc4-bnx2i.build/usr/idbm.h
|
||||
--- 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 {
|
||||
diff --git a/usr/idbm.h b/usr/idbm.h
|
||||
index 5d81df7..f645561 100644
|
||||
--- a/usr/idbm.h
|
||||
+++ b/usr/idbm.h
|
||||
@@ -101,6 +101,9 @@ struct rec_op_data {
|
||||
node_rec_t *match_rec;
|
||||
idbm_iface_op_fn *fn;
|
||||
};
|
||||
@ -3812,25 +3911,17 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/idbm.h open-iscsi-2.0-872-rc4-
|
||||
extern int idbm_for_each_portal(int *found, void *data,
|
||||
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.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);
|
||||
diff --git a/usr/iscsi_ipc.h b/usr/iscsi_ipc.h
|
||||
index db5f1f0..e0bf051 100644
|
||||
--- a/usr/iscsi_ipc.h
|
||||
+++ b/usr/iscsi_ipc.h
|
||||
@@ -147,4 +147,6 @@ struct iscsi_ipc {
|
||||
uint16_t chap_tbl_idx);
|
||||
};
|
||||
|
||||
+struct iscsi_ipc *ipc;
|
||||
+
|
||||
#endif /* ISCSI_IPC_H */
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/Makefile open-iscsi-2.0-872-rc4-bnx2i.build/usr/Makefile
|
||||
--- 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 \
|
||||
- -D$(OSNAME) $(IPC_CFLAGS)
|
||||
+ -D$(OSNAME) $(IPC_CFLAGS) -DISNS_ENABLE
|
||||
PROGRAMS = iscsid iscsiadm iscsistart
|
||||
|
||||
# libc compat files
|
||||
--
|
||||
1.7.11.7
|
||||
|
25
0055-dont-use-static.patch
Normal file
25
0055-dont-use-static.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 82f3ef30850bb433725b60927969721bcca1df79 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Leech <cleech@redhat.com>
|
||||
Date: Mon, 19 Nov 2012 17:04:29 -0800
|
||||
Subject: dont use static
|
||||
|
||||
---
|
||||
usr/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/usr/Makefile b/usr/Makefile
|
||||
index 015f1b9..1669890 100644
|
||||
--- a/usr/Makefile
|
||||
+++ b/usr/Makefile
|
||||
@@ -61,7 +61,7 @@ iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o
|
||||
|
||||
iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
|
||||
iscsistart.o statics.o
|
||||
- $(CC) $(CFLAGS) -static $^ -o $@
|
||||
+ $(CC) $(CFLAGS) $^ -o $@
|
||||
clean:
|
||||
rm -f *.o $(PROGRAMS) .depend $(LIBSYS)
|
||||
|
||||
--
|
||||
1.7.11.7
|
||||
|
45
0056-remove-the-offload-boot-supported-ifdef.patch
Normal file
45
0056-remove-the-offload-boot-supported-ifdef.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From 55c5640e2571b3e4b8a1b33f0076971b5c865711 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Leech <cleech@redhat.com>
|
||||
Date: Mon, 19 Nov 2012 17:09:24 -0800
|
||||
Subject: remove the offload boot supported ifdef
|
||||
|
||||
---
|
||||
usr/iface.c | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/usr/iface.c b/usr/iface.c
|
||||
index c86892e..f5441c0 100644
|
||||
--- a/usr/iface.c
|
||||
+++ b/usr/iface.c
|
||||
@@ -895,6 +895,7 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
|
||||
{
|
||||
struct iscsi_transport *t = NULL;
|
||||
uint32_t hostno;
|
||||
+ int rc;
|
||||
|
||||
if (strlen(context->initiatorname))
|
||||
strlcpy(iface->iname, context->initiatorname,
|
||||
@@ -907,10 +908,7 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
|
||||
return 0;
|
||||
}
|
||||
} else if (strlen(context->iface)) {
|
||||
-/* this ifdef is only temp until distros and firmwares are updated */
|
||||
-#ifdef OFFLOAD_BOOT_SUPPORTED
|
||||
char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN];
|
||||
- int rc;
|
||||
|
||||
memset(transport_name, 0, ISCSI_TRANSPORT_NAME_MAXLEN);
|
||||
/* make sure offload driver is loaded */
|
||||
@@ -936,9 +934,6 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
|
||||
}
|
||||
|
||||
strlcpy(iface->netdev, context->iface, sizeof(iface->netdev));
|
||||
-#else
|
||||
- return 0;
|
||||
-#endif
|
||||
} else
|
||||
return 0;
|
||||
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -1,30 +1,56 @@
|
||||
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 */
|
||||
ISCSI_ERR_ISNS_REG_FAILED = 26,
|
||||
From 5753a2f838fcb532ad56dc4c4657b36cdea88bba Mon Sep 17 00:00:00 2001
|
||||
From: Chris Leech <cleech@redhat.com>
|
||||
Date: Mon, 24 Dec 2012 13:37:53 -0800
|
||||
Subject: iscsid iscsiuio ipc interface
|
||||
|
||||
---
|
||||
include/iscsi_err.h | 2 +
|
||||
usr/Makefile | 3 +-
|
||||
usr/initiator.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
usr/initiator.h | 4 ++
|
||||
usr/initiator_common.c | 34 +++++++++++++++
|
||||
usr/iscsi_err.c | 1 +
|
||||
usr/iscsid_req.c | 91 +++++++++++++++++++++++++++++++++++++--
|
||||
usr/iscsid_req.h | 2 +
|
||||
usr/transport.c | 2 +
|
||||
usr/transport.h | 3 ++
|
||||
usr/uip_mgmt_ipc.c | 41 ++++++++++++++++++
|
||||
usr/uip_mgmt_ipc.h | 73 ++++++++++++++++++++++++++++++++
|
||||
12 files changed, 364 insertions(+), 5 deletions(-)
|
||||
create mode 100644 usr/uip_mgmt_ipc.c
|
||||
create mode 100644 usr/uip_mgmt_ipc.h
|
||||
|
||||
diff --git a/include/iscsi_err.h b/include/iscsi_err.h
|
||||
index aabea4e..1139133 100644
|
||||
--- a/include/iscsi_err.h
|
||||
+++ b/include/iscsi_err.h
|
||||
@@ -62,6 +62,8 @@ enum {
|
||||
ISCSI_ERR_OP_NOT_SUPP = 27,
|
||||
/* device or resource in use */
|
||||
ISCSI_ERR_BUSY = 28,
|
||||
+ /* Operation failed, but retrying layer may succeed */
|
||||
+ ISCSI_ERR_AGAIN = 27,
|
||||
+ ISCSI_ERR_AGAIN = 29,
|
||||
|
||||
/* Always last. Indicates end of error code space */
|
||||
ISCSI_MAX_ERR_VAL,
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/libiscsi/Makefile open-iscsi-2.0-872-rc4-bnx2i.build/libiscsi/Makefile
|
||||
--- 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_
|
||||
diff --git a/usr/Makefile b/usr/Makefile
|
||||
index 1669890..5bf5f83 100644
|
||||
--- a/usr/Makefile
|
||||
+++ b/usr/Makefile
|
||||
@@ -40,7 +40,8 @@ SYSDEPS_SRCS = $(wildcard ../utils/sysdeps/*.o)
|
||||
ISCSI_LIB_SRCS = iscsi_util.o io.o auth.o iscsi_timer.o login.o log.o md5.o \
|
||||
sha1.o iface.o idbm.o sysfs.o host.o session_info.o iscsi_sysfs.o \
|
||||
iscsi_net_util.o iscsid_req.o transport.o iser.o cxgbi.o be2iscsi.o \
|
||||
- initiator_common.o iscsi_err.o $(IPC_OBJ) $(SYSDEPS_SRCS)
|
||||
+ 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 kern_err_table.o
|
||||
|
||||
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 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.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
|
||||
diff --git a/usr/initiator.c b/usr/initiator.c
|
||||
index d475358..597e0ff 100644
|
||||
--- a/usr/initiator.c
|
||||
+++ b/usr/initiator.c
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "iscsi_sysfs.h"
|
||||
#include "iscsi_settings.h"
|
||||
@ -32,8 +58,8 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872
|
||||
+#include "host.h"
|
||||
#include "sysdeps.h"
|
||||
#include "iscsi_err.h"
|
||||
|
||||
@@ -557,6 +558,48 @@ static int iscsi_conn_connect(struct isc
|
||||
#include "kern_err_table.h"
|
||||
@@ -557,6 +558,48 @@ static int iscsi_conn_connect(struct iscsi_conn *conn, queue_task_t *qtask)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -82,7 +108,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872
|
||||
static void
|
||||
__session_conn_reopen(iscsi_conn_t *conn, queue_task_t *qtask, int do_stop,
|
||||
int redirected)
|
||||
@@ -598,6 +641,11 @@ __session_conn_reopen(iscsi_conn_t *conn
|
||||
@@ -598,6 +641,11 @@ __session_conn_reopen(iscsi_conn_t *conn, queue_task_t *qtask, int do_stop,
|
||||
if (!redirected)
|
||||
session->reopen_cnt++;
|
||||
|
||||
@ -94,7 +120,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872
|
||||
if (iscsi_conn_connect(conn, qtask)) {
|
||||
delay = ISCSI_CONN_ERR_REOPEN_DELAY;
|
||||
goto queue_reopen;
|
||||
@@ -1659,6 +1707,53 @@ failed_login:
|
||||
@@ -1670,6 +1718,53 @@ failed_login:
|
||||
|
||||
}
|
||||
|
||||
@ -148,7 +174,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872
|
||||
static int iscsi_sched_ev_context(struct iscsi_ev_context *ev_context,
|
||||
struct iscsi_conn *conn, unsigned long tmo,
|
||||
int event)
|
||||
@@ -1700,6 +1795,11 @@ static int iscsi_sched_ev_context(struct
|
||||
@@ -1711,6 +1806,11 @@ static int iscsi_sched_ev_context(struct iscsi_ev_context *ev_context,
|
||||
ev_context);
|
||||
actor_schedule(&ev_context->actor);
|
||||
break;
|
||||
@ -160,7 +186,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872
|
||||
case EV_CONN_LOGOUT_TIMER:
|
||||
actor_timer(&ev_context->actor, tmo * 1000,
|
||||
iscsi_logout_timedout, ev_context);
|
||||
@@ -1833,7 +1933,17 @@ session_login_task(node_rec_t *rec, queu
|
||||
@@ -1844,7 +1944,17 @@ session_login_task(node_rec_t *rec, queue_task_t *qtask)
|
||||
conn = &session->conn[0];
|
||||
qtask->conn = conn;
|
||||
|
||||
@ -179,7 +205,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872
|
||||
__session_destroy(session);
|
||||
return ISCSI_ERR_LOGIN;
|
||||
}
|
||||
@@ -1990,6 +2100,7 @@ iscsi_host_send_targets(queue_task_t *qt
|
||||
@@ -2001,6 +2111,7 @@ iscsi_host_send_targets(queue_task_t *qtask, int host_no, int do_login,
|
||||
struct sockaddr_storage *ss)
|
||||
{
|
||||
struct iscsi_transport *t;
|
||||
@ -187,10 +213,32 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.c open-iscsi-2.0-872
|
||||
|
||||
t = iscsi_sysfs_get_transport_by_hba(host_no);
|
||||
if (!t) {
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator_common.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/initiator_common.c
|
||||
--- 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
|
||||
diff --git a/usr/initiator.h b/usr/initiator.h
|
||||
index b45caab..d6dc02e 100644
|
||||
--- a/usr/initiator.h
|
||||
+++ b/usr/initiator.h
|
||||
@@ -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;
|
||||
@@ -353,5 +354,8 @@ extern void iscsi_copy_operational_params(struct iscsi_conn *conn,
|
||||
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);
|
||||
+extern int iscsi_set_net_config(struct iscsi_transport *t,
|
||||
+ iscsi_session_t *session,
|
||||
+ struct iface_rec *iface);
|
||||
|
||||
#endif /* INITIATOR_H */
|
||||
diff --git a/usr/initiator_common.c b/usr/initiator_common.c
|
||||
index ef6820c..eb72795 100644
|
||||
--- a/usr/initiator_common.c
|
||||
+++ b/usr/initiator_common.c
|
||||
@@ -562,6 +562,36 @@ TODO handle this
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -227,9 +275,9 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator_common.c open-iscsi-
|
||||
int iscsi_host_set_net_params(struct iface_rec *iface,
|
||||
struct iscsi_session *session)
|
||||
{
|
||||
@@ -582,6 +612,10 @@ int iscsi_host_set_net_params(struct ifa
|
||||
return EINVAL;
|
||||
}
|
||||
@@ -600,6 +630,10 @@ int iscsi_host_set_net_params(struct iface_rec *iface,
|
||||
log_warning("Could not brining up netdev %s. Try running "
|
||||
"'ifup %s' first if login fails.", netdev, netdev);
|
||||
|
||||
+ rc = iscsi_set_net_config(t, session, iface);
|
||||
+ if (rc != 0)
|
||||
@ -238,29 +286,22 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator_common.c open-iscsi-
|
||||
rc = host_set_param(t, session->hostno,
|
||||
ISCSI_HOST_PARAM_IPADDRESS,
|
||||
iface->ipaddress, ISCSI_STRING);
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/initiator.h open-iscsi-2.0-872-rc4-bnx2i.build/usr/initiator.h
|
||||
--- 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;
|
||||
diff --git a/usr/iscsi_err.c b/usr/iscsi_err.c
|
||||
index 4fe1c53..f9ba130 100644
|
||||
--- a/usr/iscsi_err.c
|
||||
+++ b/usr/iscsi_err.c
|
||||
@@ -51,6 +51,7 @@ static char *iscsi_err_msgs[] = {
|
||||
/* 26 */ "iSNS registration failed",
|
||||
/* 27 */ "operation not supported",
|
||||
/* 28 */ "device or resource in use",
|
||||
+ /* 29 */ "Retryable failure",
|
||||
};
|
||||
|
||||
struct queue_task;
|
||||
@@ -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);
|
||||
+extern int iscsi_set_net_config(struct iscsi_transport *t,
|
||||
+ iscsi_session_t *session,
|
||||
+ struct iface_rec *iface);
|
||||
|
||||
#endif /* INITIATOR_H */
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsid_req.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/iscsid_req.c
|
||||
--- 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
|
||||
char *iscsi_err_to_str(int err)
|
||||
diff --git a/usr/iscsid_req.c b/usr/iscsid_req.c
|
||||
index 1c4678d..a436194 100644
|
||||
--- a/usr/iscsid_req.c
|
||||
+++ b/usr/iscsid_req.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -284,20 +325,23 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsid_req.c open-iscsi-2.0-87
|
||||
-static int iscsid_connect(int *fd, int start_iscsid)
|
||||
+static int ipc_connect(int *fd, char *unix_sock_name, int start_iscsid)
|
||||
{
|
||||
int nsec;
|
||||
int nsec, addr_len;
|
||||
struct sockaddr_un addr;
|
||||
@@ -67,8 +69,8 @@ static int iscsid_connect(int *fd, int s
|
||||
@@ -65,11 +67,11 @@ static int iscsid_connect(int *fd, int start_iscsid)
|
||||
return ISCSI_ERR_ISCSID_NOTCONN;
|
||||
}
|
||||
|
||||
- addr_len = offsetof(struct sockaddr_un, sun_path) + strlen(ISCSIADM_NAMESPACE) + 1;
|
||||
+ addr_len = offsetof(struct sockaddr_un, sun_path) + strlen(unix_sock_name) + 1;
|
||||
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sun_family = AF_LOCAL;
|
||||
- memcpy((char *) &addr.sun_path + 1, ISCSIADM_NAMESPACE,
|
||||
- strlen(ISCSIADM_NAMESPACE));
|
||||
+ memcpy((char *) &addr.sun_path + 1, unix_sock_name,
|
||||
+ strlen(unix_sock_name));
|
||||
- memcpy((char *) &addr.sun_path + 1, ISCSIADM_NAMESPACE, addr_len);
|
||||
+ memcpy((char *) &addr.sun_path + 1, unix_sock_name, addr_len);
|
||||
|
||||
/*
|
||||
* Trying to connect with exponential backoff
|
||||
*/
|
||||
@@ -96,6 +98,11 @@ static int iscsid_connect(int *fd, int s
|
||||
@@ -98,6 +100,11 @@ static int iscsid_connect(int *fd, int start_iscsid)
|
||||
return ISCSI_ERR_ISCSID_NOTCONN;
|
||||
}
|
||||
|
||||
@ -309,7 +353,7 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsid_req.c open-iscsi-2.0-87
|
||||
int iscsid_request(int *fd, iscsiadm_req_t *req, int start_iscsid)
|
||||
{
|
||||
int err;
|
||||
@@ -192,3 +199,81 @@ int iscsid_req_by_sid(iscsiadm_cmd_e cmd
|
||||
@@ -194,3 +201,81 @@ int iscsid_req_by_sid(iscsiadm_cmd_e cmd, int sid)
|
||||
return err;
|
||||
return iscsid_req_wait(cmd, fd);
|
||||
}
|
||||
@ -391,52 +435,30 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsid_req.c open-iscsi-2.0-87
|
||||
+ close(fd);
|
||||
+ return err;
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsid_req.h open-iscsi-2.0-872-rc4-bnx2i.build/usr/iscsid_req.h
|
||||
--- 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
|
||||
diff --git a/usr/iscsid_req.h b/usr/iscsid_req.h
|
||||
index 68f5256..4fff43d 100644
|
||||
--- a/usr/iscsid_req.h
|
||||
+++ b/usr/iscsid_req.h
|
||||
@@ -33,4 +33,6 @@ extern int iscsid_req_by_rec(int cmd, struct node_rec *rec);
|
||||
extern int iscsid_req_by_sid_async(int cmd, int sid, int *fd);
|
||||
extern int iscsid_req_by_sid(int cmd, int sid);
|
||||
|
||||
+extern int uip_broadcast(void *buf, size_t buf_len);
|
||||
+
|
||||
#endif
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/iscsi_err.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/iscsi_err.c
|
||||
--- 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",
|
||||
/* 26 */ "iSNS registration failed",
|
||||
+ /* 27 */ "Retryable failure",
|
||||
};
|
||||
|
||||
char *iscsi_err_to_str(int err)
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/Makefile open-iscsi-2.0-872-rc4-bnx2i.build/usr/Makefile
|
||||
--- 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) $(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.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 @@
|
||||
diff --git a/usr/transport.c b/usr/transport.c
|
||||
index e6e3dfc..10212af 100644
|
||||
--- a/usr/transport.c
|
||||
+++ b/usr/transport.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "log.h"
|
||||
#include "iscsi_util.h"
|
||||
#include "iscsi_sysfs.h"
|
||||
+#include "uip_mgmt_ipc.h"
|
||||
#include "cxgbi.h"
|
||||
#include "be2iscsi.h"
|
||||
|
||||
@@ -67,6 +68,7 @@ struct iscsi_transport_template bnx2i =
|
||||
#include "iser.h"
|
||||
@@ -79,6 +80,7 @@ struct iscsi_transport_template bnx2i = {
|
||||
.ep_connect = ktransport_ep_connect,
|
||||
.ep_poll = ktransport_ep_poll,
|
||||
.ep_disconnect = ktransport_ep_disconnect,
|
||||
@ -444,9 +466,10 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/transport.c open-iscsi-2.0-872
|
||||
};
|
||||
|
||||
struct iscsi_transport_template be2iscsi = {
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/transport.h open-iscsi-2.0-872-rc4-bnx2i.build/usr/transport.h
|
||||
--- 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
|
||||
diff --git a/usr/transport.h b/usr/transport.h
|
||||
index 672561b..5dcf872 100644
|
||||
--- a/usr/transport.h
|
||||
+++ b/usr/transport.h
|
||||
@@ -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);
|
||||
@ -457,9 +480,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/transport.h open-iscsi-2.0-872
|
||||
};
|
||||
|
||||
/* represents data path provider */
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/uip_mgmt_ipc.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/uip_mgmt_ipc.c
|
||||
--- 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
|
||||
diff --git a/usr/uip_mgmt_ipc.c b/usr/uip_mgmt_ipc.c
|
||||
new file mode 100644
|
||||
index 0000000..73b1632
|
||||
--- /dev/null
|
||||
+++ b/usr/uip_mgmt_ipc.c
|
||||
@@ -0,0 +1,41 @@
|
||||
+/*
|
||||
+ * uIP iSCSI Daemon/Admin Management IPC
|
||||
@ -502,9 +527,11 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/uip_mgmt_ipc.c open-iscsi-2.0-
|
||||
+ sizeof(iscsid_uip_broadcast_header_t) +
|
||||
+ sizeof(*iface));
|
||||
+}
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/uip_mgmt_ipc.h open-iscsi-2.0-872-rc4-bnx2i.build/usr/uip_mgmt_ipc.h
|
||||
--- 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
|
||||
diff --git a/usr/uip_mgmt_ipc.h b/usr/uip_mgmt_ipc.h
|
||||
new file mode 100644
|
||||
index 0000000..3859688
|
||||
--- /dev/null
|
||||
+++ b/usr/uip_mgmt_ipc.h
|
||||
@@ -0,0 +1,73 @@
|
||||
+/*
|
||||
+ * uIP iSCSI Daemon/Admin Management IPC
|
||||
@ -579,3 +606,6 @@ diff -Naurp open-iscsi-2.0-872-rc4-bnx2i.base/usr/uip_mgmt_ipc.h open-iscsi-2.0-
|
||||
+
|
||||
+
|
||||
+#endif /* UIP_MGMT_IPC_H */
|
||||
--
|
||||
1.7.11.7
|
||||
|
5730
0071-iscsiuio-0.7.4.3.patch
Normal file
5730
0071-iscsiuio-0.7.4.3.patch
Normal file
File diff suppressed because it is too large
Load Diff
326
0072-iscsiuio-0.7.6.1.patch
Normal file
326
0072-iscsiuio-0.7.6.1.patch
Normal file
@ -0,0 +1,326 @@
|
||||
From 057e4ade3814e3ae41a4226c63e76cc36c8147bf Mon Sep 17 00:00:00 2001
|
||||
From: Chris Leech <cleech@redhat.com>
|
||||
Date: Wed, 19 Dec 2012 21:28:18 -0800
|
||||
Subject: iscsiuio 0.7.6.1
|
||||
|
||||
---
|
||||
README | 4 ++--
|
||||
RELEASE.TXT | 34 ++++++++++++++++++++++++++++++++--
|
||||
configure | 18 +++++++++---------
|
||||
configure.ac | 4 ++--
|
||||
docs/iscsiuio.8 | 4 ++--
|
||||
src/uip/uip_arp.c | 1 -
|
||||
src/unix/libs/bnx2x.c | 19 ++++++++++++++++---
|
||||
src/unix/libs/bnx2x.h | 8 +++++++-
|
||||
src/unix/nic.c | 3 ++-
|
||||
src/unix/nic_nl.c | 2 +-
|
||||
10 files changed, 73 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/README b/README
|
||||
index a716263..e5ee23f 100644
|
||||
--- a/README
|
||||
+++ b/README
|
||||
@@ -1,6 +1,6 @@
|
||||
iscsiuio Userspace Tool
|
||||
-Version 0.7.4.3
|
||||
-Aug 16, 2012
|
||||
+Version 0.7.6.1
|
||||
+Oct 09, 2012
|
||||
------------------------------------------------------
|
||||
|
||||
This tool is to be used in conjunction with the Broadcom NetXtreme II Linux
|
||||
diff --git a/RELEASE.TXT b/RELEASE.TXT
|
||||
index cb1d470..0e7665c 100644
|
||||
--- a/RELEASE.TXT
|
||||
+++ b/RELEASE.TXT
|
||||
@@ -1,7 +1,7 @@
|
||||
Release Notes
|
||||
Broadcom uIP Linux Driver
|
||||
- Version 0.7.4.3
|
||||
- 08/16/2012
|
||||
+ Version 0.7.6.1
|
||||
+ 10/15/2012
|
||||
|
||||
Broadcom Corporation
|
||||
5300 California Avenue,
|
||||
@@ -11,6 +11,36 @@
|
||||
All rights reserved
|
||||
|
||||
|
||||
+uIP v0.7.6.1 (Oct 15, 2012)
|
||||
+=======================================================
|
||||
+ Fixes
|
||||
+ -----
|
||||
+ 1. Problem: Cont00065690 - Vconfig method of connecting over
|
||||
+ tagged vlan with IPv6 failed
|
||||
+ Cause: The new net param support changes has prevented
|
||||
+ the old vconfig method from execising the IPv6
|
||||
+ acquisition engine properly
|
||||
+ Change: Ensure that this old vconfig method to run the IPv6
|
||||
+ acquisition engine properly and to its entirety
|
||||
+ Impact: IPv6 + VLAN using the network VLAN configuration
|
||||
+ method
|
||||
+
|
||||
+ 2. Problem: Cont00065768 - RHEL5.X iscsiuio segfault possible
|
||||
+ if there is a specific 1024 byte size broadcast
|
||||
+ packet
|
||||
+ Cause: This is a corner case where the packet size is
|
||||
+ exactly 1024 bytes + padding that exceeded the
|
||||
+ DMA rx buffer. This has been there since day 1.
|
||||
+ Change: Ensure that the packet size + padding do not
|
||||
+ exceed this limit.
|
||||
+ Impact: 10G only. 1G already has the guard against it.
|
||||
+
|
||||
+ Enhancements
|
||||
+ ------------
|
||||
+ 1. Change: Added support for 10G 57840 4x10 and 2x20
|
||||
+ Impact: 10G 57840
|
||||
+
|
||||
+
|
||||
uIP v0.7.4.3 (Aug 16, 2012)
|
||||
=======================================================
|
||||
Fixes
|
||||
diff --git a/configure b/configure
|
||||
index 6ff2e68..0b2abc4 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.59 for iscsiuio 0.7.4.3.
|
||||
+# Generated by GNU Autoconf 2.59 for iscsiuio 0.7.6.1.
|
||||
#
|
||||
# Report bugs to <eddie.wai@broadcom.com>.
|
||||
#
|
||||
@@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='iscsiuio'
|
||||
PACKAGE_TARNAME='iscsiuio'
|
||||
-PACKAGE_VERSION='0.7.4.3'
|
||||
-PACKAGE_STRING='iscsiuio 0.7.4.3'
|
||||
+PACKAGE_VERSION='0.7.6.1'
|
||||
+PACKAGE_STRING='iscsiuio 0.7.6.1'
|
||||
PACKAGE_BUGREPORT='eddie.wai@broadcom.com'
|
||||
|
||||
# Factoring default headers for most tests.
|
||||
@@ -954,7 +954,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures iscsiuio 0.7.4.3 to adapt to many kinds of systems.
|
||||
+\`configure' configures iscsiuio 0.7.6.1 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1020,7 +1020,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of iscsiuio 0.7.4.3:";;
|
||||
+ short | recursive ) echo "Configuration of iscsiuio 0.7.6.1:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1161,7 +1161,7 @@ fi
|
||||
test -n "$ac_init_help" && exit 0
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-iscsiuio configure 0.7.4.3
|
||||
+iscsiuio configure 0.7.6.1
|
||||
generated by GNU Autoconf 2.59
|
||||
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
@@ -1175,7 +1175,7 @@ cat >&5 <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by iscsiuio $as_me 0.7.4.3, which was
|
||||
+It was created by iscsiuio $as_me 0.7.6.1, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -21726,7 +21726,7 @@ _ASBOX
|
||||
} >&5
|
||||
cat >&5 <<_CSEOF
|
||||
|
||||
-This file was extended by iscsiuio $as_me 0.7.4.3, which was
|
||||
+This file was extended by iscsiuio $as_me 0.7.6.1, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -21789,7 +21789,7 @@ _ACEOF
|
||||
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
-iscsiuio config.status 0.7.4.3
|
||||
+iscsiuio config.status 0.7.6.1
|
||||
configured by $0, generated by GNU Autoconf 2.59,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0b1e7f1..1045a80 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -11,9 +11,9 @@ dnl Maintained by: Eddie Wai (eddie.wai@broadcom.com)
|
||||
dnl
|
||||
|
||||
PACKAGE=iscsiuio
|
||||
-VERSION=0.7.4.3
|
||||
+VERSION=0.7.6.1
|
||||
|
||||
-AC_INIT(iscsiuio, 0.7.4.3, eddie.wai@broadcom.com)
|
||||
+AC_INIT(iscsiuio, 0.7.6.1, eddie.wai@broadcom.com)
|
||||
|
||||
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
diff --git a/docs/iscsiuio.8 b/docs/iscsiuio.8
|
||||
index 4bf26df..d107327 100644
|
||||
--- a/docs/iscsiuio.8
|
||||
+++ b/docs/iscsiuio.8
|
||||
@@ -3,9 +3,9 @@
|
||||
.\" modify it under the terms of the GNU General Public License as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
-.\" bnx2.4,v 0.7.4.3
|
||||
+.\" bnx2.4,v 0.7.6.1
|
||||
.\"
|
||||
-.TH iscsiuio 8 "08/16/2012" "Broadcom Corporation"
|
||||
+.TH iscsiuio 8 "10/09/2012" "Broadcom Corporation"
|
||||
.\"
|
||||
.\" NAME part
|
||||
.\"
|
||||
diff --git a/src/uip/uip_arp.c b/src/uip/uip_arp.c
|
||||
index 3ef3b07..9dd02a1 100644
|
||||
--- a/src/uip/uip_arp.c
|
||||
+++ b/src/uip/uip_arp.c
|
||||
@@ -273,7 +273,6 @@ uip_arp_arpin(nic_interface_t * nic_iface,
|
||||
pkt->buf_size = sizeof(*arp) +
|
||||
sizeof(struct uip_vlan_eth_hdr);
|
||||
}
|
||||
- pkt->buf_size = sizeof(*arp) + sizeof(*eth);
|
||||
}
|
||||
break;
|
||||
case const_htons(ARP_REPLY):
|
||||
diff --git a/src/unix/libs/bnx2x.c b/src/unix/libs/bnx2x.c
|
||||
index 5e33420..70e85c0 100644
|
||||
--- a/src/unix/libs/bnx2x.c
|
||||
+++ b/src/unix/libs/bnx2x.c
|
||||
@@ -103,6 +103,10 @@ static const char brcm_57840_MF[] = "Broadcom NetXtreme II BCM57840 MF "
|
||||
"10-Gigabit";
|
||||
static const char brcm_57840_VF[] = "Broadcom NetXtreme II BCM57840 VF "
|
||||
"10-Gigabit";
|
||||
+static const char brcm_57840_4_10[] = "Broadcom NetXtreme II BCM57840 4x"
|
||||
+ "10-Gigabit";
|
||||
+static const char brcm_57840_2_20[] = "Broadcom NetXtreme II BCM57840 2x"
|
||||
+ "20-Gigabit";
|
||||
|
||||
/*******************************************************************************
|
||||
* PCI ID constants
|
||||
@@ -123,6 +127,8 @@ static const char brcm_57840_VF[] = "Broadcom NetXtreme II BCM57840 VF "
|
||||
#define PCI_DEVICE_ID_NX2_57840 0x168d
|
||||
#define PCI_DEVICE_ID_NX2_57840_MF 0x16ab
|
||||
#define PCI_DEVICE_ID_NX2_57840_VF 0x16ad
|
||||
+#define PCI_DEVICE_ID_NX2_57840_4_10 0x16a1
|
||||
+#define PCI_DEVICE_ID_NX2_57840_2_20 0x16a2
|
||||
#define PCI_ANY_ID (~0)
|
||||
|
||||
/* This is the table used to match PCI vendor and device ID's to the
|
||||
@@ -158,6 +164,10 @@ static const struct pci_device_id bnx2x_pci_tbl[] = {
|
||||
PCI_ANY_ID, PCI_ANY_ID, brcm_57840_MF},
|
||||
{PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_NX2_57840_VF,
|
||||
PCI_ANY_ID, PCI_ANY_ID, brcm_57840_VF},
|
||||
+ {PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_NX2_57840_4_10,
|
||||
+ PCI_ANY_ID, PCI_ANY_ID, brcm_57840_4_10},
|
||||
+ {PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_NX2_57840_2_20,
|
||||
+ PCI_ANY_ID, PCI_ANY_ID, brcm_57840_2_20},
|
||||
};
|
||||
|
||||
static struct iro e1_iro[2] = {
|
||||
@@ -1401,7 +1411,7 @@ static int bnx2x_read(nic_t * nic, packet_t * pkt)
|
||||
union eth_rx_cqe *cqe;
|
||||
__u8 cqe_fp_flags;
|
||||
void *rx_pkt;
|
||||
- int len, pad, cqe_size;
|
||||
+ int len, pad, cqe_size, max_len;
|
||||
rc = 1;
|
||||
|
||||
if (bnx2x_is_ver70(bp)) {
|
||||
@@ -1427,10 +1437,13 @@ static int bnx2x_read(nic_t * nic, packet_t * pkt)
|
||||
|
||||
/* Doto query MTU size of physical device */
|
||||
/* Ensure len is valid */
|
||||
- if (len > pkt->max_buf_size)
|
||||
+ max_len = pkt->max_buf_size < bp->rx_buffer_size ?
|
||||
+ pkt->max_buf_size : bp->rx_buffer_size;
|
||||
+ if (len > max_len) {
|
||||
LOG_DEBUG(PFX "%s: bad BD length: %d",
|
||||
nic->log_name, len);
|
||||
-
|
||||
+ len = max_len;
|
||||
+ }
|
||||
if (len > 0) {
|
||||
msync(rx_pkt, len, MS_SYNC);
|
||||
/* Copy the data */
|
||||
diff --git a/src/unix/libs/bnx2x.h b/src/unix/libs/bnx2x.h
|
||||
index b758179..1f47011 100644
|
||||
--- a/src/unix/libs/bnx2x.h
|
||||
+++ b/src/unix/libs/bnx2x.h
|
||||
@@ -430,6 +430,8 @@ struct client_init_general_data {
|
||||
#define CHIP_NUM_57800 0x168a
|
||||
#define CHIP_NUM_57810 0x168e
|
||||
#define CHIP_NUM_57840 0x168d
|
||||
+#define CHIP_NUM_57840_4_10 0x16a1
|
||||
+#define CHIP_NUM_57840_2_20 0x16a2
|
||||
|
||||
#define CHIP_IS_E1(bp) (BNX2X_CHIP_NUM(bp) == CHIP_NUM_57710)
|
||||
#define CHIP_IS_57711(bp) (BNX2X_CHIP_NUM(bp) == CHIP_NUM_57711)
|
||||
@@ -438,7 +440,11 @@ struct client_init_general_data {
|
||||
#define CHIP_IS_57712E(bp) (BNX2X_CHIP_NUM(bp) == CHIP_NUM_57712E)
|
||||
#define CHIP_IS_57800(bp) (BNX2X_CHIP_NUM(bp) == CHIP_NUM_57800)
|
||||
#define CHIP_IS_57810(bp) (BNX2X_CHIP_NUM(bp) == CHIP_NUM_57810)
|
||||
-#define CHIP_IS_57840(bp) (BNX2X_CHIP_NUM(bp) == CHIP_NUM_57840)
|
||||
+#define CHIP_IS_57840_4_10(bp) (BNX2X_CHIP_NUM(bp) == CHIP_NUM_57840_4_10)
|
||||
+#define CHIP_IS_57840_2_20(bp) (BNX2X_CHIP_NUM(bp) == CHIP_NUM_57840_2_20)
|
||||
+#define CHIP_IS_57840(bp) (BNX2X_CHIP_NUM(bp) == CHIP_NUM_57840 || \
|
||||
+ CHIP_IS_57840_4_10(bp) || \
|
||||
+ CHIP_IS_57840_2_20(bp))
|
||||
#define CHIP_IS_E1H(bp) (CHIP_IS_57711(bp) || \
|
||||
CHIP_IS_57711E(bp))
|
||||
#define CHIP_IS_E2(bp) (CHIP_IS_57712(bp) || \
|
||||
diff --git a/src/unix/nic.c b/src/unix/nic.c
|
||||
index 0b3c538..72afff0 100644
|
||||
--- a/src/unix/nic.c
|
||||
+++ b/src/unix/nic.c
|
||||
@@ -460,6 +460,7 @@ int nic_remove(nic_t * nic)
|
||||
rc = stat(nic->uio_device_name, &file_stat);
|
||||
if ((rc == 0) && (nic->ops))
|
||||
nic->ops->close(nic, 0);
|
||||
+ pthread_mutex_unlock(&nic->nic_mutex);
|
||||
|
||||
nic->state = NIC_EXIT;
|
||||
|
||||
@@ -910,7 +911,7 @@ int do_timers_per_nic_iface(nic_t *nic, nic_interface_t *nic_iface,
|
||||
if (pkt == NULL)
|
||||
return -EIO;
|
||||
|
||||
- if (nic_iface->ustack.ip_config == AF_INET) {
|
||||
+ if (nic_iface->protocol == AF_INET) {
|
||||
for (i = 0; i < UIP_UDP_CONNS; i++) {
|
||||
prepare_ustack(nic, nic_iface, ustack, pkt);
|
||||
|
||||
diff --git a/src/unix/nic_nl.c b/src/unix/nic_nl.c
|
||||
index 34e2062..8afd9ae 100644
|
||||
--- a/src/unix/nic_nl.c
|
||||
+++ b/src/unix/nic_nl.c
|
||||
@@ -408,7 +408,7 @@ static int ctldev_handle(char *data, nic_t *nic)
|
||||
persist_all_nic_iface(nic);
|
||||
|
||||
nic_iface = vlan_iface;
|
||||
-
|
||||
+ nic_iface->flags |= NIC_IFACE_ACQUIRE;
|
||||
pthread_mutex_unlock(&nic->nic_mutex);
|
||||
|
||||
/* nic_disable but not going down */
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 2c05e5731fdbe21c3a44f9c62963a838bf74ec5b Mon Sep 17 00:00:00 2001
|
||||
From: Chris Leech <cleech@redhat.com>
|
||||
Date: Mon, 21 Jan 2013 15:43:36 -0800
|
||||
Subject: use Red Hat version string to match RPM package version
|
||||
|
||||
---
|
||||
usr/version.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/usr/version.h b/usr/version.h
|
||||
index a090522..aef0c3d 100644
|
||||
--- a/usr/version.h
|
||||
+++ b/usr/version.h
|
||||
@@ -6,7 +6,7 @@
|
||||
* This may not be the same value as the kernel versions because
|
||||
* some other maintainer could merge a patch without going through us
|
||||
*/
|
||||
-#define ISCSI_VERSION_STR "2.0-873"
|
||||
+#define ISCSI_VERSION_STR "6.2.0.873-1"
|
||||
#define ISCSI_VERSION_FILE "/sys/module/scsi_transport_iscsi/version"
|
||||
|
||||
#endif
|
||||
--
|
||||
1.7.11.7
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/version.h 2011-09-01 20:54:51.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/version.h 2011-09-01 20:59:20.000000000 -0500
|
||||
@@ -6,7 +6,7 @@
|
||||
* This may not be the same value as the kernel versions because
|
||||
* some other maintainer could merge a patch without going through us
|
||||
*/
|
||||
-#define ISCSI_VERSION_STR "2.0-872"
|
||||
+#define ISCSI_VERSION_STR "2.0-872.18.f17"
|
||||
#define ISCSI_VERSION_FILE "/sys/module/scsi_transport_iscsi/version"
|
||||
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsi_uio/docs/iscsiuio.8 open-iscsi-2.0-872-rc4-bnx2i.work/iscsiuio/docs/iscsiuio.8
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/docs/iscsiuio.8 2011-01-31 19:38:19.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/iscsiuio/docs/iscsiuio.8 2011-01-31 19:38:44.000000000 -0600
|
||||
@@ -67,6 +67,15 @@ into the background.
|
||||
.TP
|
||||
.BI -v
|
||||
This is to print the version.
|
||||
+.PP
|
||||
+.TP
|
||||
+.BI -p <pidfile>
|
||||
+Use pidfile (default /var/run/iscsiuio.pid )
|
||||
+.PP
|
||||
+.TP
|
||||
+.BI -h
|
||||
+Display this help and exit.
|
||||
+
|
||||
|
||||
.\"
|
||||
.\" AUTHOR part
|
@ -1,47 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/db-policy.c open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/db-policy.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/db-policy.c 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/db-policy.c 2011-09-01 20:31:39.000000000 -0500
|
||||
@@ -7,8 +7,10 @@
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
+#ifdef WITH_SECURITY
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/err.h>
|
||||
+#endif
|
||||
#include "isns.h"
|
||||
#include "security.h"
|
||||
#include "objects.h"
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/security.h open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/security.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/security.h 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/security.h 2011-09-01 20:31:39.000000000 -0500
|
||||
@@ -6,11 +6,16 @@
|
||||
|
||||
#ifndef ISNS_SECURITY_H
|
||||
#define ISNS_SECURITY_H
|
||||
-
|
||||
-#include <openssl/evp.h>
|
||||
#include "buffer.h"
|
||||
#include "util.h"
|
||||
|
||||
+
|
||||
+#ifdef WITH_SECURITY
|
||||
+#include <openssl/evp.h>
|
||||
+#else
|
||||
+#define EVP_PKEY void
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Security context
|
||||
*/
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/util.h open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/util.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/utils/open-isns/util.h 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/utils/open-isns/util.h 2011-09-01 20:31:39.000000000 -0500
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
+#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h> // for strdup
|
@ -1,12 +0,0 @@
|
||||
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-01-31 06:23:53.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/Makefile 2011-01-31 06:23:14.000000000 -0600
|
||||
@@ -61,7 +61,7 @@ iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_
|
||||
|
||||
iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
|
||||
iscsistart.o statics.o
|
||||
- $(CC) $(CFLAGS) -static $^ -o $@
|
||||
+ $(CC) $(CFLAGS) $^ -o $@
|
||||
clean:
|
||||
rm -f *.o $(PROGRAMS) .depend $(LIBSYS)
|
||||
|
@ -1,172 +0,0 @@
|
||||
commit ac38eee2083821eb29d098227ad044c950d115e4
|
||||
Author: Mike Christie <michaelc@cs.wisc.edu>
|
||||
Date: Sun Aug 14 22:14:04 2011 -0500
|
||||
|
||||
iscsi tools: fix default iface binding setup
|
||||
|
||||
If a driver supports multiple ifaces only one is getting
|
||||
auto created. This modifies the default iface setup code
|
||||
so that it creates a iface per kernel iface or a iface per
|
||||
host if kernel ifaces are not supported.
|
||||
|
||||
diff --git a/usr/iface.c b/usr/iface.c
|
||||
index 5d5f7bf..9c70d09 100644
|
||||
--- a/usr/iface.c
|
||||
+++ b/usr/iface.c
|
||||
@@ -424,12 +424,61 @@ int iface_get_by_net_binding(struct iface_rec *pattern,
|
||||
return ISCSI_ERR_NO_OBJS_FOUND;
|
||||
}
|
||||
|
||||
+static int iface_get_iptype(struct iface_rec *iface)
|
||||
+{
|
||||
+ if (strcmp(iface->bootproto, "dhcp") && !strstr(iface->ipaddress, "."))
|
||||
+ return ISCSI_IFACE_TYPE_IPV6;
|
||||
+ else
|
||||
+ return ISCSI_IFACE_TYPE_IPV4;
|
||||
+}
|
||||
+
|
||||
+static int iface_setup_binding_from_kern_iface(void *data,
|
||||
+ struct iface_rec *kern_iface)
|
||||
+{
|
||||
+ struct host_info *hinfo = data;
|
||||
+ struct iface_rec iface;
|
||||
+
|
||||
+ if (!strlen(hinfo->iface.hwaddress)) {
|
||||
+ log_error("Invalid offload iSCSI host %u. Missing "
|
||||
+ "hwaddress. Try upgrading %s driver.\n",
|
||||
+ hinfo->host_no, hinfo->iface.transport_name);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ memset(&iface, 0, sizeof(struct iface_rec));
|
||||
+ strcpy(iface.hwaddress, hinfo->iface.hwaddress);
|
||||
+ strcpy(iface.transport_name, hinfo->iface.transport_name);
|
||||
+
|
||||
+ if (kern_iface) {
|
||||
+ iface.iface_num = kern_iface->iface_num;
|
||||
+
|
||||
+ snprintf(iface.name, sizeof(iface.name), "%s.%s.%s.%u",
|
||||
+ kern_iface->transport_name,
|
||||
+ kern_iface->hwaddress,
|
||||
+ iface_get_iptype(kern_iface) == ISCSI_IFACE_TYPE_IPV4 ?
|
||||
+ "ipv4" : "ipv6", kern_iface->iface_num);
|
||||
+ } else {
|
||||
+ snprintf(iface.name, sizeof(iface.name), "%s.%s",
|
||||
+ hinfo->iface.transport_name, hinfo->iface.hwaddress);
|
||||
+ }
|
||||
+
|
||||
+ if (iface_conf_read(&iface)) {
|
||||
+ /* not found so create it */
|
||||
+ if (iface_conf_write(&iface)) {
|
||||
+ log_error("Could not create default iface conf %s.",
|
||||
+ iface.name);
|
||||
+ /* fall through - will not be persistent */
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int __iface_setup_host_bindings(void *data, struct host_info *hinfo)
|
||||
{
|
||||
struct iface_rec *def_iface;
|
||||
- struct iface_rec iface;
|
||||
struct iscsi_transport *t;
|
||||
- int i = 0;
|
||||
+ int i = 0, nr_found;
|
||||
|
||||
t = iscsi_sysfs_get_transport_by_hba(hinfo->host_no);
|
||||
if (!t)
|
||||
@@ -441,26 +490,12 @@ static int __iface_setup_host_bindings(void *data, struct host_info *hinfo)
|
||||
return 0;
|
||||
}
|
||||
|
||||
- if (iface_get_by_net_binding(&hinfo->iface, &iface) ==
|
||||
- ISCSI_ERR_NO_OBJS_FOUND) {
|
||||
- /* Must be a new port */
|
||||
- if (!strlen(hinfo->iface.hwaddress)) {
|
||||
- log_error("Invalid offload iSCSI host %u. Missing "
|
||||
- "hwaddress. Try upgrading %s driver.\n",
|
||||
- hinfo->host_no, t->name);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- memset(&iface, 0, sizeof(struct iface_rec));
|
||||
- strcpy(iface.hwaddress, hinfo->iface.hwaddress);
|
||||
- strcpy(iface.transport_name, hinfo->iface.transport_name);
|
||||
- snprintf(iface.name, sizeof(iface.name), "%s.%s",
|
||||
- t->name, hinfo->iface.hwaddress);
|
||||
- if (iface_conf_write(&iface))
|
||||
- log_error("Could not create default iface conf %s.",
|
||||
- iface.name);
|
||||
- /* fall through - will not be persistent */
|
||||
- }
|
||||
+ nr_found = 0;
|
||||
+ iscsi_sysfs_for_each_iface_on_host(hinfo, hinfo->host_no,
|
||||
+ &nr_found,
|
||||
+ iface_setup_binding_from_kern_iface);
|
||||
+ if (!nr_found)
|
||||
+ iface_setup_binding_from_kern_iface(hinfo, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -843,7 +878,6 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
|
||||
memset(iface->name, 0, sizeof(iface->name));
|
||||
snprintf(iface->name, sizeof(iface->name), "%s.%s",
|
||||
iface->transport_name, context->mac);
|
||||
-
|
||||
strlcpy(iface->hwaddress, context->mac,
|
||||
sizeof(iface->hwaddress));
|
||||
strlcpy(iface->ipaddress, context->ipaddr,
|
||||
@@ -921,9 +955,7 @@ static int __iface_get_param_count(void *data, struct iface_rec *iface)
|
||||
if (strcmp(iface_params->primary->hwaddress, iface->hwaddress))
|
||||
return 0;
|
||||
|
||||
- if (strcmp(iface->bootproto, "dhcp") && !strstr(iface->ipaddress, "."))
|
||||
- iptype = ISCSI_IFACE_TYPE_IPV6;
|
||||
-
|
||||
+ iptype = iface_get_iptype(iface);
|
||||
if (iptype == ISCSI_IFACE_TYPE_IPV4) {
|
||||
|
||||
if (strcmp(iface->state, "disable")) {
|
||||
@@ -1466,12 +1498,10 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface)
|
||||
if (strcmp(net_config->primary->hwaddress, iface->hwaddress))
|
||||
return 0;
|
||||
|
||||
- if (strcmp(iface->bootproto, "dhcp") && !strstr(iface->ipaddress, "."))
|
||||
- iptype = ISCSI_IFACE_TYPE_IPV6;
|
||||
-
|
||||
/* start at 2, because 0 is for nlmsghdr and 1 for event */
|
||||
iov = net_config->iovs + 2;
|
||||
|
||||
+ iptype = iface_get_iptype(iface);
|
||||
if (iptype == ISCSI_IFACE_TYPE_IPV4) {
|
||||
if (!strcmp(iface->state, "disable")) {
|
||||
if (!iface_fill_net_state(&iov[net_config->count],
|
||||
diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c
|
||||
index 995549e..961cefd 100644
|
||||
--- a/usr/iscsi_sysfs.c
|
||||
+++ b/usr/iscsi_sysfs.c
|
||||
@@ -425,9 +425,10 @@ uint32_t iscsi_sysfs_get_host_no_from_hwinfo(struct iface_rec *iface, int *rc)
|
||||
static int iscsi_sysfs_read_iface(struct iface_rec *iface, int host_no,
|
||||
char *session, char *iface_kern_id)
|
||||
{
|
||||
+ uint32_t tmp_host_no, iface_num;
|
||||
char host_id[NAME_SIZE];
|
||||
struct iscsi_transport *t;
|
||||
- int ret;
|
||||
+ int ret, iface_type;
|
||||
|
||||
t = iscsi_sysfs_get_transport_by_hba(host_no);
|
||||
if (!t)
|
||||
@@ -582,6 +583,10 @@ static int iscsi_sysfs_read_iface(struct iface_rec *iface, int host_no,
|
||||
&iface->vlan_id);
|
||||
sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan_priority",
|
||||
&iface->vlan_priority);
|
||||
+
|
||||
+ if (sscanf(iface_kern_id, "ipv%d-iface-%u-%u", &iface_type,
|
||||
+ &tmp_host_no, &iface_num) == 3)
|
||||
+ iface->iface_num = iface_num;
|
||||
done:
|
||||
if (ret)
|
||||
return ISCSI_ERR_SYSFS_LOOKUP;
|
@ -1,33 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/include/fw_context.h open-iscsi-2.0-872-rc4-bnx2i.work/include/fw_context.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/include/fw_context.h 2011-10-10 13:57:38.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/include/fw_context.h 2011-10-12 01:03:30.000000000 -0500
|
||||
@@ -33,7 +34,7 @@ struct boot_context {
|
||||
/* target settings */
|
||||
int target_port;
|
||||
char targetname[TARGET_NAME_MAXLEN + 1];
|
||||
- char target_ipaddr[32];
|
||||
+ char target_ipaddr[256];
|
||||
char chap_name[AUTH_STR_MAX_LEN];
|
||||
char chap_password[AUTH_STR_MAX_LEN];
|
||||
char chap_name_in[AUTH_STR_MAX_LEN];
|
||||
@@ -44,14 +45,14 @@ struct boot_context {
|
||||
char initiatorname[TARGET_NAME_MAXLEN + 1];
|
||||
|
||||
/* network settings */
|
||||
- char dhcp[18];
|
||||
+ char dhcp[256];
|
||||
char iface[IF_NAMESIZE];
|
||||
char mac[18];
|
||||
- char ipaddr[18];
|
||||
- char gateway[18];
|
||||
- char primary_dns[18];
|
||||
- char secondary_dns[18];
|
||||
- char mask[18];
|
||||
+ char ipaddr[256];
|
||||
+ char gateway[256];
|
||||
+ char primary_dns[256];
|
||||
+ char secondary_dns[256];
|
||||
+ char mask[256];
|
||||
char lun[17];
|
||||
char vlan[15];
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-bnx2i.build/usr/initiator.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/usr/initiator.c 2011-09-01 20:29:49.000000000 -0500
|
||||
@@ -484,8 +484,7 @@ cleanup:
|
||||
if (session->id != -1) {
|
||||
log_debug(2, "kdestroy session %u", session->id);
|
||||
session->r_stage = R_STAGE_SESSION_DESTOYED;
|
||||
- err = ipc->destroy_session(session->t->handle, session->id);
|
||||
- if (err) {
|
||||
+ if (ipc->destroy_session(session->t->handle, session->id)) {
|
||||
log_error("can not safely destroy session %d",
|
||||
session->id);
|
||||
return ISCSI_ERR_INTERNAL;
|
@ -1,12 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/netlink.c open-iscsi-2.0-872-rc4-bnx2i.test/usr/netlink.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/netlink.c 2011-09-20 18:01:34.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.test/usr/netlink.c 2011-09-20 18:01:54.000000000 -0500
|
||||
@@ -185,7 +185,7 @@ kwritev(enum iscsi_uevent_e type, struct
|
||||
for (i = 1; i < count; i++)
|
||||
datalen += iovp[i].iov_len;
|
||||
|
||||
- nlh->nlmsg_len = NLMSG_ALIGN(datalen);
|
||||
+ nlh->nlmsg_len = datalen + sizeof(*nlh);
|
||||
nlh->nlmsg_pid = getpid();
|
||||
nlh->nlmsg_flags = 0;
|
||||
nlh->nlmsg_type = type;
|
@ -1,471 +0,0 @@
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/include/iscsi_if.h open-iscsi-2.0-872-rc4-bnx2i.work/include/iscsi_if.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/include/iscsi_if.h 2011-10-10 13:57:38.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/include/iscsi_if.h 2011-10-11 00:40:49.000000000 -0500
|
||||
@@ -320,10 +320,11 @@ enum iscsi_net_param {
|
||||
ISCSI_NET_PARAM_VLAN_ID = 13,
|
||||
ISCSI_NET_PARAM_VLAN_PRIORITY = 14,
|
||||
ISCSI_NET_PARAM_VLAN_ENABLED = 15,
|
||||
- ISCSI_NET_PARAM_IFACE_TYPE = 16,
|
||||
- ISCSI_NET_PARAM_IFACE_NAME = 17,
|
||||
- ISCSI_NET_PARAM_MTU = 18,
|
||||
- ISCSI_NET_PARAM_PORT = 19,
|
||||
+ ISCSI_NET_PARAM_VLAN_TAG = 16,
|
||||
+ ISCSI_NET_PARAM_IFACE_TYPE = 17,
|
||||
+ ISCSI_NET_PARAM_IFACE_NAME = 18,
|
||||
+ ISCSI_NET_PARAM_MTU = 19,
|
||||
+ ISCSI_NET_PARAM_PORT = 20,
|
||||
};
|
||||
|
||||
enum iscsi_conn_state {
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/host.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/host.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/host.c 2011-10-10 13:57:38.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/host.c 2011-10-11 00:41:01.000000000 -0500
|
||||
@@ -132,22 +132,67 @@ static int print_host_iface(void *data,
|
||||
printf("%sIPaddress: %s\n", prefix, UNKNOWN_VALUE);
|
||||
else if (strchr(iface->ipaddress, '.')) {
|
||||
printf("%sIPaddress: %s\n", prefix, iface->ipaddress);
|
||||
- printf("%sGateway: %s\n", prefix, iface->gateway);
|
||||
- printf("%sSubnet: %s\n", prefix, iface->subnet_mask);
|
||||
- printf("%sBootProto: %s\n", prefix, iface->bootproto);
|
||||
+
|
||||
+ if (!strlen(iface->gateway))
|
||||
+ printf("%sGateway: %s\n", prefix, UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sGateway: %s\n", prefix, iface->gateway);
|
||||
+ if (!strlen(iface->subnet_mask))
|
||||
+ printf("%sSubnet: %s\n", prefix, UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sSubnet: %s\n", prefix, iface->subnet_mask);
|
||||
+ if (!strlen(iface->bootproto))
|
||||
+ printf("%sBootProto: %s\n", prefix, UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sBootProto: %s\n", prefix, iface->bootproto);
|
||||
} else {
|
||||
printf("%sIPaddress: [%s]\n", prefix, iface->ipaddress);
|
||||
- printf("%sIPaddress Autocfg: %s\n", prefix, iface->ipv6_autocfg);
|
||||
- printf("%sLink Local Address: [%s]\n", prefix,
|
||||
- iface->ipv6_linklocal);
|
||||
- printf("%sLink Local Autocfg: %s\n", prefix,
|
||||
- iface->linklocal_autocfg);
|
||||
- printf("%sRouter Address: [%s]\n", prefix, iface->ipv6_router);
|
||||
+
|
||||
+ if (!strlen(iface->ipv6_autocfg))
|
||||
+ printf("%sIPaddress Autocfg: %s\n", prefix,
|
||||
+ UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sIPaddress Autocfg: %s\n", prefix,
|
||||
+ iface->ipv6_autocfg);
|
||||
+ if (!strlen(iface->ipv6_linklocal))
|
||||
+ printf("%sLink Local Address: %s\n", prefix,
|
||||
+ UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sLink Local Address: [%s]\n", prefix,
|
||||
+ iface->ipv6_linklocal);
|
||||
+ if (!strlen(iface->linklocal_autocfg))
|
||||
+ printf("%sLink Local Autocfg: %s\n", prefix,
|
||||
+ UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sLink Local Autocfg: %s\n", prefix,
|
||||
+ iface->linklocal_autocfg);
|
||||
+ if (!strlen(iface->ipv6_router))
|
||||
+ printf("%sRouter Address: %s\n", prefix,
|
||||
+ UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sRouter Address: [%s]\n", prefix,
|
||||
+ iface->ipv6_router);
|
||||
}
|
||||
|
||||
- printf("%sMTU: %u\n", prefix, iface->mtu);
|
||||
- printf("%svlan ID: %u\n", prefix, iface->vlan_id);
|
||||
- printf("%svlan priority: %u\n", prefix, iface->vlan_priority);
|
||||
+ if (!iface->port)
|
||||
+ printf("%sPort: %s\n", prefix, UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sPort: %u\n", prefix, iface->port);
|
||||
+
|
||||
+ if (!iface->mtu)
|
||||
+ printf("%sMTU: %s\n", prefix, UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sMTU: %u\n", prefix, iface->mtu);
|
||||
+
|
||||
+ if (iface->vlan_id == UINT16_MAX)
|
||||
+ printf("%sVLAN ID: %s\n", prefix, UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sVLAN ID: %u\n", prefix, iface->vlan_id);
|
||||
+
|
||||
+ if (iface->vlan_priority == UINT8_MAX)
|
||||
+ printf("%sVLAN priority: %s\n", prefix, UNKNOWN_VALUE);
|
||||
+ else
|
||||
+ printf("%sVLAN priority: %u\n", prefix, iface->vlan_priority);
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iface.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/iface.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iface.c 2011-10-10 13:57:38.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iface.c 2011-10-11 00:40:49.000000000 -0500
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "fw_context.h"
|
||||
#include "sysdeps.h"
|
||||
#include "iscsi_err.h"
|
||||
+#include "iscsi_netlink.h"
|
||||
|
||||
/*
|
||||
* Default ifaces for use with transports that do not bind to hardware
|
||||
@@ -1141,14 +1142,16 @@ static int iface_fill_port(struct iovec
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
uint16_t port = 3260;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
- len = sizeof(struct iscsi_iface_param_info) + 2;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
- if (!(iov->iov_base))
|
||||
+ len = sizeof(struct iscsi_iface_param_info) + sizeof(port);
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_PORT, len);
|
||||
+ if (!iov->iov_base)
|
||||
return 1;
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_PORT;
|
||||
net_param->iface_type = iface_type;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
@@ -1166,14 +1169,16 @@ static int iface_fill_mtu(struct iovec *
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
uint16_t mtu = 0;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 2;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_MTU, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_MTU;
|
||||
net_param->iface_type = iface_type;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
@@ -1191,15 +1196,17 @@ static int iface_fill_vlan_id(struct iov
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
uint16_t vlan = 0;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 2;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_VLAN_TAG, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
- net_param->param = ISCSI_NET_PARAM_VLAN_ID;
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
+ net_param->param = ISCSI_NET_PARAM_VLAN_TAG;
|
||||
net_param->iface_type = iface_type;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
net_param->param_type = ISCSI_NET_PARAM;
|
||||
@@ -1222,14 +1229,16 @@ static int iface_fill_vlan_state(struct
|
||||
{
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 1;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_VLAN_ENABLED, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_VLAN_ENABLED;
|
||||
net_param->iface_type = iface_type;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
@@ -1248,14 +1257,16 @@ static int iface_fill_net_state(struct i
|
||||
{
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 1;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IFACE_ENABLE, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_IFACE_ENABLE;
|
||||
net_param->iface_type = iface_type;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
@@ -1273,14 +1284,16 @@ static int iface_fill_net_bootproto(stru
|
||||
{
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 1;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IPV4_BOOTPROTO, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_IPV4_BOOTPROTO;
|
||||
net_param->iface_type = ISCSI_IFACE_TYPE_IPV4;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
@@ -1298,14 +1311,16 @@ static int iface_fill_net_autocfg(struct
|
||||
{
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 1;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG;
|
||||
net_param->iface_type = ISCSI_IFACE_TYPE_IPV6;
|
||||
net_param->param_type = ISCSI_NET_PARAM;
|
||||
@@ -1327,14 +1342,17 @@ static int iface_fill_linklocal_autocfg(
|
||||
{
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 1;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG,
|
||||
+ len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG;
|
||||
net_param->iface_type = ISCSI_IFACE_TYPE_IPV6;
|
||||
net_param->param_type = ISCSI_NET_PARAM;
|
||||
@@ -1353,14 +1371,17 @@ static int iface_fill_router_autocfg(str
|
||||
{
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 1;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(ISCSI_NET_PARAM_IPV6_ROUTER_AUTOCFG,
|
||||
+ len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = ISCSI_NET_PARAM_IPV6_ROUTER_AUTOCFG;
|
||||
net_param->iface_type = ISCSI_IFACE_TYPE_IPV6;
|
||||
net_param->param_type = ISCSI_NET_PARAM;
|
||||
@@ -1381,14 +1402,16 @@ static int iface_fill_net_ipv4_addr(stru
|
||||
int rc = 1;
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 4;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(param, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = param;
|
||||
net_param->iface_type = ISCSI_IFACE_TYPE_IPV4;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
@@ -1435,14 +1458,16 @@ static int iface_fill_net_ipv6_addr(stru
|
||||
int rc;
|
||||
int len;
|
||||
struct iscsi_iface_param_info *net_param;
|
||||
+ struct nlattr *attr;
|
||||
|
||||
len = sizeof(struct iscsi_iface_param_info) + 16;
|
||||
- iov->iov_base = calloc(len, sizeof(char));
|
||||
+ iov->iov_base = iscsi_nla_alloc(param, len);
|
||||
if (!(iov->iov_base))
|
||||
return 1;
|
||||
|
||||
- iov->iov_len = len;
|
||||
- net_param = (struct iscsi_iface_param_info *)(iov->iov_base);
|
||||
+ attr = iov->iov_base;
|
||||
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
||||
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
||||
net_param->param = param;
|
||||
net_param->iface_type = ISCSI_IFACE_TYPE_IPV6;
|
||||
net_param->iface_num = iface->iface_num;
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/initiator.c 2011-10-10 13:57:38.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/initiator.c 2011-10-11 00:39:57.000000000 -0500
|
||||
@@ -1682,9 +1682,10 @@ static void session_conn_process_login(v
|
||||
session->nrec.conn[conn->id].address,
|
||||
session->nrec.conn[conn->id].port,
|
||||
session->nrec.iface.name);
|
||||
- } else
|
||||
+ } else {
|
||||
session->notify_qtask = NULL;
|
||||
-
|
||||
+ mgmt_ipc_write_rsp(c->qtask, ISCSI_SUCCESS);
|
||||
+ }
|
||||
|
||||
/*
|
||||
* reset ERL=0 reopen counter
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_netlink.h open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_netlink.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_netlink.h 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_netlink.h 2011-10-11 00:40:34.000000000 -0500
|
||||
@@ -0,0 +1,33 @@
|
||||
+/*
|
||||
+ * iSCSI Netlink attr helpers
|
||||
+ *
|
||||
+ * Copyright (C) 2011 Red Hat, Inc. All rights reserved.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published
|
||||
+ * by the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful, but
|
||||
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * General Public License for more details.
|
||||
+ *
|
||||
+ * See the file COPYING included with this distribution for more details.
|
||||
+ */
|
||||
+
|
||||
+#ifndef ISCSI_NLA_H
|
||||
+#define ISCSI_NLA_H
|
||||
+
|
||||
+#include <linux/netlink.h>
|
||||
+
|
||||
+struct iovec;
|
||||
+
|
||||
+#define ISCSI_NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr)))
|
||||
+#define ISCSI_NLA_DATA(nla) ((void *)((char*)(nla) + ISCSI_NLA_HDRLEN))
|
||||
+#define ISCSI_NLA_LEN(len) ((len) + NLA_ALIGN(ISCSI_NLA_HDRLEN))
|
||||
+#define ISCSI_NLA_TOTAL_LEN(len) (NLA_ALIGN(ISCSI_NLA_LEN(len)))
|
||||
+
|
||||
+extern struct nlattr *iscsi_nla_alloc(uint16_t type, uint16_t len);
|
||||
+
|
||||
+#endif
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_sysfs.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_sysfs.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_sysfs.c 2011-10-10 13:57:38.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/iscsi_sysfs.c 2011-10-11 00:41:01.000000000 -0500
|
||||
@@ -561,28 +561,28 @@ static int iscsi_sysfs_read_iface(struct
|
||||
"link_local_addr", iface->ipv6_linklocal,
|
||||
sizeof(iface->ipv6_linklocal));
|
||||
|
||||
- if (sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
||||
- "linklocal_autocfg",
|
||||
- iface->linklocal_autocfg,
|
||||
- sizeof(iface->linklocal_autocfg))) {
|
||||
- /* misspelled in some test kernels */
|
||||
- sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
||||
- "link_local_autocfg",
|
||||
- iface->linklocal_autocfg,
|
||||
- sizeof(iface->linklocal_autocfg));
|
||||
- }
|
||||
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
||||
+ "link_local_autocfg", iface->linklocal_autocfg,
|
||||
+ sizeof(iface->linklocal_autocfg));
|
||||
|
||||
sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "router_addr",
|
||||
iface->ipv6_router,
|
||||
sizeof(iface->ipv6_router));
|
||||
}
|
||||
|
||||
- sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "mtu",
|
||||
- &iface->mtu);
|
||||
- sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan",
|
||||
- &iface->vlan_id);
|
||||
- sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan_priority",
|
||||
- &iface->vlan_priority);
|
||||
+ if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "port",
|
||||
+ &iface->port))
|
||||
+ iface->port = 0;
|
||||
+ if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "mtu",
|
||||
+ &iface->mtu))
|
||||
+ iface->mtu = 0;
|
||||
+ if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan_id",
|
||||
+ &iface->vlan_id))
|
||||
+ iface->vlan_id = UINT16_MAX;
|
||||
+
|
||||
+ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan_priority",
|
||||
+ &iface->vlan_priority))
|
||||
+ iface->vlan_priority = UINT8_MAX;
|
||||
|
||||
if (sscanf(iface_kern_id, "ipv%d-iface-%u-%u", &iface_type,
|
||||
&tmp_host_no, &iface_num) == 3)
|
||||
diff -Naurp open-iscsi-2.0-872-rc4-bnx2i/usr/netlink.c open-iscsi-2.0-872-rc4-bnx2i.work/usr/netlink.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/netlink.c 2011-10-10 13:57:38.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.work/usr/netlink.c 2011-10-11 00:40:34.000000000 -0500
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "initiator.h"
|
||||
#include "iscsi_sysfs.h"
|
||||
#include "transport.h"
|
||||
+#include "iscsi_netlink.h"
|
||||
|
||||
static int ctrl_fd;
|
||||
static struct sockaddr_nl src_addr, dest_addr;
|
||||
@@ -63,6 +64,19 @@ static int ctldev_handle(void);
|
||||
|
||||
#define NLM_SETPARAM_DEFAULT_MAX (NI_MAXHOST + 1 + sizeof(struct iscsi_uevent))
|
||||
|
||||
+struct nlattr *iscsi_nla_alloc(uint16_t type, uint16_t len)
|
||||
+{
|
||||
+ struct nlattr *attr;
|
||||
+
|
||||
+ attr = calloc(1, ISCSI_NLA_TOTAL_LEN(len));
|
||||
+ if (!attr)
|
||||
+ return NULL;
|
||||
+
|
||||
+ attr->nla_len = ISCSI_NLA_LEN(len);
|
||||
+ attr->nla_type = type;
|
||||
+ return attr;
|
||||
+}
|
||||
+
|
||||
static int
|
||||
kread(char *data, int count)
|
||||
{
|
@ -1,46 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/iface.c open-iscsi-2.0-872-rc4-bnx2i.test/usr/iface.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iface.c 2011-09-08 15:26:45.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.test/usr/iface.c 2011-09-08 15:31:32.000000000 -0500
|
||||
@@ -829,6 +829,7 @@ int iface_setup_from_boot_context(struct
|
||||
{
|
||||
struct iscsi_transport *t;
|
||||
uint32_t hostno;
|
||||
+ int rc;
|
||||
|
||||
if (strlen(context->initiatorname))
|
||||
strlcpy(iface->iname, context->initiatorname,
|
||||
@@ -841,8 +842,6 @@ int iface_setup_from_boot_context(struct
|
||||
return 0;
|
||||
}
|
||||
} else if (strlen(context->iface)) {
|
||||
-/* this ifdef is only temp until distros and firmwares are updated */
|
||||
-#ifdef OFFLOAD_BOOT_SUPPORTED
|
||||
hostno = iscsi_sysfs_get_host_no_from_hwaddress(context->mac,
|
||||
&rc);
|
||||
if (rc) {
|
||||
@@ -857,9 +856,6 @@ int iface_setup_from_boot_context(struct
|
||||
}
|
||||
|
||||
strlcpy(iface->netdev, context->iface, sizeof(iface->netdev));
|
||||
-#else
|
||||
- return 0;
|
||||
-#endif
|
||||
} else
|
||||
return 0;
|
||||
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_net_util.c open-iscsi-2.0-872-rc4-bnx2i.test/usr/iscsi_net_util.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/usr/iscsi_net_util.c 2011-09-08 15:27:24.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.test/usr/iscsi_net_util.c 2011-09-08 15:26:50.000000000 -0500
|
||||
@@ -39,12 +39,10 @@ struct iscsi_net_driver {
|
||||
};
|
||||
|
||||
static struct iscsi_net_driver net_drivers[] = {
|
||||
-#ifdef OFFLOAD_BOOT_SUPPORTED
|
||||
{"cxgb3", "cxgb3i" },
|
||||
{"cxgb4", "cxgb4i" },
|
||||
{"bnx2", "bnx2i" },
|
||||
{"bnx2x", "bnx2i"},
|
||||
-#endif
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,371 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/configure open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/configure
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/configure 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/configure 2011-09-01 20:33:58.000000000 -0500
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.59 for iscsiuio 0.7.0.12.
|
||||
+# Generated by GNU Autoconf 2.59 for iscsiuio 0.7.0.14.
|
||||
#
|
||||
# Report bugs to <eddie.wai@broadcom.com>.
|
||||
#
|
||||
@@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='iscsiuio'
|
||||
PACKAGE_TARNAME='iscsiuio'
|
||||
-PACKAGE_VERSION='0.7.0.12'
|
||||
-PACKAGE_STRING='iscsiuio 0.7.0.12'
|
||||
+PACKAGE_VERSION='0.7.0.14'
|
||||
+PACKAGE_STRING='iscsiuio 0.7.0.14'
|
||||
PACKAGE_BUGREPORT='eddie.wai@broadcom.com'
|
||||
|
||||
# Factoring default headers for most tests.
|
||||
@@ -954,7 +954,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures iscsiuio 0.7.0.12 to adapt to many kinds of systems.
|
||||
+\`configure' configures iscsiuio 0.7.0.14 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1020,7 +1020,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of iscsiuio 0.7.0.12:";;
|
||||
+ short | recursive ) echo "Configuration of iscsiuio 0.7.0.14:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1161,7 +1161,7 @@ fi
|
||||
test -n "$ac_init_help" && exit 0
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-iscsiuio configure 0.7.0.12
|
||||
+iscsiuio configure 0.7.0.14
|
||||
generated by GNU Autoconf 2.59
|
||||
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
@@ -1175,7 +1175,7 @@ cat >&5 <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by iscsiuio $as_me 0.7.0.12, which was
|
||||
+It was created by iscsiuio $as_me 0.7.0.14, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -21726,7 +21726,7 @@ _ASBOX
|
||||
} >&5
|
||||
cat >&5 <<_CSEOF
|
||||
|
||||
-This file was extended by iscsiuio $as_me 0.7.0.12, which was
|
||||
+This file was extended by iscsiuio $as_me 0.7.0.14, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -21789,7 +21789,7 @@ _ACEOF
|
||||
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
-iscsiuio config.status 0.7.0.12
|
||||
+iscsiuio config.status 0.7.0.14
|
||||
configured by $0, generated by GNU Autoconf 2.59,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/configure.ac open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/configure.ac
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/configure.ac 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/configure.ac 2011-09-01 20:33:58.000000000 -0500
|
||||
@@ -11,9 +11,9 @@ dnl Maintained by: Eddie Wai (eddie.wai@
|
||||
dnl
|
||||
|
||||
PACKAGE=iscsiuio
|
||||
-VERSION=0.7.0.12
|
||||
+VERSION=0.7.0.14
|
||||
|
||||
-AC_INIT(iscsiuio, 0.7.0.12, eddie.wai@broadcom.com)
|
||||
+AC_INIT(iscsiuio, 0.7.0.14, eddie.wai@broadcom.com)
|
||||
|
||||
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/docs/iscsiuio.8 open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/docs/iscsiuio.8
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/docs/iscsiuio.8 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/docs/iscsiuio.8 2011-09-01 20:33:58.000000000 -0500
|
||||
@@ -3,9 +3,9 @@
|
||||
.\" modify it under the terms of the GNU General Public License as
|
||||
.\" published by the Free Software Foundation.
|
||||
.\"
|
||||
-.\" bnx2.4,v 0.7.0.12
|
||||
+.\" bnx2.4,v 0.7.0.14
|
||||
.\"
|
||||
-.TH iscsiuio 8 "08/04/2011" "Broadcom Corporation"
|
||||
+.TH iscsiuio 8 "08/23/2011" "Broadcom Corporation"
|
||||
.\"
|
||||
.\" NAME part
|
||||
.\"
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/include/uip_mgmt_ipc.h open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/include/uip_mgmt_ipc.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/include/uip_mgmt_ipc.h 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/include/uip_mgmt_ipc.h 2011-09-01 20:33:47.000000000 -0500
|
||||
@@ -50,11 +50,11 @@ typedef struct iscsid_uip_broadcast {
|
||||
|
||||
typedef enum iscsid_uip_mgmt_ipc_err {
|
||||
ISCSID_UIP_MGMT_IPC_OK = 0,
|
||||
- ISCISD_UIP_MGMT_IPC_ERR = 1,
|
||||
- ISCISD_UIP_MGMT_IPC_ERR_NOT_FOUND = 2,
|
||||
- ISCISD_UIP_MGMT_IPC_ERR_NOMEM = 3,
|
||||
- ISCISD_UIP_MGMT_IPC_DEVICE_UP = 4,
|
||||
- ISCISD_UIP_MGMT_IPC_DEVICE_INITIALIZING = 5,
|
||||
+ ISCSID_UIP_MGMT_IPC_ERR = 1,
|
||||
+ ISCSID_UIP_MGMT_IPC_ERR_NOT_FOUND = 2,
|
||||
+ ISCSID_UIP_MGMT_IPC_ERR_NOMEM = 3,
|
||||
+ ISCSID_UIP_MGMT_IPC_DEVICE_UP = 4,
|
||||
+ ISCSID_UIP_MGMT_IPC_DEVICE_INITIALIZING = 5,
|
||||
} iscsid_uip_mgmt_ipc_err_e;
|
||||
|
||||
/* IPC Response */
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/README open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/README
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/README 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/README 2011-09-01 20:33:58.000000000 -0500
|
||||
@@ -1,6 +1,6 @@
|
||||
-Broadcom iSCSI Userspace Tools
|
||||
-Version 0.7.0.12
|
||||
-Aug 04, 2011
|
||||
+iscsiuio Userspace Tools
|
||||
+Version 0.7.0.14
|
||||
+Aug 23, 2011
|
||||
------------------------------------------------------
|
||||
|
||||
This tools is to be used in conjunction with the Broadcom NetXtreme II Linux
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/RELEASE.TXT open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/RELEASE.TXT
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/RELEASE.TXT 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/RELEASE.TXT 2011-09-01 20:33:58.000000000 -0500
|
||||
@@ -1,7 +1,7 @@
|
||||
Release Notes
|
||||
Broadcom uIP Linux Driver
|
||||
- Version 0.7.0.12
|
||||
- 08/04/2011
|
||||
+ Version 0.7.0.14
|
||||
+ 08/23/2011
|
||||
|
||||
Broadcom Corporation
|
||||
5300 California Avenue,
|
||||
@@ -10,6 +10,36 @@
|
||||
Copyright (c) 2004 - 2011 Broadcom Corporation
|
||||
All rights reserved
|
||||
|
||||
+uIP v0.7.0.14 (Aug 23, 2011)
|
||||
+=======================================================
|
||||
+ Fixes
|
||||
+ -----
|
||||
+ 1. Problem: Cont00057840 - RHEL6.2 inbox: Unable to connect to
|
||||
+ targets with 5709
|
||||
+ Cause: For cases when the bnx2/bnx2x driver gets removed, the
|
||||
+ uio database that was built by cnic would have the device
|
||||
+ ->net reference removed. This has caused an unnecessary
|
||||
+ timeout of 5s for each stale uio entry in the database.
|
||||
+ Change: Adjusted the routine which seeks the device->net entry
|
||||
+ to include more logic instead of hard waiting for 5s.
|
||||
+
|
||||
+ Enhancements
|
||||
+ ------------
|
||||
+ 1. Change: Added support for RHEL6.2 for out-of-box release
|
||||
+ 2. Change: Updated the man page with -h and -p info
|
||||
+ 3. Change: Updated the -h info
|
||||
+
|
||||
+
|
||||
+uIP v0.7.0.13 (Aug 10, 2011)
|
||||
+=======================================================
|
||||
+ Fixes
|
||||
+ -----
|
||||
+ 1. Problem: Cont00057768 - iscsiuio logrotate causes daemon failure
|
||||
+ Cause: The logrotate script will send a SIGUSR1 signal to notify
|
||||
+ the iscsiuio daemon of such action. However, the daemon
|
||||
+ wasn't programmed to catch this signal.
|
||||
+ Change: Restored the catching of this signal
|
||||
+
|
||||
|
||||
uIP v0.7.0.12 (Aug 04, 2011)
|
||||
=======================================================
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/iscsid_ipc.c open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/iscsid_ipc.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/iscsid_ipc.c 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/iscsid_ipc.c 2011-09-01 20:33:53.000000000 -0500
|
||||
@@ -217,18 +217,23 @@ static int parse_iface(void *arg)
|
||||
struct in_addr netmask;
|
||||
int i, prefix_len = 64;
|
||||
struct ip_addr_mask ipam;
|
||||
+ struct iface_rec *rec;
|
||||
|
||||
data = (iscsid_uip_broadcast_t *) arg;
|
||||
|
||||
+ rec = &data->u.iface_rec.rec;
|
||||
LOG_INFO(PFX "Received request for '%s' to set IP address: '%s' "
|
||||
- "VLAN: '%d'",
|
||||
- data->u.iface_rec.rec.netdev,
|
||||
- data->u.iface_rec.rec.ipaddress, data->u.iface_rec.rec.vlan_id);
|
||||
+ "VLAN: '%d'", rec->netdev, rec->ipaddress, rec->vlan_id);
|
||||
|
||||
- vlan = data->u.iface_rec.rec.vlan_id;
|
||||
+ vlan = rec->vlan_id;
|
||||
+ if (vlan && valid_vlan(vlan) == 0) {
|
||||
+ LOG_ERR(PFX "Invalid VLAN tag: %d", rec->vlan_id);
|
||||
+ rc = -EIO;
|
||||
+ goto early_exit;
|
||||
+ }
|
||||
|
||||
/* Detect for CIDR notation and strip off the netmask if present */
|
||||
- rc = decode_cidr(data->u.iface_rec.rec.ipaddress, &ipam, &prefix_len);
|
||||
+ rc = decode_cidr(rec->ipaddress, &ipam, &prefix_len);
|
||||
if (rc && !ipam.ip_type) {
|
||||
LOG_ERR(PFX "decode_cidr: rc=%d, ipam.ip_type=%d",
|
||||
rc, ipam.ip_type)
|
||||
@@ -251,30 +256,29 @@ static int parse_iface(void *arg)
|
||||
|
||||
if (i >= 10) {
|
||||
LOG_WARN(PFX "Could not aquire nic_list_mutex lock");
|
||||
-
|
||||
rc = -EIO;
|
||||
goto early_exit;
|
||||
}
|
||||
|
||||
/* Check if we can find the NIC device using the netdev
|
||||
* name */
|
||||
- rc = from_netdev_name_find_nic(data->u.iface_rec.rec.netdev, &nic);
|
||||
+ rc = from_netdev_name_find_nic(rec->netdev, &nic);
|
||||
|
||||
if (rc != 0) {
|
||||
LOG_WARN(PFX "Couldn't find NIC: %s, creating an instance",
|
||||
- data->u.iface_rec.rec.netdev);
|
||||
+ rec->netdev);
|
||||
|
||||
nic = nic_init();
|
||||
if (nic == NULL) {
|
||||
LOG_ERR(PFX "Couldn't allocate space for NIC %s",
|
||||
- data->u.iface_rec.rec.netdev);
|
||||
+ rec->netdev);
|
||||
|
||||
rc = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
|
||||
strncpy(nic->eth_device_name,
|
||||
- data->u.iface_rec.rec.netdev,
|
||||
+ rec->netdev,
|
||||
sizeof(nic->eth_device_name));
|
||||
nic->config_device_name = nic->eth_device_name;
|
||||
nic->log_name = nic->eth_device_name;
|
||||
@@ -288,7 +292,7 @@ static int parse_iface(void *arg)
|
||||
nic_add(nic);
|
||||
} else {
|
||||
LOG_INFO(PFX " %s, using existing NIC",
|
||||
- data->u.iface_rec.rec.netdev);
|
||||
+ rec->netdev);
|
||||
}
|
||||
|
||||
if (nic->flags & NIC_GOING_DOWN) {
|
||||
@@ -335,12 +339,12 @@ static int parse_iface(void *arg)
|
||||
&transport_name_size);
|
||||
|
||||
if (strncmp(transport_name,
|
||||
- data->u.iface_rec.rec.transport_name,
|
||||
+ rec->transport_name,
|
||||
transport_name_size) != 0) {
|
||||
LOG_ERR(PFX "%s Transport name is not equal "
|
||||
"expected: %s got: %s",
|
||||
nic->log_name,
|
||||
- data->u.iface_rec.rec.transport_name,
|
||||
+ rec->transport_name,
|
||||
transport_name);
|
||||
}
|
||||
} else {
|
||||
@@ -548,11 +552,10 @@ enable_nic:
|
||||
|
||||
LOG_INFO(PFX "ISCSID_UIP_IPC_GET_IFACE: command: %x "
|
||||
"name: %s, netdev: %s ipaddr: %s vlan: %d transport_name:%s",
|
||||
- data->header.command, data->u.iface_rec.rec.name,
|
||||
- data->u.iface_rec.rec.netdev,
|
||||
- (ipam.ip_type ==
|
||||
- AF_INET) ? inet_ntoa(ipam.addr4) : ipv6_buf_str, vlan,
|
||||
- data->u.iface_rec.rec.transport_name);
|
||||
+ data->header.command, rec->name, rec->netdev,
|
||||
+ (ipam.ip_type == AF_INET) ? inet_ntoa(ipam.addr4) :
|
||||
+ ipv6_buf_str,
|
||||
+ vlan, rec->transport_name);
|
||||
|
||||
done:
|
||||
pthread_mutex_unlock(&nic_list_mutex);
|
||||
@@ -617,15 +620,15 @@ int process_iscsid_broadcast(int s2)
|
||||
switch (rc) {
|
||||
case 0:
|
||||
rsp.command = cmd;
|
||||
- rsp.err = ISCISD_UIP_MGMT_IPC_DEVICE_UP;
|
||||
+ rsp.err = ISCSID_UIP_MGMT_IPC_DEVICE_UP;
|
||||
break;
|
||||
case -EAGAIN:
|
||||
rsp.command = cmd;
|
||||
- rsp.err = ISCISD_UIP_MGMT_IPC_DEVICE_INITIALIZING;
|
||||
+ rsp.err = ISCSID_UIP_MGMT_IPC_DEVICE_INITIALIZING;
|
||||
break;
|
||||
default:
|
||||
rsp.command = cmd;
|
||||
- rsp.err = ISCISD_UIP_MGMT_IPC_ERR;
|
||||
+ rsp.err = ISCSID_UIP_MGMT_IPC_ERR;
|
||||
}
|
||||
|
||||
break;
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/main.c open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/main.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/main.c 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/main.c 2011-09-01 20:33:42.000000000 -0500
|
||||
@@ -172,10 +172,10 @@ static void main_usage()
|
||||
|
||||
printf("\nUsage: %s [OPTION]\n", APP_NAME);
|
||||
printf("\
|
||||
-Broadcom uIP daemon.\n\
|
||||
+iscsiuio daemon.\n\
|
||||
-f, --foreground make the program run in the foreground\n\
|
||||
-d, --debug debuglevel print debugging information\n\
|
||||
- -p, --pid=pidfile use pid file (default %s ).\n\
|
||||
+ -p, --pid=pidfile use pid file (default %s).\n\
|
||||
-h, --help display this help and exit\n\
|
||||
-v, --version display version and exit\n\
|
||||
", default_pid_filepath);
|
||||
@@ -336,6 +336,7 @@ int main(int argc, char *argv[])
|
||||
sigaddset(&set, SIGINT);
|
||||
sigaddset(&set, SIGQUIT);
|
||||
sigaddset(&set, SIGTERM);
|
||||
+ sigaddset(&set, SIGUSR1);
|
||||
rc = pthread_sigmask(SIG_SETMASK, &set, NULL);
|
||||
|
||||
/* Spin off the signal handling thread */
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/nic_utils.c open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/nic_utils.c
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/nic_utils.c 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/nic_utils.c 2011-09-01 20:33:37.000000000 -0500
|
||||
@@ -473,6 +473,7 @@ static int from_uio_find_associated_eth_
|
||||
char *search_paths[] = { "/sys/class/uio/uio%i/device/",
|
||||
"/sys/class/uio/uio%i/device/net"
|
||||
};
|
||||
+ int path_to[] = { 5, 1 };
|
||||
int (*search_filters[]) (const struct dirent *) = {
|
||||
filter_net_name, filter_dot_out,};
|
||||
char *(*extract_name[]) (struct dirent ** files) = {
|
||||
@@ -492,7 +493,7 @@ static int from_uio_find_associated_eth_
|
||||
/* Build the path to determine uio name */
|
||||
rc = sprintf(path, search_paths[path_iterator], uio_minor);
|
||||
|
||||
- wait_for_file_node_timed(nic, path, 5);
|
||||
+ wait_for_file_node_timed(nic, path, path_to[path_iterator]);
|
||||
|
||||
count = scandir(path, &files,
|
||||
search_filters[path_iterator], alphasort);
|
||||
diff -aurp open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/options.h open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/options.h
|
||||
--- open-iscsi-2.0-872-rc4-bnx2i/iscsiuio/src/unix/options.h 2011-09-01 20:28:53.000000000 -0500
|
||||
+++ open-iscsi-2.0-872-rc4-bnx2i.build/iscsiuio/src/unix/options.h 2011-09-01 20:33:42.000000000 -0500
|
||||
@@ -78,7 +78,7 @@
|
||||
#define ETHERTYPE_VLAN 0x8100 /* IEEE 802.1Q VLAN tagging */
|
||||
#endif /* ETHERTYPE_VLAN */
|
||||
|
||||
-#define APP_NAME "uIP"
|
||||
+#define APP_NAME "iscsiuio"
|
||||
/* BUILD_DATE is automatically generated from the Makefile */
|
||||
|
||||
#define DEBUG_OFF 0x1
|
File diff suppressed because it is too large
Load Diff
@ -1,137 +0,0 @@
|
||||
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-15 00:05:23.000000000 -0500
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <netdb.h>
|
||||
#include "list.h"
|
||||
+#include "iscsi_net_util.h"
|
||||
|
||||
/* ISIDs now have a typed naming authority in them. We use an OUI */
|
||||
#define DRIVER_ISID_0 0x00
|
||||
@@ -31,18 +32,33 @@
|
||||
/* max len of interface */
|
||||
#define ISCSI_MAX_IFACE_LEN 65
|
||||
|
||||
-#if (ISCSID_VERSION == 872) /* 2.0-872 (RHEL 6.0) */
|
||||
-
|
||||
#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,40 +71,6 @@ typedef struct iface_rec {
|
||||
*/
|
||||
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) */
|
||||
-/* number of possible connections per session */
|
||||
-#define ISCSI_CONN_MAX 1
|
||||
-
|
||||
-#define ISCSI_TRANSPORT_NAME_MAXLEN 16
|
||||
-
|
||||
-typedef struct iface_rec {
|
||||
- struct list_head list;
|
||||
- /* iscsi iface record name */
|
||||
- char name[ISCSI_MAX_IFACE_LEN];
|
||||
- /* network layer iface name (eth0) */
|
||||
- char netdev[IFNAMSIZ];
|
||||
- char ipaddress[NI_MAXHOST];
|
||||
-
|
||||
- /*
|
||||
- * TODO: we may have to make this bigger and interconnect
|
||||
- * specific for infinniband
|
||||
- */
|
||||
- char hwaddress[ISCSI_MAX_IFACE_LEN];
|
||||
- char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN];
|
||||
- /*
|
||||
- * This is only used for boot now, but the iser guys
|
||||
- * can use this for their virtualization idea.
|
||||
- */
|
||||
- char alias[TARGET_NAME_MAXLEN + 1];
|
||||
- char iname[TARGET_NAME_MAXLEN + 1];
|
||||
-
|
||||
- char vlan[ISCSI_MAX_IFACE_LEN];
|
||||
} iface_rec_t;
|
||||
|
||||
-#endif /* ISCSID_VERSION */
|
||||
-
|
||||
#endif /* CONFIG_H */
|
||||
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
|
||||
+
|
||||
+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
|
||||
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) {
|
||||
LOG_ERR(PFX "Couldn't allocate memory for iface data");
|
||||
return -ENOMEM;
|
@ -1,12 +0,0 @@
|
||||
diff -aurp open-iscsi-2.0-871.1.1-bnx2i/utils/iscsi-iname.c open-iscsi-2.0-871.1.1-bnx2i.work/utils/iscsi-iname.c
|
||||
--- open-iscsi-2.0-871.1.1-bnx2i/utils/iscsi-iname.c 2010-01-15 02:24:02.000000000 -0600
|
||||
+++ open-iscsi-2.0-871.1.1-bnx2i.work/utils/iscsi-iname.c 2010-01-15 03:44:23.000000000 -0600
|
||||
@@ -73,7 +73,7 @@ main(int argc, char *argv[])
|
||||
exit(0);
|
||||
}
|
||||
} else {
|
||||
- prefix = "iqn.2005-03.org.open-iscsi";
|
||||
+ prefix = "iqn.1994-05.com.redhat";
|
||||
}
|
||||
|
||||
/* try to feed some entropy from the pool to MD5 in order to get
|
@ -1,51 +1,43 @@
|
||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
|
||||
%define open_iscsi_version 2.0
|
||||
%define open_iscsi_build 873
|
||||
%define iscsiuio_version 0.7.2.1
|
||||
|
||||
Summary: iSCSI daemon and utility programs
|
||||
Name: iscsi-initiator-utils
|
||||
Version: 6.2.0.872
|
||||
Release: 19%{?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.7.0.12
|
||||
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
|
||||
# Upstream uses /etc/iscsi for iscsi db info, but use /var/lib/iscsi.
|
||||
Patch3: iscsi-initiator-utils-use-var-for-config.patch
|
||||
# Add redhat.com string to default initiator name.
|
||||
Patch4: iscsi-initiator-utils-use-red-hat-for-name.patch
|
||||
# Add a lib for use by anaconda.
|
||||
Patch5: iscsi-initiator-utils-add-libiscsi.patch
|
||||
# Add bnx2i support.
|
||||
Patch6: iscsi-initiator-utils-uip-mgmt.patch
|
||||
# Don't compile iscsistart as static
|
||||
Patch7: iscsi-initiator-utils-dont-use-static.patch
|
||||
# Remove the OFFLOAD_BOOT_SUPPORTED #ifdef.
|
||||
Patch8: iscsi-initiator-utils-remove-the-offload-boot-supported-ifdef.patch
|
||||
# brcm uio: handle the different iface_rec structures in iscsid and brcm.
|
||||
Patch9: iscsi-initiator-utils-uio-handle-different-iface_rec.patch
|
||||
# Document missing brcm arguments
|
||||
Patch10: iscsi-initiator-utils-brcm-man.patch
|
||||
# setup default ifaces for all ifaces in kernel
|
||||
Patch11: iscsi-initiator-utils-fix-default-bindings.patch
|
||||
# fix iscsiadm return value/msg when login fails
|
||||
Patch12: iscsi-initiator-utils-fix-iscsiadm-return.patch
|
||||
# don't use openssl-devel
|
||||
Patch13: iscsi-initiator-utils-dont-use-openssl.patch
|
||||
# sync uio to 0.7.0.14
|
||||
Patch14: iscsi-initiator-utils-sync-uio-0.7.0.14.patch
|
||||
# fix nl msglen
|
||||
Patch15: iscsi-initiator-utils-fix-nlmsglen.patch
|
||||
# fixes for offload iface support
|
||||
Patch16: iscsi-initiator-utils-ofl-iface-fixes.patch
|
||||
# fix ipv6 ibft/firmware boot
|
||||
Patch17: iscsi-initiator-utils-fix-ipv6-boot.patch
|
||||
# add rhel version info to iscsi tools
|
||||
Patch18: iscsi-initiator-utils-add-rh-ver.patch
|
||||
Version: 6.%{open_iscsi_version}.%{open_iscsi_build}
|
||||
Release: 1%{?dist}
|
||||
Source0: http://www.open-iscsi.org/bits/open-iscsi-%{open_iscsi_version}-%{open_iscsi_build}.tar.gz
|
||||
Source1: iscsiuio-%{iscsiuio_version}.tar.gz
|
||||
Source2: iscsid.init
|
||||
Source3: iscsidevs.init
|
||||
Source4: 04-iscsi
|
||||
|
||||
# upstream patches, post last tagged version
|
||||
Patch1: 0001-iscsid-fix-iscsid-segfault-during-qla4xxx-login.patch
|
||||
Patch2: 0002-ISCSISTART-Bring-up-the-corresponding-network-interf.patch
|
||||
Patch3: 0003-iscsi-tools-fix-compile-error-when-OFFLOAD_BOOT_SUPP.patch
|
||||
Patch4: 0004-ISCSID-Passing-more-net-params-from-ibft-to-iface.patch
|
||||
Patch5: 0005-iscsi-tools-Convert-r-argument-to-an-integer-before-.patch
|
||||
Patch6: 0006-Update-README-for-removal-of-DBM-requirement.patch
|
||||
Patch7: 0007-iscsid-iscsiadm-fix-abstract-socket-length-in-bind-c.patch
|
||||
Patch8: 0008-iscsid-implement-systemd-compatible-socket-activatio.patch
|
||||
Patch9: 0009-iscsid-add-example-unit-files-for-systemd.patch
|
||||
Patch10: 0010-iscsi-tools-fix-get_random_bytes-error-handling.patch
|
||||
# distro specific modifications
|
||||
Patch51: 0051-update-initscripts-and-docs.patch
|
||||
Patch52: 0052-use-var-for-config.patch
|
||||
Patch53: 0053-use-red-hat-for-name.patch
|
||||
Patch54: 0054-add-libiscsi.patch
|
||||
Patch55: 0055-dont-use-static.patch
|
||||
Patch56: 0056-remove-the-offload-boot-supported-ifdef.patch
|
||||
Patch57: 0057-iscsid-iscsiuio-ipc-interface.patch
|
||||
# iscsiuio patches
|
||||
Patch71: 0071-iscsiuio-0.7.4.3.patch
|
||||
Patch72: 0072-iscsiuio-0.7.6.1.patch
|
||||
# version string, needs to be updated with each build
|
||||
Patch99: 0099-use-Red-Hat-version-string-to-match-RPM-package-vers.patch
|
||||
|
||||
|
||||
Group: System Environment/Daemons
|
||||
@ -74,26 +66,35 @@ The %{name}-devel package contains libraries and header files for
|
||||
developing applications that use %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n open-iscsi-2.0-872-rc4-bnx2i
|
||||
%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
|
||||
%patch4 -p1 -b .use-red-hat-for-name
|
||||
%patch5 -p1 -b .add-libiscsi
|
||||
%patch6 -p1 -b .uip-mgmt
|
||||
%patch7 -p1 -b .dont-use-static
|
||||
%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
|
||||
%patch12 -p1 -b .fix-iscsiadm-return
|
||||
%patch13 -p1 -b .dont-use-openssl
|
||||
%patch14 -p1 -b .sync-uio-0.7.0.14
|
||||
%patch15 -p1 -b .fix-nlmsglen
|
||||
%patch16 -p1 -b .ofl-iface-fixes
|
||||
%patch17 -p1 -b .fix-ipv6-boot
|
||||
%patch18 -p1 -b .add-rh-ver
|
||||
%setup -q -n open-iscsi-%{open_iscsi_version}-%{open_iscsi_build} -a 1
|
||||
mv iscsiuio-%{iscsiuio_version} iscsiuio
|
||||
# upstream patches
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
# distro specific modifications
|
||||
%patch51 -p1
|
||||
%patch52 -p1
|
||||
%patch53 -p1
|
||||
%patch54 -p1
|
||||
%patch55 -p1
|
||||
%patch56 -p1
|
||||
%patch57 -p1
|
||||
# iscsiuio patches
|
||||
cd iscsiuio
|
||||
%patch71 -p1
|
||||
%patch72 -p1
|
||||
cd ..
|
||||
# version string
|
||||
%patch99 -p1
|
||||
|
||||
|
||||
%build
|
||||
cd utils/open-isns
|
||||
@ -150,9 +151,9 @@ install -p -m 644 iscsiuio/docs/iscsiuio.8 $RPM_BUILD_ROOT/%{_mandir}/man8
|
||||
install -p -m 644 iscsiuio/iscsiuiolog $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
|
||||
install -p -m 755 iscsiuio/src/unix/iscsiuio $RPM_BUILD_ROOT/sbin
|
||||
|
||||
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/iscsid
|
||||
install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/iscsi
|
||||
install -p -m 755 %{SOURCE3} $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d
|
||||
install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/iscsid
|
||||
install -p -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_initrddir}/iscsi
|
||||
install -p -m 755 %{SOURCE4} $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d
|
||||
|
||||
install -p -m 755 libiscsi/libiscsi.so.0 $RPM_BUILD_ROOT%{_libdir}
|
||||
ln -s libiscsi.so.0 $RPM_BUILD_ROOT%{_libdir}/libiscsi.so
|
||||
|
Loading…
Reference in New Issue
Block a user