^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) .. SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) =========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) Stream Parser (strparser)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) =========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) Introduction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) The stream parser (strparser) is a utility that parses messages of an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) application layer protocol running over a data stream. The stream
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) parser works in conjunction with an upper layer in the kernel to provide
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) kernel support for application layer messages. For instance, Kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) Connection Multiplexor (KCM) uses the Stream Parser to parse messages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) using a BPF program.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) The strparser works in one of two modes: receive callback or general
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) In receive callback mode, the strparser is called from the data_ready
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) callback of a TCP socket. Messages are parsed and delivered as they are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) received on the socket.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) In general mode, a sequence of skbs are fed to strparser from an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) outside source. Message are parsed and delivered as the sequence is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) processed. This modes allows strparser to be applied to arbitrary
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) streams of data.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) Interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) =========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) The API includes a context structure, a set of callbacks, utility
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) functions, and a data_ready function for receive callback mode. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) callbacks include a parse_msg function that is called to perform
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) parsing (e.g. BPF parsing in case of KCM), and a rcv_msg function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) that is called when a full message has been completed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) Functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) =========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) strp_init(struct strparser *strp, struct sock *sk,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) const struct strp_callbacks *cb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) Called to initialize a stream parser. strp is a struct of type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) strparser that is allocated by the upper layer. sk is the TCP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) socket associated with the stream parser for use with receive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) callback mode; in general mode this is set to NULL. Callbacks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) are called by the stream parser (the callbacks are listed below).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) void strp_pause(struct strparser *strp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) Temporarily pause a stream parser. Message parsing is suspended
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) and no new messages are delivered to the upper layer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) void strp_unpause(struct strparser *strp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) Unpause a paused stream parser.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) void strp_stop(struct strparser *strp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) strp_stop is called to completely stop stream parser operations.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) This is called internally when the stream parser encounters an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) error, and it is called from the upper layer to stop parsing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) operations.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) void strp_done(struct strparser *strp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) strp_done is called to release any resources held by the stream
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) parser instance. This must be called after the stream processor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) has been stopped.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) int strp_process(struct strparser *strp, struct sk_buff *orig_skb,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) unsigned int orig_offset, size_t orig_len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) size_t max_msg_size, long timeo)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) strp_process is called in general mode for a stream parser to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) parse an sk_buff. The number of bytes processed or a negative
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) error number is returned. Note that strp_process does not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) consume the sk_buff. max_msg_size is maximum size the stream
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) parser will parse. timeo is timeout for completing a message.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) void strp_data_ready(struct strparser *strp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) The upper layer calls strp_tcp_data_ready when data is ready on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) the lower socket for strparser to process. This should be called
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) from a data_ready callback that is set on the socket. Note that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) maximum messages size is the limit of the receive socket
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) buffer and message timeout is the receive timeout for the socket.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) void strp_check_rcv(struct strparser *strp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) strp_check_rcv is called to check for new messages on the socket.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) This is normally called at initialization of a stream parser
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) instance or after strp_unpause.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) Callbacks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) =========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) There are six callbacks:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) int (*parse_msg)(struct strparser *strp, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) parse_msg is called to determine the length of the next message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) in the stream. The upper layer must implement this function. It
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) should parse the sk_buff as containing the headers for the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) next application layer message in the stream.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) The skb->cb in the input skb is a struct strp_msg. Only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) the offset field is relevant in parse_msg and gives the offset
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) where the message starts in the skb.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) The return values of this function are:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) ========= ===========================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) >0 indicates length of successfully parsed message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 0 indicates more data must be received to parse the message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) -ESTRPIPE current message should not be processed by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) kernel, return control of the socket to userspace which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) can proceed to read the messages itself
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) other < 0 Error in parsing, give control back to userspace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) assuming that synchronization is lost and the stream
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) is unrecoverable (application expected to close TCP socket)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) ========= ===========================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) In the case that an error is returned (return value is less than
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) zero) and the parser is in receive callback mode, then it will set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) the error on TCP socket and wake it up. If parse_msg returned
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) -ESTRPIPE and the stream parser had previously read some bytes for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) the current message, then the error set on the attached socket is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) ENODATA since the stream is unrecoverable in that case.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) void (*lock)(struct strparser *strp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) The lock callback is called to lock the strp structure when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) the strparser is performing an asynchronous operation (such as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) processing a timeout). In receive callback mode the default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) function is to lock_sock for the associated socket. In general
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) mode the callback must be set appropriately.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) void (*unlock)(struct strparser *strp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) The unlock callback is called to release the lock obtained
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) by the lock callback. In receive callback mode the default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) function is release_sock for the associated socket. In general
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) mode the callback must be set appropriately.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) void (*rcv_msg)(struct strparser *strp, struct sk_buff *skb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) rcv_msg is called when a full message has been received and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) is queued. The callee must consume the sk_buff; it can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) call strp_pause to prevent any further messages from being
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) received in rcv_msg (see strp_pause above). This callback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) must be set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) The skb->cb in the input skb is a struct strp_msg. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) struct contains two fields: offset and full_len. Offset is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) where the message starts in the skb, and full_len is the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) the length of the message. skb->len - offset may be greater
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) then full_len since strparser does not trim the skb.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) int (*read_sock_done)(struct strparser *strp, int err);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) read_sock_done is called when the stream parser is done reading
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) the TCP socket in receive callback mode. The stream parser may
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) read multiple messages in a loop and this function allows cleanup
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) to occur when exiting the loop. If the callback is not set (NULL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) in strp_init) a default function is used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) void (*abort_parser)(struct strparser *strp, int err);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) This function is called when stream parser encounters an error
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) in parsing. The default function stops the stream parser and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) sets the error in the socket if the parser is in receive callback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) mode. The default function can be changed by setting the callback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) to non-NULL in strp_init.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) Statistics
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) ==========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) Various counters are kept for each stream parser instance. These are in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) the strp_stats structure. strp_aggr_stats is a convenience structure for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) accumulating statistics for multiple stream parser instances.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) save_strp_stats and aggregate_strp_stats are helper functions to save
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) and aggregate statistics.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) Message assembly limits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) =======================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) The stream parser provide mechanisms to limit the resources consumed by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) message assembly.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) A timer is set when assembly starts for a new message. In receive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) callback mode the message timeout is taken from rcvtime for the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) associated TCP socket. In general mode, the timeout is passed as an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) argument in strp_process. If the timer fires before assembly completes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) the stream parser is aborted and the ETIMEDOUT error is set on the TCP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) socket if in receive callback mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) In receive callback mode, message length is limited to the receive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) buffer size of the associated TCP socket. If the length returned by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) parse_msg is greater than the socket buffer size then the stream parser
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) is aborted with EMSGSIZE error set on the TCP socket. Note that this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) makes the maximum size of receive skbuffs for a socket with a stream
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) parser to be 2*sk_rcvbuf of the TCP socket.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) In general mode the message length limit is passed in as an argument
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) to strp_process.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) Author
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) ======
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) Tom Herbert (tom@quantonium.net)