[PATCH] nvme-tcp: Fix H2CData PDU send accounting (again)

Sagi Grimberg sagi at grimberg.me
Mon Oct 25 00:18:37 PDT 2021


> We should not access request members after the last send, even to
> determine if indeed it was the last data payload send. The reason is
> that a completion could have arrived and trigger a new execution of the
> request which overridden these members. This was fixed by commit
> 825619b09ad3 ("nvme-tcp: fix possible use-after-completion").
> 
> Commit e371af033c56 broke that assumption again to address cases where
> multiple r2t pdus are sent per request. To fix it, we need to record the
> request data_sent and data_len and after the payload network send we
> reference these counters to determine weather we should advance the
> request iterator.

Keith, can I get a reviewed/tested tag here?



More information about the Linux-nvme mailing list