RenShu Xiao | 3 Feb 20:11 2016
Picon

iscsiadm didn't discovery the LUNs when LUN0 is removed

Hi

in the target server, I have 2 luns in one host and I removed LUN0 and using iscsiadm log in fine but the disks won't be discovered. Hence can't be mounted.

The following listed the network trace. Target responded check condition for LUN0 inquiry and expect report all from initiator.

Do we miss something here? or is this a known issue of open-iscsi?

Thanks,

Frank




--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
Christian Seiler | 31 Jan 19:52 2016
Picon

[PATCH] Some spelling fixes in man pages and messages

Hi,

I've noticed some spelling mistakes in man pages and messages.
Patch is attached.

Regards,
Christian

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
Christian Seiler | 28 Jan 00:17 2016
Picon

I/O errors with recent Linux versions

Hi,

While working on improvements w.r.t. open-iscsi userspace package in
Debian, I've stumbled upon a weird kernel bug in recent kernel
versions that makes the iSCSI initiator unusable.

The test setup is quite simple: LIO target running on the host with
fileio backend (I tried both Debian Jessie host with 3.16 kernel and
Ubuntu 15.04 host with 3.19 kernel, no difference), initiator
running inside a libvirt/KVM instance (Debian sid); nothing special
about the setup otherwise. (The target itself shows no problems.)

iSCSI login works perfectly fine, reading data from the iSCSI shows
no problems otherwise; writing small amounts of data to the iSCSI
device also works fine. But writing a bit more at once to the iSCSI
device will cause I/O errors in the kernel.

Sample messages:

[   21.473911] sd 2:0:0:0: [sda] tag#3 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[   21.473914] sd 2:0:0:0: [sda] tag#3 Sense Key : Not Ready [current] 
[   21.473916] sd 2:0:0:0: [sda] tag#3 Add. Sense: Logical unit communication failure
[   21.473917] sd 2:0:0:0: [sda] tag#3 CDB: Write(10) 2a 00 00 38 15 d8 00 20 28 00
[   21.473918] blk_update_request: I/O error, dev sda, sector 3675608
[   21.473939] EXT4-fs warning (device sda1): ext4_end_bio:329: I/O error -5 writing to inode 46 (offset
50331648 size 4214784 starting block 459707)
[   21.473941] Buffer I/O error on device sda1, logical block 457403

This is obviously a kernel problem, as using Debian Jessie's 3.16
kernel with the same userland will work perfectly fine and not
produce any I/O errors, but with more recent kernels this is
trivially reproducible for me.

I had reported this in the Debian bugtracker against the kernel a
while ago, and somebody mentioned that this problem should have been
fixed in 4.4, but once I got around to testing 4.4, I can still
reproduce that problem. Just now I tried to use the current upstream
Linux git branch (basically 4.5-rc1 + the things that Linus already
pulled since then as of writing this email) and the problem still
persists.

The Debian bugreport can be found under:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=805252
Further details, including more log messages, can be found there.

I'm not an expert on the block device driver subsystem in the kernel,
so I don't really know where to start debugging this, so any help
would be appreciated.

Thank you.

Regards,
Christian

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

bharatvivek2972 | 29 Jan 13:50 2016
Picon

Way to find, re-login for a lun from port that is down/not reachable is failed/successful

Dear All,

I came across following behavior of iscsiadm:

1. Login to a LUN from a port:
# time iscsiadm -m node -T iqn.2001-03:storage01:ist-m000-sn-0000000992000330.lx-0109.target0000 -p 172.168.0.220 --login
Logging in to [iface: default, target: iqn.2001-03:storage01:ist-m000-sn-0000000992000330.lx-0109.target0000, portal: 172.168.0.220,3260] (multiple)
Login to [iface: default, target: iqn.2001-03:storage01:ist-m000-sn-0000000992000330.lx-0109.target0000, portal: 172.168.0.220,3260] successful.

2. Now make the port 172.168.0.220 down
# ifdown elan3
# ping 172.168.0.220 -c 1 -w 3
PING 172.168.0.220 (172.168.0.220) 56(84) bytes of data.

--- 172.168.0.220 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 3000ms

3. Now, again login to the LUN:
# time iscsiadm -m node -T iqn.2001-03:storage01:ist-m000-sn-0000000992000330.lx-0109.target0000 -p 172.168.0.220 --login
# echo $?
0

