Reject on Data-Out exceeding ExpectedDataTransferLength

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

 



Hi,
I need clarification on the behavior of LIO regarding SCSI Response
on error when single or multiple dataout PDU's exceeds EDTL limit.

I understand this is an error. However, I am expecting the target
to return check condition (RFC section 10.4.7.2 -Sense Data) instead
what I am seeing is that LIO is returning reject.

Below is the sequence of write and r2t...

The values negotiated are MaxBurstLength=2096, FirstBurstLength=512, ,ImmediateData=No,InitiaR2t=NO and ERL>0.

I->T:Write (EDTL=1024)
T->I:Got R2T With DesiredLength=1024
I->T:Data Out with DSL=512 and F=0
T->I:Got R2T With DesiredLength=512
I->T:Data Out with DSL=512 and F=0 (Please note: Still F=0)
T->I:Reject(Malformed Packet) X 10

At this point I am expecting check-condition,however I am
getting reject (10 of them) from target.

According to RFC Section 6.3 and 10.17.1 quoted below the target should
under this condition send out check-condition and not reject.
Please note it is also sending of 10 Rejects packets..I have attached the pcap file for the same.
Is my understanding correct ? please clarify

(The RFC section 6.3)
Targets MUST NOT implicitly terminate an active task by sending a Reject PDU for any PDU exchanged during the life of the task. If the target decides to terminate the task, a Response PDU (SCSI, Text, Task, etc.) must be returned by the target to conclude the task. If the task had never been active before the Reject (i.e., the Reject is on the command PDU), targets should not send any further responses
because the command itself is being discarded.

(The RFC section 10.17.1)
In all the cases in which a per-instantiated SCSI task is terminated because of the reject, the target MUST issue a proper SCSI command response with CHECK CONDITION as described in Section 10.4.3 Response. In these cases in which a status for the SCSI task was already sent before the reject, no additional status is required. If the error is detected while data from the initiator is still expected (i.e., the command PDU did not contain all the data and the target has not received a Data-Out PDU with the Final bit set to 1 for the unsolicited data, if any, and all outstanding R2Ts, if any), the target MUST wait until it receives the last expected Data-Out PDUs with the F bit set to 1 before sending the Response PDU.

The dmesg shows the following output :

[root@wfsc test_suite_iscsi]#dmesg -c

294.640821] ISCSI_FLAG_CMD_WRITE & ISCSI_FLAG_CMD_FINAL not set. Bad iSCSI Initiator.
[  294.640824] ISCSI_FLAG_CMD_WRITE & ISCSI_FLAG_CMD_FINAL not set. Bad iSCSI Initiator.
[  294.640825] ISCSI_FLAG_CMD_WRITE & ISCSI_FLAG_CMD_FINAL not set. Bad iSCSI Initiator.
[  294.640827] ISCSI_FLAG_CMD_WRITE & ISCSI_FLAG_CMD_FINAL not set. Bad iSCSI Initiator.
[  294.640828] ISCSI_FLAG_CMD_WRITE & ISCSI_FLAG_CMD_FINAL not set. Bad iSCSI Initiator.
[  294.640829] ISCSI_FLAG_CMD_WRITE & ISCSI_FLAG_CMD_FINAL not set. Bad iSCSI Initiator.
[  294.640830] ISCSI_FLAG_CMD_WRITE & ISCSI_FLAG_CMD_FINAL not set. Bad iSCSI Initiator.
[  294.640832] ISCSI_FLAG_CMD_WRITE & ISCSI_FLAG_CMD_FINAL not set. Bad iSCSI Initiator.
[  294.640833] ISCSI_FLAG_CMD_WRITE & ISCSI_FLAG_CMD_FINAL not set. Bad iSCSI Initiator.
[  294.640834] ISCSI_FLAG_CMD_WRITE & ISCSI_FLAG_CMD_FINAL not set. Bad iSCSI Initiator.
[  344.345039] device lo left promiscuous mode



1)My system Detials:

[root@wfsc test_suite_iscsi]# uname -a
Linux wfsc 3.12.6 #1 SMP Sat Dec 21 06:13:09 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

2) LIO Target version:
[root@wfsc src]# cat /sys/kernel/config/target/iscsi/lio_version
Datera Inc. iSCSI Target v4.1.0

--
Thanks and regards.
Tejas Vaykole
Development Engineer.
Calsoft Inc

Attachment: reject_on_error.pcapng
Description: Binary data


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux