[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF=yD-JSfJsFU1ayJdhU-qoJhG0FUFMxuNNM1mhSfRhAVRnugA@mail.gmail.com>
Date: Tue, 6 Mar 2018 20:01:17 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Sowmini Varadhan <sowmini.varadhan@...cle.com>
Cc: Network Development <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Santosh Shilimkar <santosh.shilimkar@...cle.com>
Subject: Re: [PATCH net-next 1/2] rds: refactor zcopy code into rds_message_zcopy_from_user
On Tue, Mar 6, 2018 at 10:22 AM, Sowmini Varadhan
<sowmini.varadhan@...cle.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@...cle.com>
Acked-by: Willem de Bruijn <willemb@...gle.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.
Powered by blists - more mailing lists