summaryrefslogtreecommitdiff
path: root/include/linux/socket.h
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@kernel.org>2022-07-12 21:52:30 +0100
committerJakub Kicinski <kuba@kernel.org>2022-07-19 14:20:54 -0700
commitebe73a284f4de8c5d401adeccd9b8fe3183b6e95 (patch)
tree19911b54eaa143e16d4e2a1af73b6e556f404e99 /include/linux/socket.h
parent7c701d92b2b5e5175dbfec875816474b802b0c45 (diff)
net: Allow custom iter handler in msghdr
Add support for custom iov_iter handling to msghdr. The idea is that in-kernel subsystems want control over how an SG is split. Signed-off-by: David Ahern <dsahern@kernel.org> [pavel: move callback into msghdr] Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/socket.h')
-rw-r--r--include/linux/socket.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 7bac9fc1cee0..3c11ef18a9cf 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -14,6 +14,8 @@ struct file;
struct pid;
struct cred;
struct socket;
+struct sock;
+struct sk_buff;
#define __sockaddr_check_size(size) \
BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage)))
@@ -70,6 +72,8 @@ struct msghdr {
__kernel_size_t msg_controllen; /* ancillary data buffer length */
struct kiocb *msg_iocb; /* ptr to iocb for async requests */
struct ubuf_info *msg_ubuf;
+ int (*sg_from_iter)(struct sock *sk, struct sk_buff *skb,
+ struct iov_iter *from, size_t length);
};
struct user_msghdr {