From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Cc: Network Development <netdev@vger.kernel.org>,
David Miller <davem@davemloft.net>,
Santosh Shilimkar <santosh.shilimkar@oracle.com>
Subject: Re: [PATCH net-next 1/2] rds: refactor zcopy code into rds_message_zcopy_from_user
Date: Tue, 6 Mar 2018 20:01:17 -0500 [thread overview]
Message-ID: <CAF=yD-JSfJsFU1ayJdhU-qoJhG0FUFMxuNNM1mhSfRhAVRnugA@mail.gmail.com> (raw)
In-Reply-To: <5429c6b6d6147d05da33c66c4c59dbcd52f945ee.1520348028.git.sowmini.varadhan@oracle.com>
On Tue, Mar 6, 2018 at 10:22 AM, Sowmini Varadhan
<sowmini.varadhan@oracle.com> wrote:
> Move the large block of code predicated on zcopy from
> rds_message_copy_from_user into a new function,
> rds_message_zcopy_from_user()
>
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Willem de Bruijn <willemb@google.com>
> +int rds_message_copy_from_user(struct rds_message *rm, struct iov_iter *from,
> + bool zcopy)
> +{
> + unsigned long to_copy, nbytes;
> + unsigned long sg_off;
> + struct scatterlist *sg;
> + int ret = 0;
> +
> + rm->m_inc.i_hdr.h_len = cpu_to_be32(iov_iter_count(from));
> +
> + /* now allocate and copy in the data payload. */
> + sg = rm->data.op_sg;
> + sg_off = 0; /* Dear gcc, sg->page will be null from kzalloc. */
The above lines appear both here and in rds_message_zcopy_from_user.
Not strictly necessary, but not buggy, so no need to revise just for that.
next prev parent reply other threads:[~2018-03-07 1:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-06 15:22 [PATCH net-next 0/2] RDS: zerocopy code enhancements Sowmini Varadhan
2018-03-06 15:22 ` [PATCH net-next 1/2] rds: refactor zcopy code into rds_message_zcopy_from_user Sowmini Varadhan
2018-03-07 1:01 ` Willem de Bruijn [this message]
2018-03-06 15:22 ` [PATCH net-next 2/2] rds: use list structure to track information for zerocopy completion notification Sowmini Varadhan
2018-03-07 1:02 ` Willem de Bruijn
2018-03-07 23:06 ` [PATCH net-next 0/2] RDS: zerocopy code enhancements David Miller
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='CAF=yD-JSfJsFU1ayJdhU-qoJhG0FUFMxuNNM1mhSfRhAVRnugA@mail.gmail.com' \
--to=willemdebruijn.kernel@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=santosh.shilimkar@oracle.com \
--cc=sowmini.varadhan@oracle.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;
as well as URLs for NNTP newsgroup(s).