Thread (6 messages) flat view 6 messages, 3 authors, 2021-10-12

Re: [PATCH v4] skmsg: lose offset info in sk_psock_skb_ingress

From: Cong Wang <hidden>
Date: 2021-09-29 05:19:29
Also in: bpf

On Tue, Sep 28, 2021 at 7:06 PM Liu Jian [off-list ref] wrote:
If sockmap enable strparser, there are lose offset info in
sk_psock_skb_ingress. If the length determined by parse_msg function
is not skb->len, the skb will be converted to sk_msg multiple times,
and userspace app will get the data multiple times.

Fix this by get the offset and length from strp_msg.
And as Cong suggestion, add one bit in skb->_sk_redir to distinguish
enable or disable strparser.

Signed-off-by: Liu Jian <redacted>
---
v1->v2: fix build error when disable CONFIG_BPF_STREAM_PARSER
v2->v3: Add one bit in skb->_sk_redir to distinguish enable or disable strparser
v3->v4: Remove "#if IS_ENABLED(CONFIG_BPF_STREAM_PARSER)" code;
        and let "stm" have a more precise scope.
Looks much cleaner now.

Reviewed-by: Cong Wang <redacted>

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help