Thread (50 messages) 50 messages, 2 authors, 2021-05-17

Re: nvme tcp receive errors

From: Keith Busch <kbusch@kernel.org>
Date: 2021-05-03 14:29:24

On Fri, Apr 30, 2021 at 04:42:14PM -0700, Sagi Grimberg wrote:
quoted
You are exactly right, I think this should do the trick:
Hey Keith,

Did this resolve the issues?
We're unfortunately still observing data digest issues even with this.
Most of the testing has shifted to the r2t error, so I don't have any
additional details on the data digest problem.

On the r2t issue, I'm just waiting for the weekend test results to see
what happened with running your most recent test suggestion.
 
quoted
-- 
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 8e55d8bc0c50..eb1feaacd11a 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -55,6 +55,7 @@ struct nvme_tcp_request {
         /* send state */
         size_t                  offset;
         size_t                  data_sent;
+       size_t                  data_received;
         enum nvme_tcp_send_state state;
  };
@@ -751,9 +752,12 @@ static int nvme_tcp_recv_data(struct nvme_tcp_queue
*queue, struct sk_buff *skb,
                 *len -= recv_len;
                 *offset += recv_len;
                 queue->data_remaining -= recv_len;
+               req->data_received += recv_len;
         }

         if (!queue->data_remaining) {
+               if (req->data_received < req->data_len)
+                       return 0;
                 if (queue->data_digest) {
                         nvme_tcp_ddgst_final(queue->rcv_hash,
&queue->exp_ddgst);
                         queue->ddgst_remaining = NVME_TCP_DIGEST_LENGTH;
@@ -2274,6 +2278,7 @@ static blk_status_t nvme_tcp_setup_cmd_pdu(struct
nvme_ns *ns,
         req->state = NVME_TCP_SEND_CMD_PDU;
         req->offset = 0;
         req->data_sent = 0;
+       req->data_received = 0;
         req->pdu_len = 0;
         req->pdu_sent = 0;
         req->data_len = blk_rq_nr_phys_segments(rq) ?
-- 
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help