[PATCH v3 2/2] nvme-tcp: send H2CData PDUs based on MAXH2CDATA
Sagi Grimberg
sagi at grimberg.me
Tue Nov 23 12:00:59 PST 2021
>>> @@ -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.
ok, makes sense.
More information about the Linux-nvme
mailing list