Re: [RFC PATCH 03/28] tcp: Support MSG_SPLICE_PAGES

From
Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date
2023-03-16 19:00:54
Also in
linux-fsdevel, linux-mm, lkml
Reply to
David Howells, 2023-03-16
David Howells wrote:
Willem de Bruijn [off-list ref] wrote:
quoted
The commit message mentions MSG_SPLICE_PAGES as an internal flag.

It can be passed from userspace. The code anticipates that and checks
preconditions.
Should I add a separate field in the in-kernel msghdr struct for such internal
flags?  That would also avoid putting an internal flag in the same space as
the uapi flags.
That would work, if no cost to common paths that don't need it.

A not very pretty alternative would be to add an an extra arg to each
sendmsg handler that is used only when called from sendpage.

There are a few other internal MSG_.. flags, such as
MSG_SENDPAGE_NOPOLICY. Those are all limited to sendpage, and ignored
in sendmsg, I think. Which would explain why it was clearly safe to
add them.
Thread (54 messages) 54 messages, 7 authors, last reply 2023-03-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help