summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJiayuan Chen <mrpre@163.com>2025-01-22 13:09:13 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-27 15:10:50 +0300
commita26f95b6e317acae6f85e8d9cf48c9d87aaccc82 (patch)
tree69cc5b79731b43365171b4dff56b7dfb24878f3a /include
parent29cfda62ab4d92ab94123813db49ab76c1e61b29 (diff)
downloadlinux-a26f95b6e317acae6f85e8d9cf48c9d87aaccc82.tar.xz
strparser: Add read_sock callback
[ Upstream commit 0532a79efd68a4d9686b0385e4993af4b130ff82 ] Added a new read_sock handler, allowing users to customize read operations instead of relying on the native socket's read_sock. Signed-off-by: Jiayuan Chen <mrpre@163.com> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://patch.msgid.link/20250122100917.49845-2-mrpre@163.com Stable-dep-of: 36b62df5683c ("bpf: Fix wrong copied_seq calculation") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/strparser.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/strparser.h b/include/net/strparser.h
index 41e2ce9e9e10..0a83010b3a64 100644
--- a/include/net/strparser.h
+++ b/include/net/strparser.h
@@ -43,6 +43,8 @@ struct strparser;
struct strp_callbacks {
int (*parse_msg)(struct strparser *strp, struct sk_buff *skb);
void (*rcv_msg)(struct strparser *strp, struct sk_buff *skb);
+ int (*read_sock)(struct strparser *strp, read_descriptor_t *desc,
+ sk_read_actor_t recv_actor);
int (*read_sock_done)(struct strparser *strp, int err);
void (*abort_parser)(struct strparser *strp, int err);
void (*lock)(struct strparser *strp);