Re: [PATCH v2 2/2] nvme-tcp: send H2CData PDUs based on MAXH2CDATA
From: Sagi Grimberg <sagi@grimberg.me>
Date: 2021-11-23 09:09:19
From: Sagi Grimberg <sagi@grimberg.me>
Date: 2021-11-23 09:09:19
quoted
quoted
@@ -933,6 +934,7 @@ 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; + u32 h2cdata_left = req->h2cdata_left;No need for the local variable, the reference only happens when the pdu data transfer is completed.As this function also executes for inline data it is possible that completion gets processed and request gets allocated for new cmd before if (req->h2cdata_left) check, nvme_tcp_setup_cmd_pdu() will set req->h2cdata_left to 0 so it will work but it does not look correct to me. IMO we should use local variable here.
I see. that's fine then.