public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Jayamohan Kallickal <Jayamohan.Kallickal@Emulex.Com>
Cc: Jayamohan Kallickal <jayamohank@gmail.com>,
	"jbottomley@parallels.com" <jbottomley@parallels.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	Sony John-N <Sony.John-N@Emulex.Com>
Subject: Re: [PATCH 04/22] be2iscsi: Fix negotiated parameters upload to FW
Date: Tue, 17 Sep 2013 16:23:12 -0500	[thread overview]
Message-ID: <5238C840.9090001@cs.wisc.edu> (raw)
In-Reply-To: <00c19394-64ee-4326-8e7f-e58318974d70@CMEXHTCAS1.ad.emulex.com>

On 09/16/2013 11:28 PM, Jayamohan Kallickal wrote:
> 
> 
> -----Original Message-----
> From: Mike Christie [mailto:michaelc@cs.wisc.edu] 
> Sent: Monday, September 16, 2013 7:59 PM
> To: Jayamohan Kallickal
> Cc: jbottomley@parallels.com; linux-scsi@vger.kernel.org; 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@emulex.com>
>> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
>> ---
>>  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
> 

I am still not sure how you are getting 0 passed from userspace.

Do you mean the target sent the MaxRecvDataSegmentLength key but no
value or that it did not even send the MaxRecvDataSegmentLength key.

The thing is that iscsi_copy_operational_params will set
conn->max_xmit_dlength to ISCSI_DEF_MAX_RECV_SEG_LEN (8K). We then do
the login negotiation dance. If the target does not send the
MaxRecvDataSegmentLength key then it will stay 8K and that is what
should be getting passed down to the drivers. If that is not working
correctly then we need to fix for all drivers.

If the target is sending 0 for the value then again we need to fix this
for all drivers since none of them can handle this.


  parent reply	other threads:[~2013-09-17 21:23 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13  5:09 [PATCH 01/22] be2iscsi: Fix Template HDR IOCTL Jayamohan Kallickal
2013-09-13  5:09 ` [PATCH 02/22] be2iscsi: Fix the MCCQ count leakage Jayamohan Kallickal
2013-09-13  5:09 ` [PATCH 03/22] be2iscsi: Fix repeated issue of MAC ADDR get IOCTL Jayamohan Kallickal
2013-09-13  5:09 ` [PATCH 04/22] be2iscsi: Fix negotiated parameters upload to FW Jayamohan Kallickal
2013-09-17  2:58   ` Mike Christie
2013-09-17  4:28     ` Jayamohan Kallickal
2013-09-17 21:15       ` Mike Christie
2013-09-18  5:37         ` Jayamohan Kallickal
2013-09-18  7:34           ` Mike Christie
2013-09-17 21:23       ` Mike Christie [this message]
2013-09-13  5:09 ` [PATCH 05/22] be2iscsi: Fix locking mechanism in Unsol Path Jayamohan Kallickal
2013-09-13  5:09 ` [PATCH 06/22] be2iscsi: Fix soft lock up issue during UE or if FW taking time to respond Jayamohan Kallickal
2013-09-17  3:18   ` Mike Christie
2013-09-13  5:09 ` [PATCH 07/22] be2iscsi: Config parameters update for Dual Chute Support Jayamohan Kallickal
2013-09-13  5:09 ` [PATCH 08/22] be2iscsi: Fix changes in ASYNC Path for SKH-R adapter Jayamohan Kallickal
2013-09-13  5:09 ` [PATCH 09/22] be2iscsi: Fix Template HDR support for Dual Chute mode Jayamohan Kallickal
2013-09-13  5:10 ` [PATCH 10/22] be2iscsi: Fix SGL Initilization and posting Pages for Dual Chute Jayamohan Kallickal
2013-09-13  5:10 ` [PATCH 11/22] be2iscsi: Fix WRB_Q posting to support Dual Chute mode Jayamohan Kallickal
2013-09-13  5:10 ` [PATCH 12/22] be2iscsi: Fix CID allocation/freeing to support Dual Chute Mode Jayamohan Kallickal
2013-09-13  5:10 ` [PATCH 13/22] be2iscsi: Fix connection offload to support Dual Chute Jayamohan Kallickal
2013-09-13  5:10 ` [PATCH 14/22] be2iscsi: Fix chute cleanup during drivers unload Jayamohan Kallickal
2013-09-13  5:10 ` [PATCH 15/22] be2iscsi: Dispaly CID available for connection offload Jayamohan Kallickal
2013-09-13  5:10 ` [PATCH 16/22] be2iscsi: Display Port Identifier for each iSCSI function Jayamohan Kallickal
2013-09-13  5:10 ` [PATCH 17/22] be2iscsi: Fix MSIx creation for SKH-R adapter Jayamohan Kallickal
2013-09-13  5:10 ` [PATCH 18/22] be2iscsi: Fix log level for protocol specific logs Jayamohan Kallickal
2013-09-13  5:10 ` [PATCH 19/22] be2iscsi: Fix Insufficient Buffer Error returned in MBX Completion Jayamohan Kallickal
2013-09-13  5:10 ` [PATCH 20/22] be2iscsi: Invalidate WRB in Abort/Reset Path Jayamohan Kallickal
2013-09-13  5:10 ` [PATCH 21/22] be2iscsi: Fix AER handling in driver Jayamohan Kallickal
2013-09-13  5:10 ` [PATCH 22/22] be2iscsi: Bump driver version Jayamohan Kallickal
2013-09-13  5:10 ` [PATCH 00/22] be2iscsi: Update to 10.0.635.0 Jayamohan Kallickal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5238C840.9090001@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=Jayamohan.Kallickal@Emulex.Com \
    --cc=Sony.John-N@Emulex.Com \
    --cc=jayamohank@gmail.com \
    --cc=jbottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox