david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[iscsi] Always send FirstBurstLength parameter

As of kernel 4.11, the LIO target will propose a value for
FirstBurstLength if the initiator did not do so.  This is entirely
redundant in our case, since FirstBurstLength is defined by RFC 3720
to be

  "Irrelevant when: ( InitialR2T=Yes and ImmediateData=No )"

and we already enforce both InitialR2T=Yes and ImmediateData=No in our
initial proposal.  However, LIO (arguably correctly) complains when we
do not respond to its redundant proposal of an already-irrelevant
value.

Fix by always proposing the default value for FirstBurstLength.

Debugged-by: Patrick Seeburger <info@8bit.de>
Tested-by: Patrick Seeburger <info@8bit.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2017-05-03 13:01:11 +01:00
parent 17887f87b7
commit 785389c2ba
1 changed files with 10 additions and 4 deletions

View File

@ -644,12 +644,12 @@ static int iscsi_rx_nop_in ( struct iscsi_session *iscsi,
* *
* HeaderDigest=None * HeaderDigest=None
* DataDigest=None * DataDigest=None
* MaxConnections is irrelevant; we make only one connection anyway [4] * MaxConnections=1 (irrelevant; we make only one connection anyway) [4]
* InitialR2T=Yes [1] * InitialR2T=Yes [1]
* ImmediateData is irrelevant; we never send immediate data [4] * ImmediateData=No (irrelevant; we never send immediate data) [4]
* MaxRecvDataSegmentLength=8192 (default; we don't care) [3] * MaxRecvDataSegmentLength=8192 (default; we don't care) [3]
* MaxBurstLength=262144 (default; we don't care) [3] * MaxBurstLength=262144 (default; we don't care) [3]
* FirstBurstLength=262144 (default; we don't care) * FirstBurstLength=65536 (irrelevant due to other settings) [5]
* DefaultTime2Wait=0 [2] * DefaultTime2Wait=0 [2]
* DefaultTime2Retain=0 [2] * DefaultTime2Retain=0 [2]
* MaxOutstandingR2T=1 * MaxOutstandingR2T=1
@ -674,6 +674,11 @@ static int iscsi_rx_nop_in ( struct iscsi_session *iscsi,
* these parameters, but some targets (notably a QNAP TS-639Pro) fail * these parameters, but some targets (notably a QNAP TS-639Pro) fail
* unless they are supplied, so we explicitly specify the default * unless they are supplied, so we explicitly specify the default
* values. * values.
*
* [5] FirstBurstLength is defined to be irrelevant since we already
* force InitialR2T=Yes and ImmediateData=No, but some targets
* (notably LIO as of kernel 4.11) fail unless it is specified, so we
* explicitly specify the default value.
*/ */
static int iscsi_build_login_request_strings ( struct iscsi_session *iscsi, static int iscsi_build_login_request_strings ( struct iscsi_session *iscsi,
void *data, size_t len ) { void *data, size_t len ) {
@ -732,13 +737,14 @@ static int iscsi_build_login_request_strings ( struct iscsi_session *iscsi,
"ImmediateData=No%c" "ImmediateData=No%c"
"MaxRecvDataSegmentLength=8192%c" "MaxRecvDataSegmentLength=8192%c"
"MaxBurstLength=262144%c" "MaxBurstLength=262144%c"
"FirstBurstLength=65536%c"
"DefaultTime2Wait=0%c" "DefaultTime2Wait=0%c"
"DefaultTime2Retain=0%c" "DefaultTime2Retain=0%c"
"MaxOutstandingR2T=1%c" "MaxOutstandingR2T=1%c"
"DataPDUInOrder=Yes%c" "DataPDUInOrder=Yes%c"
"DataSequenceInOrder=Yes%c" "DataSequenceInOrder=Yes%c"
"ErrorRecoveryLevel=0%c", "ErrorRecoveryLevel=0%c",
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
} }
return used; return used;