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 /Documentation | |
| 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 'Documentation')
| -rw-r--r-- | Documentation/networking/strparser.rst | 9 |
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 |
