net: Use sendmsg(MSG_SPLICE_PAGES) not sendpage in skb_send_sock()
authorDavid Howells <dhowells@redhat.com>
Fri, 23 Jun 2023 22:54:59 +0000 (23:54 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 24 Jun 2023 22:50:12 +0000 (15:50 -0700)
commitc729ed6f5be57b4d164dbbc415554c066e29306b
treed9d2fb16f38c9b0756e7df5f355303e17d92d8a6
parentf8dd95b29d7ef08c19ec9720564acf72243ddcf6
net: Use sendmsg(MSG_SPLICE_PAGES) not sendpage in skb_send_sock()

Use sendmsg() with MSG_SPLICE_PAGES rather than sendpage in
skb_send_sock().  This causes pages to be spliced from the source iterator
if possible.

This allows ->sendpage() to be replaced by something that can handle
multiple multipage folios in a single transaction.

Note that this could perhaps be improved to fill out a bvec array with all
the frags and then make a single sendmsg call, possibly sticking the header
on the front also.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jens Axboe <axboe@kernel.dk>
cc: Matthew Wilcox <willy@infradead.org>
Link: https://lore.kernel.org/r/20230623225513.2732256-3-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/skbuff.c