mbox series

[RESEND,0/3] scsi: target: Set correct residual data

Message ID 20201203082035.54566-1-a.kovaleva@yadro.com
Headers show
Series scsi: target: Set correct residual data | expand

Message

Anastasia Kovaleva Dec. 3, 2020, 8:20 a.m. UTC
Hi Martin,
Please apply the changes to 5.11/scsi-queue at your earliest
convenience.

The series changes the behavior of the target in regard to processing
commands with overflow/underflow in accordance with the standarts.

The target driver used to process the DMA_TO_DEVICE commands with
residuals (in particular, WRITE command) incorrectly. The target
response contained neither a residual count, nor an OVERFLOW/UNDERFLOW
bit. Such behavior did not comply with the RFC 7143. Also the
returned ASC and ASCQ were incorrect according to FCP-4,
and residuals were not set for the 4Kn devices.

This patches fix the major inconsistances in processing these kind of
commands.

This patch series has been tested with a modified libiscsi testing
library.
The link to the pull request:
https://github.com/sahlberg/libiscsi/pull/345

Write10Residuals, Write12Residuals, Write16Residuals tests have passed.

Thanks,
Anastasia

Anastasia Kovaleva (2):
  scsi: target: core: Signal WRITE residuals
  scsi: target: core: Change ASCQ for residual write

Roman Bolshakov (1):
  scsi: target: core: Set residuals for 4Kn devices

 drivers/target/target_core_transport.c | 53 +++++++++++++-------------
 include/target/target_core_base.h      |  1 +
 2 files changed, 28 insertions(+), 26 deletions(-)

Comments

Anastasia Kovaleva Jan. 21, 2021, 3:24 p.m. UTC | #1
Hi,

Could you please tell me if there are any objections to these changes?
These patches are applicable to 5.12/scsi-queue.

Thanks,
Anastasia

On 03.12.2020, 11:21, "Anastasia Kovaleva" <a.kovaleva@yadro.com> wrote:

    Hi Martin,
    Please apply the changes to 5.11/scsi-queue at your earliest
    convenience.

    The series changes the behavior of the target in regard to processing
    commands with overflow/underflow in accordance with the standarts.

    The target driver used to process the DMA_TO_DEVICE commands with
    residuals (in particular, WRITE command) incorrectly. The target
    response contained neither a residual count, nor an OVERFLOW/UNDERFLOW
    bit. Such behavior did not comply with the RFC 7143. Also the
    returned ASC and ASCQ were incorrect according to FCP-4,
    and residuals were not set for the 4Kn devices.

    This patches fix the major inconsistances in processing these kind of
    commands.

    This patch series has been tested with a modified libiscsi testing
    library.
    The link to the pull request:
    https://github.com/sahlberg/libiscsi/pull/345

    Write10Residuals, Write12Residuals, Write16Residuals tests have passed.

    Thanks,
    Anastasia

    Anastasia Kovaleva (2):
      scsi: target: core: Signal WRITE residuals
      scsi: target: core: Change ASCQ for residual write

    Roman Bolshakov (1):
      scsi: target: core: Set residuals for 4Kn devices

     drivers/target/target_core_transport.c | 53 +++++++++++++-------------
     include/target/target_core_base.h      |  1 +
     2 files changed, 28 insertions(+), 26 deletions(-)

    -- 
    2.24.3 (Apple Git-128)
Martin K. Petersen Jan. 27, 2021, 4:12 a.m. UTC | #2
Anastasia,

> The series changes the behavior of the target in regard to processing

> commands with overflow/underflow in accordance with the standarts.


Applied to 5.12/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering
Martin K. Petersen Jan. 29, 2021, 7:01 p.m. UTC | #3
On Thu, 3 Dec 2020 11:20:32 +0300, Anastasia Kovaleva wrote:

> Please apply the changes to 5.11/scsi-queue at your earliest

> convenience.

> 

> The series changes the behavior of the target in regard to processing

> commands with overflow/underflow in accordance with the standarts.

> 

> The target driver used to process the DMA_TO_DEVICE commands with

> residuals (in particular, WRITE command) incorrectly. The target

> response contained neither a residual count, nor an OVERFLOW/UNDERFLOW

> bit. Such behavior did not comply with the RFC 7143. Also the

> returned ASC and ASCQ were incorrect according to FCP-4,

> and residuals were not set for the 4Kn devices.

> 

> [...]


Applied to 5.12/scsi-queue, thanks!

[1/3] scsi: target: core: Set residuals for 4Kn devices
      https://git.kernel.org/mkp/scsi/c/eb90e45542b5
[2/3] scsi: target: core: Signal WRITE residuals
      https://git.kernel.org/mkp/scsi/c/cc0b6ad72e18
[3/3] scsi: target: core: Change ASCQ for residual write
      https://git.kernel.org/mkp/scsi/c/ead0ffc95a89

-- 
Martin K. Petersen	Oracle Linux Engineering