Is there a way to know, that the re-login on the down port is actually successful/failed using iscsiadm login command itself?

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
shiva krishna merla | 28 Jan 21:19 2016
Picon

ISID uniqueness

Hi All,

We are seeing an issue with Redhat 6.7 where ISID's are repeated for different sessions to same target (volume level target). Our array target has to close the existing sessions with same ISID before accepting new connections. This causes repeated login retry attempts by iscsid and overall system discovery process is too slow. From the code i see that ISID is determined as below. With this many sessions above 256 can have repeated ISID. Is this a design flaw?. Can this be avoided?.

/* OUI and uniqifying number */ session->isid[0] = DRIVER_ISID_0; session->isid[1] = DRIVER_ISID_1; session->isid[2] = DRIVER_ISID_2; session->isid[3] = 0; session->isid[4] = 0; session->isid[5] = 0; /* * TODO: use the iface number or some other value * so this will be persistent */ session->isid[3] = session->id; Only least significant byte of session SID is used here. Hence for mulitple sessions the ISID can be same. SID: session->id ISID 480: e0 --> 0x00023de00000 224: e0 --> 0x00023de00000 544: 10 --> 0x00023d100000 528: 10 --> 0x00023d100000 545: 21 --> 0x00023d210000 289: 21 --> 0x00023d210000



iscsid: sending login PDU with current stage 1, next stage 3, transit 0x80, isid 0x00023de00000 exp_statsn 7 <------ iscsid: > InitiatorName=iqn.1994-05.com.redhat:8973f121285 iscsid: > InitiatorAlias=localhost iscsid: > TargetName=iqn.2007-11.com.nimblestorage:arr6-iscsi-vol-60062-v2adb271243103de8.00000175.69cb1afa iscsid: > SessionType=Normal iscsid: > HeaderDigest=None iscsid: > DataDigest=None iscsid: > DefaultTime2Wait=2 iscsid: > DefaultTime2Retain=0 iscsid: > IFMarker=No iscsid: > OFMarker=No iscsid: > ErrorRecoveryLevel=0 iscsid: > InitialR2T=No iscsid: > ImmediateData=Yes iscsid: > MaxBurstLength=16776192 iscsid: > FirstBurstLength=262144 iscsid: > MaxOutstandingR2T=1 iscsid: > MaxConnections=1 iscsid: > DataPDUInOrder=Yes iscsid: > DataSequenceInOrder=Yes iscsid: > MaxRecvDataSegmentLength=262144 iscsid: in ksend_pdu_begin iscsid: send PDU began for hdr 48 bytes and data 504 bytes iscsid: in kwritev iscsid: wrote 48 bytes of PDU header iscsid: in kwritev iscsid: wrote 504 bytes of PDU data iscsid: in ksend_pdu_end iscsid: in __kipc_call iscsid: in kwritev iscsid: in nlpayload_read iscsid: in nlpayload_read iscsid: send PDU finished for conn 224:0 <----- iscsid: sending login PDU with current stage 1, next stage 3, transit 0x80, isid 0x00023de00000 exp_statsn 2 <----- iscsid: > InitiatorName=iqn.1994-05.com.redhat:8973f121285 iscsid: > InitiatorAlias=localhost iscsid: > TargetName=iqn.2007-11.com.nimblestorage:arr6-iscsi-vol-60062-v2adb271243103de8.00000175.69cb1afa iscsid: > SessionType=Normal iscsid: > HeaderDigest=None iscsid: > DataDigest=None iscsid: > DefaultTime2Wait=2 iscsid: > DefaultTime2Retain=0 iscsid: > IFMarker=No iscsid: > OFMarker=No iscsid: > ErrorRecoveryLevel=0 iscsid: > InitialR2T=No iscsid: > ImmediateData=Yes iscsid: > MaxBurstLength=16776192 iscsid: > FirstBurstLength=262144 iscsid: > MaxOutstandingR2T=1 iscsid: > MaxConnections=1 iscsid: > DataPDUInOrder=Yes iscsid: > DataSequenceInOrder=Yes iscsid: > MaxRecvDataSegmentLength=262144 iscsid: in ksend_pdu_begin iscsid: send PDU began for hdr 48 bytes and data 504 bytes iscsid: in kwritev iscsid: wrote 48 bytes of PDU header iscsid: in kwritev iscsid: wrote 504 bytes of PDU data iscsid: in ksend_pdu_end iscsid: in __kipc_call iscsid: in kwritev iscsid: in nlpayload_read iscsid: in nlpayload_read iscsid: send PDU finished for conn 480:0 <-----

