RE: [PATCH 04/22] be2iscsi: Fix negotiated parameters upload to FW

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




-----Original Message-----
From: Mike Christie [mailto:michaelc@xxxxxxxxxxx] 
Sent: Monday, September 16, 2013 7:59 PM
To: Jayamohan Kallickal
Cc: jbottomley@xxxxxxxxxxxxx; linux-scsi@xxxxxxxxxxxxxxx; Jayamohan Kallickal; Sony John-N
Subject: Re: [PATCH 04/22] be2iscsi: Fix negotiated parameters upload to FW

On 09/13/2013 12:09 AM, Jayamohan Kallickal wrote:
>  - If target does not send MaxRecvDSL in login repsonse, then
>    initiator should consider the MaxRecvDSL for target is 8K.
>    In this scenario driver was setting the value to 64K and this
>    caused target to close cxn as data xfer was more than the
>    MaxRecvDSL
>  - Update connection offload data structure for SKH-R adapters.
> 
> Signed-off-by: John Soni Jose <sony.john-n@xxxxxxxxxx>
> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@xxxxxxxxxx>
> ---
>  drivers/scsi/be2iscsi/be_iscsi.c |    9 +++++++--
>  drivers/scsi/be2iscsi/be_main.h  |   29 ++++++++++++++++-------------
>  drivers/scsi/be2iscsi/be_mgmt.c  |    8 +++-----
>  3 files changed, 26 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/scsi/be2iscsi/be_iscsi.c 
> b/drivers/scsi/be2iscsi/be_iscsi.c
> index 2496ea7..60c1dff 100644
> --- a/drivers/scsi/be2iscsi/be_iscsi.c
> +++ b/drivers/scsi/be2iscsi/be_iscsi.c
> @@ -672,9 +672,10 @@ int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
>  			session->max_burst = 262144;
>  		break;
>  	case ISCSI_PARAM_MAX_XMIT_DLENGTH:
> -		if ((conn->max_xmit_dlength > 65536) ||
> -		    (conn->max_xmit_dlength == 0))
> +		if (conn->max_xmit_dlength > 65536)
>  			conn->max_xmit_dlength = 65536;
> +		else if (conn->max_xmit_dlength == 0)
> +			conn->max_xmit_dlength = 8192;

>Was the target sending 0 or not sending anything at all? Userspace should not be sending 0 if the target did not send >MaxRecvDSL. It looks like it should be sending 8k for that case. It looks like there is a bug in the tools where it will pass 0 >if the target sent 0.

>It seems other drivers would be hitting this bug too and we should fix everyone.

This was an IET target that  did not send any value and we were defaulting to 64K

Here is a small  userspace fix  that should  go along 

diff --git a/usr/be2iscsi.c b/usr/be2iscsi.c
index ce8b719..ba4c29f 100644
--- a/usr/be2iscsi.c
+++ b/usr/be2iscsi.c
@@ -33,10 +33,6 @@ void be2iscsi_create_conn(struct iscsi_conn *conn)
 	if (conn->max_xmit_dlength > 65536)
 		conn->max_xmit_dlength = 65536;
 
-	if (!conn_rec->iscsi.MaxXmitDataSegmentLength ||
-	    conn_rec->iscsi.MaxXmitDataSegmentLength > 65536)
-		conn_rec->iscsi.MaxXmitDataSegmentLength = 65536;
-
 	session->erl = 0;
 	session->initial_r2t_en = 1;
 }
--



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux