aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2023-05-22 13:11:12 +0100
committerJakub Kicinski <kuba@kernel.org>2023-05-23 20:48:27 -0700
commit2e910b95329c2dc7feffbec00907f9e02d1a850a (patch)
treeaf42d5f2e155380b765ced7b747eff2979aa78e4 /include/linux/skbuff.h
parentnet: Pass max frags into skb_append_pagefrags() (diff)
downloadwireguard-linux-2e910b95329c2dc7feffbec00907f9e02d1a850a.tar.xz
wireguard-linux-2e910b95329c2dc7feffbec00907f9e02d1a850a.zip
net: Add a function to splice pages into an skbuff for MSG_SPLICE_PAGES
Add a function to handle MSG_SPLICE_PAGES being passed internally to sendmsg(). Pages are spliced into the given socket buffer if possible and copied in if not (e.g. they're slab pages or have a zero refcount). Signed-off-by: David Howells <dhowells@redhat.com> cc: David Ahern <dsahern@kernel.org> cc: Al Viro <viro@zeniv.linux.org.uk> cc: Jens Axboe <axboe@kernel.dk> cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 15011408c47c..1b2ebf6113e0 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -5097,5 +5097,8 @@ static inline void skb_mark_for_recycle(struct sk_buff *skb)
#endif
}
+ssize_t skb_splice_from_iter(struct sk_buff *skb, struct iov_iter *iter,
+ ssize_t maxsize, gfp_t gfp);
+
#endif /* __KERNEL__ */
#endif /* _LINUX_SKBUFF_H */