[PATCH] nvme-tcp: Fix H2CData PDU send accounting (again)
Sagi Grimberg
sagi at grimberg.me
Mon Oct 25 13:35:13 PDT 2021
>> diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
>> index 78966b8ddb1e..42b58eb1ba62 100644
>> --- a/drivers/nvme/host/tcp.c
>> +++ b/drivers/nvme/host/tcp.c
>> @@ -926,15 +926,17 @@ static void nvme_tcp_fail_request(struct nvme_tcp_request *req)
>> static int nvme_tcp_try_send_data(struct nvme_tcp_request *req)
>> {
>> struct nvme_tcp_queue *queue = req->queue;
>> + int req_data_len = req->data_len;
>>
>> while (true) {
>> struct page *page = nvme_tcp_req_cur_page(req);
>> size_t offset = nvme_tcp_req_cur_offset(req);
>> size_t len = nvme_tcp_req_cur_length(req);
>> - bool last = nvme_tcp_pdu_last_send(req, len);
>> + bool pdu_last = nvme_tcp_pdu_last_send(req, len);
>
> I'm not sure why you opted to change the name of this variable here,
It's designed to clarify that this flag is for the last send in the pdu
and not in the request (each request may consist of multiple pdus).
> but the patch is testing successfully: no observed r2t errors since apply
> this, so I think we're good to go for that regression.
>
> Reviewed-by: Keith Busch <kbusch at kernel.org>
Thanks.
More information about the Linux-nvme
mailing list