diff options
| author | Jiayuan Chen <mrpre@163.com> | 2025-01-22 18:09:13 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-27 04:30:19 -0800 |
| commit | a87a6888c05b4a8956c9ce8b2b09569a9fd22218 (patch) | |
| tree | 2648d97d61d2df611561f7b175080150752e6c5f /include | |
| parent | d95607a5f2f9bb08194c9deaf4a5f3e8ba59a9d4 (diff) | |
| download | linux-a87a6888c05b4a8956c9ce8b2b09569a9fd22218.tar.gz linux-a87a6888c05b4a8956c9ce8b2b09569a9fd22218.tar.bz2 linux-a87a6888c05b4a8956c9ce8b2b09569a9fd22218.zip | |
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.h | 2 |
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); |
