• Daniel Wagner's avatar
    nvme-tcp: Do not reset transport on data digest errors · 1ba2e507
    Daniel Wagner authored
    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: default avatarDaniel Wagner <dwagner@suse.de>
    Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
    Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    1ba2e507
tcp.c 65.9 KB