From: Sagi Grimberg <sagi@grimberg.me>
To: Varun Prakash <varun@chelsio.com>
Cc: hch@lst.de, kbusch@kernel.org, linux-nvme@lists.infradead.org
Subject: Re: [PATCH v2 2/2] nvme-tcp: send H2CData PDUs based on MAXH2CDATA
Date: Tue, 23 Nov 2021 11:09:08 +0200 [thread overview]
Message-ID: <9045e751-3bec-a070-bd40-ce2a45ac0074@grimberg.me> (raw)
In-Reply-To: <20211123083346.GA1704@chelsio.com>
>>> @@ -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.
prev parent reply other threads:[~2021-11-23 9:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-22 10:25 [PATCH v2 2/2] nvme-tcp: send H2CData PDUs based on MAXH2CDATA Varun Prakash
2021-11-22 10:35 ` Sagi Grimberg
2021-11-23 8:33 ` Varun Prakash
2021-11-23 9:09 ` Sagi Grimberg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9045e751-3bec-a070-bd40-ce2a45ac0074@grimberg.me \
--to=sagi@grimberg.me \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=varun@chelsio.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox