]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-tcp: Do not reset transport on data digest errors
authorDaniel Wagner <dwagner@suse.de>
Mon, 30 Aug 2021 13:36:26 +0000 (15:36 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 6 Sep 2021 08:03:11 +0000 (10:03 +0200)
commit04f2f0afaa1824d33aa0c308b0c498f47bb47eb6
tree11246c0cbf90677d906a5d46ff8b4aee9092b387
parentcba3ef2626074eda9268cd8e968e3968f961825c
nvme-tcp: Do not reset transport on data digest errors

The spec says

  7.4.6.1 Digest Error handling

  When a host detects a data digest error in a C2HData PDU, that host
  shall continue processing C2HData PDUs associated with the command and
  when the command processing has completed, if a successful status was
  returned by the controller, the host shall fail the command with a
  non-fatal transport error.

Currently the transport is reseted when a data digest error is
detected. Instead, when a digest error is detected, mark the final
status as NVME_SC_DATA_XFER_ERROR and let the upper layer handle
the error.

In order to keep track of the final result maintain a status field in
nvme_tcp_request object and use it to overwrite the completion queue
status (which might be successful even though a digest error has been
detected) when completing the request.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/tcp.c