Thread (3 messages) 3 messages, 2 authors, 2021-09-29

RE: [PATCH v3] skmsg: lose offset info in sk_psock_skb_ingress

From: liujian (CE) <hidden>
Date: 2021-09-29 02:08:16
Also in: netdev

-----Original Message-----
From: Cong Wang [mailto:xiyou.wangcong@gmail.com]
Sent: Tuesday, September 28, 2021 1:52 PM
To: liujian (CE) <redacted>
Cc: John Fastabend <john.fastabend@gmail.com>; Daniel Borkmann
[off-list ref]; Jakub Sitnicki [off-list ref]; Lorenz
Bauer [off-list ref]; David Miller [off-list ref]; Jakub
Kicinski [off-list ref]; Alexei Starovoitov [off-list ref]; Andrii
Nakryiko [off-list ref]; Martin KaFai Lau [off-list ref]; Song Liu
[off-list ref]; Yonghong Song [off-list ref]; KP Singh
[off-list ref]; Linux Kernel Network Developers
[off-list ref]; bpf [off-list ref]
Subject: Re: [PATCH v3] skmsg: lose offset info in sk_psock_skb_ingress

On Wed, Sep 22, 2021 at 2:32 AM Liu Jian [off-list ref] wrote:
quoted
 static void sk_psock_skb_state(struct sk_psock *psock, @@ -604,6
+608,9 @@ static void sk_psock_backlog(struct work_struct *work)  {
        struct sk_psock *psock = container_of(work, struct sk_psock, work);
        struct sk_psock_work_state *state = &psock->work_state;
+#if IS_ENABLED(CONFIG_BPF_STREAM_PARSER)
+       struct strp_msg *stm = NULL;
+#endif
        struct sk_buff *skb = NULL;
        bool ingress;
        u32 len, off;
@@ -624,6 +631,13 @@ static void sk_psock_backlog(struct work_struct
*work)
quoted
        while ((skb = skb_dequeue(&psock->ingress_skb))) {
                len = skb->len;
                off = 0;
+#if IS_ENABLED(CONFIG_BPF_STREAM_PARSER)
+               if (skb_bpf_strparser(skb)) {
If CONFIG_BPF_STREAM_PARSER is disabled, this should always return false,
hence you don't need this #ifdef.
Or alternatively, you can at least define for nop for
skb_bpf_strparser() if !CONFIG_BPF_STREAM_PARSER.
And you can move the above "stm" down here too.
V4 has been sent, thank you~
(Ditto for the other place below.)

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