mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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>
This commit is contained in:
committed by
Jakub Kicinski
parent
7c701d92b2
commit
ebe73a284f
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user