diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2026-06-13 09:58:46 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-06-15 15:42:53 -0700 |
| commit | d9e4dd3c6f1fab3531d954c4ddedd7207402920b (patch) | |
| tree | bd9f6dea9d5346e6d819c6e216f0170247953f6e /Documentation | |
| parent | e504cf18ef4706b4794fb91a010d345e3d48c72d (diff) | |
| download | ath-d9e4dd3c6f1fab3531d954c4ddedd7207402920b.tar.gz | |
docs: net: fix minor issues with strparser docs
Not sure if anyone would read this doc, but the API has evolved
since it was written. Update to:
- show the int return type for strp_init()
- refer to strp_data_ready(), not the old strp_tcp_data_ready() name
- direct users to strp_msg(skb) for strparser metadata instead of
treating skb->cb as struct strp_msg directly
Link: https://patch.msgid.link/20260613165846.2913092-4-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/networking/strparser.rst | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Documentation/networking/strparser.rst b/Documentation/networking/strparser.rst index 8dc6bb04c710b..372106b61e651 100644 --- a/Documentation/networking/strparser.rst +++ b/Documentation/networking/strparser.rst @@ -40,8 +40,8 @@ Functions :: - strp_init(struct strparser *strp, struct sock *sk, - const struct strp_callbacks *cb) + int strp_init(struct strparser *strp, struct sock *sk, + const struct strp_callbacks *cb) Called to initialize a stream parser. strp is a struct of type strparser that is allocated by the upper layer. sk is the TCP @@ -95,7 +95,7 @@ Functions void strp_data_ready(struct strparser *strp); - The upper layer calls strp_tcp_data_ready when data is ready on + The upper layer calls strp_data_ready when data is ready on the lower socket for strparser to process. This should be called from a data_ready callback that is set on the socket. Note that maximum messages size is the limit of the receive socket @@ -123,9 +123,9 @@ There are seven callbacks: should parse the sk_buff as containing the headers for the next application layer message in the stream. - The skb->cb in the input skb is a struct strp_msg. Only - the offset field is relevant in parse_msg and gives the offset - where the message starts in the skb. + The strparser metadata in the input skb can be accessed with + strp_msg(skb). Only the offset field is relevant in parse_msg and + gives the offset where the message starts in the skb. The return values of this function are: @@ -176,11 +176,11 @@ There are seven callbacks: received in rcv_msg (see strp_pause above). This callback must be set. - The skb->cb in the input skb is a struct strp_msg. This - struct contains two fields: offset and full_len. Offset is - where the message starts in the skb, and full_len is the - the length of the message. skb->len - offset may be greater - than full_len since strparser does not trim the skb. + The strparser metadata in the input skb can be accessed with + strp_msg(skb). This struct contains two fields: offset and full_len. + Offset is where the message starts in the skb, and full_len is + the length of the message. skb->len - offset may be greater than + full_len since strparser does not trim the skb. :: |
