Re: [PATCH net-next v3 01/18] net: Copy slab data for sendmsg(MSG_SPLICE_PAGES)
From: David Howells
Date: Fri Jun 23 2023 - 05:09:11 EST
Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
> If we can't reach instant agreement --
> can you strategically separate out the minimal set of changes required
> to just kill MSG_SENDPAGE_NOTLAST. IMHO it's worth getting that into
> 6.5.
Paolo Abeni <pabeni@xxxxxxxxxx> wrote:
> Given all the above, and the late stage of the current devel cycle,
> would you consider slicing down this series to just kill
> MSG_SENDPAGE_NOTLAST, as Jakub suggested?
I could do that.
There is also another alternative. I could just push the sendpage wrappers up
the stack into the higher-level callers. Basically this:
int udp_sendpage(struct sock *sk, struct page *page, int offset,
size_t size, int flags)
{
struct bio_vec bvec;
struct msghdr msg = { .msg_flags = flags | MSG_SPLICE_PAGES };
if (flags & MSG_SENDPAGE_NOTLAST)
msg.msg_flags |= MSG_MORE;
bvec_set_page(&bvec, page, size, offset);
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, &bvec, 1, size);
return udp_sendmsg(sk, &msg, size);
}
and kill off sendpage and MSG_SENDPAGE_NOTLAST.
David