[PATCH v3 2/2] nvme-tcp: send H2CData PDUs based on MAXH2CDATA

Varun Prakash varun at chelsio.com
Tue Nov 23 07:41:18 PST 2021


On Tue, Nov 23, 2021 at 02:58:05PM +0200, Sagi Grimberg wrote:
> >@@ -633,14 +640,19 @@ static int nvme_tcp_handle_r2t(struct nvme_tcp_queue *queue,
> >  		return -EPROTO;
> >  	}
> >-	if (unlikely(le32_to_cpu(pdu->r2t_offset) < req->data_sent)) {
> >+	if (unlikely(r2t_offset < req->data_sent)) {
> >  		dev_err(queue->ctrl->ctrl.device,
> >  			"req %d unexpected r2t offset %u (expected %zu)\n",
> >-			rq->tag, le32_to_cpu(pdu->r2t_offset), req->data_sent);
> >+			rq->tag, r2t_offset, req->data_sent);
> >  		return -EPROTO;
> >  	}
> >-	nvme_tcp_setup_h2c_data_pdu(req, pdu);
> >+	req->pdu_len = 0;
> 
> Why do you need to set this here? it is set in the initial command
> execution...

This is needed for multiple R2T case.



More information about the Linux-nvme mailing list