summaryrefslogtreecommitdiff
path: root/Documentation
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 /Documentation
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 'Documentation')
-rw-r--r--Documentation/networking/strparser.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/Documentation/networking/strparser.rst b/Documentation/networking/strparser.rst
index 6cab1f74ae05..7f623d1db72a 100644
--- a/Documentation/networking/strparser.rst
+++ b/Documentation/networking/strparser.rst
@@ -112,7 +112,7 @@ Functions
Callbacks
=========
-There are six callbacks:
+There are seven callbacks:
::
@@ -184,6 +184,13 @@ There are six callbacks:
::
+ int (*read_sock)(struct strparser *strp, read_descriptor_t *desc,
+ sk_read_actor_t recv_actor);
+
+ The read_sock callback is used by strparser instead of
+ sock->ops->read_sock, if provided.
+ ::
+
int (*read_sock_done)(struct strparser *strp, int err);
read_sock_done is called when the stream parser is done reading