OSDN Git Service

net: Declare MSG_SPLICE_PAGES internal sendmsg() flag
authorDavid Howells <dhowells@redhat.com>
Mon, 22 May 2023 12:11:10 +0000 (13:11 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 24 May 2023 03:48:27 +0000 (20:48 -0700)
commitb841b901c452d92610f739a36e54978453528876
treed83c772ba708edabc53eefbc86a1bb15b4413d7c
parent57910a47ffe993c2724a916b9e003d84ff0c0df7
net: Declare MSG_SPLICE_PAGES internal sendmsg() flag

Declare MSG_SPLICE_PAGES, an internal sendmsg() flag, that hints to a
network protocol that it should splice pages from the source iterator
rather than copying the data if it can.  This flag is added to a list that
is cleared by sendmsg syscalls on entry.

This is intended as a replacement for the ->sendpage() op, allowing a way
to splice in several multipage folios in one go.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
cc: Jens Axboe <axboe@kernel.dk>
cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/socket.h
io_uring/net.c
net/socket.c