summaryrefslogtreecommitdiff
path: root/include/net/strparser.h
diff options
context:
space:
mode:
authorJiayuan Chen <mrpre@163.com>2025-01-22 18:09:13 +0800
committerMartin KaFai Lau <martin.lau@kernel.org>2025-01-29 13:32:08 -0800
commit0532a79efd68a4d9686b0385e4993af4b130ff82 (patch)
tree5b6dc3c5b591b2d741df74d4e4166042da3136d5 /include/net/strparser.h
parentbc27c52eea189e8f7492d40739b7746d67b65beb (diff)
strparser: Add read_sock callback
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
Diffstat (limited to 'include/net/strparser.h')
-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);