Errors due to this.

data avail. Consumed 0 Jan 26 15:18:36 hiqa-sys-rhel2 kernel: connection480:0: iscsi_sw_tcp_recv read 0 bytes status 1 Jan 26 15:18:39 hiqa-sys-rhel2 kernel: connection480:0: iscsi_sw_sk_state_check TCP_CLOSE|TCP_CLOSE_WAIT Jan 26 16:04:49 hiqa-sys-rhel2 kernel: connection480:0: detected conn error (1020) ISCSI_ERR_TCP_CONN_CLOSE Data IP intermittent failures. [root <at> hiqa-sys-rhel2 ~]# cat /sys/class/iscsi_connection/connection480\:0/address cat: /sys/class/iscsi_connection/connection480:0/address: Transport endpoint is not connected [root <at> hiqa-sys-rhel2 ~]# cat /sys/class/iscsi_connection/connection480\:0/address 172.18.80.95 [root <at> hiqa-sys-rhel2 ~]# cat /sys/class/iscsi_connection/connection480\:0/address 172.18.80.95 [root <at> hiqa-sys-rhel2 ~]# cat /sys/class/iscsi_connection/connection480\:0/address 172.18.80.95 [root <at> hiqa-sys-rhel2 ~]# cat /sys/class/iscsi_connection/connection480\:0/address cat: /sys/class/iscsi_connection/connection480:0/address: Transport endpoint is not connected


size=4.0G uuid=2414083771cb6a2846c9ce900fa1acb69 mount-device: /dev/nimblestorage/arr6-iscsi-vol-60062-2414083771cb6a2846c9ce900fa1acb69 target: iqn.2007-11.com.nimblestorage:arr6-iscsi-vol-60062-v2adb271243103de8.00000175.69cb1afa ` + array_id=1 device=/dev/dm-113 |- 488:0:0:0 sddy 128:0 session=480 sess_st=LOGGED_IN dev_st=running iface=default tgtportal=172.18.80.96 |- 552:0:0:0 sdbj 67:208 session=544 sess_st=LOGGED_IN dev_st=running iface=default tgtportal=172.18.80.96 |- 600:0:0:0 sdhf 133:80 session=592 sess_st=LOGGED_IN dev_st=running iface=default tgtportal=172.18.160.88 |- 232:0:0:0 sdha 133:0 session=224 sess_st=FAILED dev_st=running iface=default tgtportal=172.18.160.88 Volume Info. [root <at> hiqa-sys-rhel2 ~]# sg_inq -p 0xd4 /dev/sdha Only hex output supported. sg_vpd decodes more pages. VPD INQUIRY, page code=0xd4: 00 00 d4 01 02 01 00 61 72 72 36 2d 69 73 63 73 69 ......arr6-iscsi 10 2d 76 6f 6c 2d 36 30 30 36 32 00 00 00 00 00 00 -vol-60062...... [root <at> hiqa-sys-rhel2 ~]# sg_inq -p 0xd4 /dev/sddy Only hex output supported. sg_vpd decodes more pages. VPD INQUIRY, page code=0xd4: 00 00 d4 01 02 01 00 61 72 72 36 2d 69 73 63 73 69 ......arr6-iscsi 10 2d 76 6f 6c 2d 36 30 30 36 32 00 00 00 00 00 00 -vol-60062......


Regards
Shiva Merla

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
Rodrigo Pulido | 20 Jan 01:30 2016
Picon

will open-iscsi.org be online again?

Hi,

I'm considering use open-iscsi on my project but I want know if is still maintained. I've noticed that the http://www.open-iscsi.org site is expired. Will be online soon, or there is another "official" site?

Thanks.

--
Atte:

Rodrigo Pulido

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
Shiv Pratap | 18 Jan 06:59 2016
Picon

iscsiadm is not able to login in any port except 3260

Hi,

I have problem like "iscsiadm is not able to login in any port except 3260" in RHEL7. In Open-Suse code is working fine.


Discovery is successful:

[root <at> ncdqd0110 iqn.11351.com.xxx:AAA]# iscsiadm -m discoverydb -t sendtargets -p 127.0.0.1:54541 --discover

127.0.0.1:54541,-1 iqn.2495.com.xxx:AAA

But Login is failing:

[root <at> ncdqd0110 ~]# iscsiadm --mode node --target iqn.2495.com.xxx:AAA --portal 127.0.0.1:54541 --login

Logging in to [iface: default, target: iqn.2495.com.xxx:AAA, portal: 127.0.0.1,54541] (multiple)

iscsiadm: Could not login to [iface: default, target: iqn.2495.com.xxx:AAA, portal: 127.0.0.1,54541].

iscsiadm: initiator reported error (8 - connection timed out)

iscsiadm: Could not log into all portals


please assist me if you have any clue about what could be the possible solution.

Thank you,

Shiv Pratap

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
Lee Duncan | 15 Jan 23:56 2016
Gravatar

[PATCH 0/3] Fix Valgrind Issues in iscsiuio

Hannes recently fixed some valgrind issues in iscsiuio,
but they seem to have fallen between the cracks, so here
they are.

Hannes Reinecke (3):
  iscsiuio: Do not memcpy identical locations
  iscsiuio: Clear memory after allocation
  iscsiuio: fixup race condition

 iscsiuio/src/uip/uip.c         | 12 ++++++++----
 iscsiuio/src/unix/libs/bnx2x.c |  1 +
 iscsiuio/src/unix/nic.c        | 20 +++++++++-----------
 iscsiuio/src/unix/packet.c     |  4 +++-
 4 files changed, 21 insertions(+), 16 deletions(-)

-- 
2.1.4

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

The Lee-Man | 15 Jan 20:49 2016
Picon
Gravatar

Do you prefer pull requests or patches submitted?

Hi Mike:

I see you have taken some pull requests using the github issue/pull-request mechanism. Do you prefer this over the mailing list? I know I kind of prefer it, myself, from both directions, since it makes the workflow a touch easier and faster. What's your preference?
-- 
Lee Duncan

--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
adheer.chandravanshi | 28 Dec 09:56 2015

[PATCH] iscsiuio: Get the library to use based on uio sysfs name

From: Adheer Chandravanshi <adheer.chandravanshi@...>

This makes iscsiuio more compatible with newer adapters by eliminating
the need to always update iscsiuio with the PCI IDs of the new adapter.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@...>
---
 iscsiuio/src/unix/nic.c       |   22 +++++++++++---
 iscsiuio/src/unix/nic.h       |    6 ++-
 iscsiuio/src/unix/nic_id.c    |    2 +
 iscsiuio/src/unix/nic_utils.c |   65 +++++++++++++++++++++++++++--------------
 4 files changed, 66 insertions(+), 29 deletions(-)

diff --git a/iscsiuio/src/unix/nic.c b/iscsiuio/src/unix/nic.c
index 38a5776..fb3b7c3 100644
--- a/iscsiuio/src/unix/nic.c
+++ b/iscsiuio/src/unix/nic.c
 <at>  <at>  -152,7 +152,6  <at>  <at>  static int load_nic_library(nic_lib_handle_t *handle)
 	/*  Validate the NIC library ops table to ensure that all the proper
 	 *  fields are filled */
 	if ((handle->ops->lib_ops.get_library_name == NULL) ||
-	    (handle->ops->lib_ops.get_pci_table == NULL) ||
 	    (handle->ops->lib_ops.get_library_version == NULL) ||
 	    (handle->ops->lib_ops.get_build_date == NULL) ||
 	    (handle->ops->lib_ops.get_transport_name == NULL)) {
 <at>  <at>  -247,7 +246,8  <at>  <at>  int unload_all_nic_libraries()
 	return 0;
 }

-NIC_LIBRARY_EXIST_T does_nic_uio_name_exist(char *name)
+NIC_LIBRARY_EXIST_T does_nic_uio_name_exist(char *name,
+					    nic_lib_handle_t **handle)
 {
 	NIC_LIBRARY_EXIST_T rc;
 	nic_lib_handle_t *current;
 <at>  <at>  -263,6 +263,9  <at>  <at>  NIC_LIBRARY_EXIST_T does_nic_uio_name_exist(char *name)
 						       &uio_name_size);

 		if (strncmp(name, uio_name, uio_name_size) == 0) {
+			if (handle)
+				*handle = current;
+
 			rc = NIC_LIBRARY_EXSITS;
 			goto done;
 		}
 <at>  <at>  -277,7 +280,8  <at>  <at>  done:
 	return rc;
 }

-NIC_LIBRARY_EXIST_T does_nic_library_exist(char *name)
+NIC_LIBRARY_EXIST_T does_nic_library_exist(char *name,
+					   nic_lib_handle_t **handle)
 {
 	NIC_LIBRARY_EXIST_T rc;
 	nic_lib_handle_t *current;
 <at>  <at>  -293,6 +297,9  <at>  <at>  NIC_LIBRARY_EXIST_T does_nic_library_exist(char *name)
 							   &library_name_size);

 		if (strncmp(name, library_name, library_name_size) == 0) {
+			if (handle)
+				*handle = current;
+
 			rc = NIC_LIBRARY_EXSITS;
 			goto done;
 		}
 <at>  <at>  -333,8 +340,13  <at>  <at>  int find_nic_lib_using_pci_id(uint32_t vendor, uint32_t device,
 		uint32_t entries;
 		int i;

-		current->ops->lib_ops.get_pci_table(&pci_table, &entries);
-
+		if (current->ops->lib_ops.get_pci_table != NULL) {
+			current->ops->lib_ops.get_pci_table(&pci_table,
+							    &entries);
+		} else {
+			current = current->next;
+			continue;
+		}
 		/*  Sanity check the the pci table coming from the
 		 *  hardware library */
 		if (entries > MAX_PCI_DEVICE_ENTRIES) {
diff --git a/iscsiuio/src/unix/nic.h b/iscsiuio/src/unix/nic.h
index 8484032..e99fd8e 100644
--- a/iscsiuio/src/unix/nic.h
+++ b/iscsiuio/src/unix/nic.h
 <at>  <at>  -351,8 +351,10  <at>  <at>  typedef enum {
 	NIC_LIBRARY_DOESNT_EXIST = 2,
 } NIC_LIBRARY_EXIST_T;

-NIC_LIBRARY_EXIST_T does_nic_uio_name_exist(char *name);
-NIC_LIBRARY_EXIST_T does_nic_library_exist(char *name);
+NIC_LIBRARY_EXIST_T does_nic_uio_name_exist(char *name,
+					    nic_lib_handle_t **handle);
+NIC_LIBRARY_EXIST_T does_nic_library_exist(char *name,
+					   nic_lib_handle_t **handle);

 /*******************************************************************************
  *  Packet management utility functions
diff --git a/iscsiuio/src/unix/nic_id.c b/iscsiuio/src/unix/nic_id.c
index 6b2467c..6da0a38 100644
--- a/iscsiuio/src/unix/nic_id.c
+++ b/iscsiuio/src/unix/nic_id.c
 <at>  <at>  -308,6 +308,7  <at>  <at>  int find_set_nic_lib(nic_t *nic)

 	nic_lib_handle_t *handle;
 	struct pci_device_id *pci_entry;
+	size_t name_size;

 	rc = get_vendor(nic, &vendor);
 	if (rc != 0) {
 <at>  <at>  -357,6 +358,7  <at>  <at>  int find_set_nic_lib(nic_t *nic)

 	/*  Prepare the NIC library op table */
 	nic->ops = handle->ops;
+	(*nic->ops->lib_ops.get_library_name) (&nic->library_name, &name_size);

 	return 0;
 }
diff --git a/iscsiuio/src/unix/nic_utils.c b/iscsiuio/src/unix/nic_utils.c
index d57cc4f..0daffd2 100644
--- a/iscsiuio/src/unix/nic_utils.c
+++ b/iscsiuio/src/unix/nic_utils.c
 <at>  <at>  -700,6 +700,9  <at>  <at>  int nic_verify_uio_sysfs_name(nic_t *nic)
 	uint32_t raw_size = 0;
 	char temp_path[sizeof(nic_uio_sysfs_name_tempate) + 8];
 	int rc = 0;
+	nic_lib_handle_t *handle = NULL;
+	size_t name_size;
+

 	/*  Build the path to determine uio name */
 	snprintf(temp_path, sizeof(temp_path),
 <at>  <at>  -716,37 +719,43  <at>  <at>  int nic_verify_uio_sysfs_name(nic_t *nic)
 	*raw_tmp = '\0';

 	/*  If the nic library is not set then check if there is a library
-	 *  which matches the library name */
+	 *  which matches the uio sysfs name */
 	if (nic->nic_library == NULL) {
 		NIC_LIBRARY_EXIST_T exist;

-		exist = does_nic_uio_name_exist(raw);
+		exist = does_nic_uio_name_exist(raw, &handle);
 		if (exist == NIC_LIBRARY_DOESNT_EXIST) {
-			LOG_ERR(PFX "%s: could not find library: %s ",
+			LOG_ERR(PFX "%s: could not find library for uio name: %s",
 				nic->log_name, raw);
-			rc = -EIO;
+			rc = -EINVAL;
+			goto error;
 		}
-	} else {
-		char *library_name;
-		size_t library_name_size;

-		/*  Get the string name from the NIC library */
-		(*nic->ops->lib_ops.get_library_name) (&library_name,
-						       &library_name_size);
+		/* fill the lib info */
+		nic->nic_library = handle;
+		nic->ops = handle->ops;
+		(*nic->ops->lib_ops.get_library_name) (&nic->library_name,
+						       &name_size);
+	} else {
+		/*  Get the uio sysfs name from the NIC library */
+		(*nic->ops->lib_ops.get_uio_name) (&raw_tmp, &name_size);

-		if (strcmp(raw, library_name) != 0) {
+		if (strncmp(raw, raw_tmp, name_size) != 0) {
 			LOG_ERR(PFX "%s: uio names not equal: "
 				"expecting %s got %s from %s",
-				nic->log_name, library_name, raw, temp_path);
-			rc = -EIO;
+				nic->log_name, raw, raw_tmp, temp_path);
+			rc = -EINVAL;
+			goto error;
 		}
 	}

-	free(raw);
-
-	LOG_INFO(PFX "%s: Verified is a cnic_uio device", nic->log_name);
+	LOG_INFO(PFX "%s: Verified uio name %s with library %s",
+		 nic->log_name, raw, nic->library_name);

 error:
+	if (raw)
+		free(raw);
+
 	return rc;
 }

 <at>  <at>  -844,28 +853,40  <at>  <at>  void prepare_library(nic_t *nic)
 {
 	int rc;
 	NIC_LIBRARY_EXIST_T exist;
+	nic_lib_handle_t *handle = NULL;

 	nic_fill_name(nic);

 	/* No assoicated library, we can skip it */
 	if (nic->library_name != NULL) {
 		/*  Check that we have the proper NIC library loaded */
-		exist = does_nic_library_exist(nic->library_name);
+		exist = does_nic_library_exist(nic->library_name, &handle);
 		if (exist == NIC_LIBRARY_DOESNT_EXIST) {
 			LOG_ERR(PFX "NIC library doesn't exists: %s",
 				nic->library_name);
 			goto error;
+		} else if (handle && (nic->nic_library == handle) &&
+			  (nic->ops == handle->ops)) {
+			LOG_INFO("%s: Have NIC library '%s'",
+				 nic->log_name, nic->library_name);
 		}
 	}

-	/*  Determine the NIC library to use based on the PCI Id */
-	rc = find_set_nic_lib(nic);
+	/*  Verify the NIC library to use */
+	rc = nic_verify_uio_sysfs_name(nic);
 	if (rc != 0) {
-		LOG_ERR(PFX "%s: Couldn't find NIC library", nic->log_name);
-		goto error;
+		/*  Determine the NIC library to use based on the PCI Id */
+		rc = find_set_nic_lib(nic);
+		if (rc != 0) {
+			LOG_ERR(PFX "%s: Couldn't find NIC library",
+				nic->log_name);
+			goto error;
+		}
+
 	}

-	LOG_INFO("%s: found NIC '%s'", nic->log_name, nic->pci_id->device_name);
+	LOG_INFO("%s: found NIC with library '%s'",
+		 nic->log_name, nic->library_name);
 error:
 	return;
 }
-- 
1.7.1

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Johannes Thumshirn | 25 Nov 11:04 2015
Picon

iSCSI and scsi-mq

Hi iSCSI experts,

I've been starting to research possible implementations of a scsi-mq capable
iSCSI. With my research I found the following thread https://groups.google.com/
forum/#!msg/open-iscsi/qLaXJh2Gqt4/A2NIDZ0fT9oJ and wondered what happened to
the efforts layed out there (and what have been the results of the discussion
at LSF/MM).

The one TCP connection per CPU or HW queue approach sounds particularly
interesting to me when taking a SW iSCSI initiator. A problem Hannes pointed
out here could be network topology changes which result in a different route on
a different NIC with a different number of HW queues, so it might not be the
ultimate solution.

With the offload cards we might need to do something else.

Is there anyone else working on a scsi-mq for iSCSI at the moment and is
willing to join efforts here?

Byte,
	Johannes

--

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe@...
To post to this group, send email to open-iscsi@...
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


Gmane