From: Cong Wang <xiyou.wangcong@gmail.com>
To: Lorenz Bauer <lmb@cloudflare.com>
Cc: Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
duanxiongchun@bytedance.com,
Dongdong Wang <wangdongdong.6@bytedance.com>,
jiang.wang@bytedance.com, Cong Wang <cong.wang@bytedance.com>,
John Fastabend <john.fastabend@gmail.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Jakub Sitnicki <jakub@cloudflare.com>
Subject: Re: [Patch bpf-next v2 2/5] skmsg: get rid of struct sk_psock_parser
Date: Fri, 12 Feb 2021 17:58:03 -0800 [thread overview]
Message-ID: <CAM_iQpUkNA0D8vokqvjLgH3bv6vkKvNoz4Jg149dDnDjFH+qCA@mail.gmail.com> (raw)
In-Reply-To: <CAM_iQpUvaFry3Pj+tWoM9npMrARfQ=O=tmg7SkwC+m54G0T6Yg@mail.gmail.com>
On Fri, Feb 12, 2021 at 11:09 AM Cong Wang <xiyou.wangcong@gmail.com> wrote:
>
> On Fri, Feb 12, 2021 at 2:56 AM Lorenz Bauer <lmb@cloudflare.com> wrote:
> >
> > On Wed, 10 Feb 2021 at 02:21, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> > >
> > > From: Cong Wang <cong.wang@bytedance.com>
> > >
> > > struct sk_psock_parser is embedded in sk_psock, it is
> > > unnecessary as skb verdict also uses ->saved_data_ready.
> > > We can simply fold these fields into sk_psock, and get rid
> > > of ->enabled.
> >
> > Looks nice, can you use sk_psock_strp_enabled() more? There are a
> > couple places in sock_map.c which test psock->saved_data_ready
> > directly.
>
> Its name tells it is for stream parser, so not suitable for others.
>
> Are you suggesting to rename it to sk_psock_enabled() and use
> it? Note it still has an additional !psock test, but I think that is fine
> for slow paths.
Well, I think it is a bug, sk_psock_strp_enabled() probably means
to check whether progs.stream_verdict is running, not whether
any of these progs is running. So, I'd leave this untouched in this
patchset and if needed a separate bug fix should be sent to -net.
Thanks.
next prev parent reply other threads:[~2021-02-13 1:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 2:21 [Patch bpf-next v2 0/5] sock_map: clean up and refactor code for BPF_SK_SKB_VERDICT Cong Wang
2021-02-10 2:21 ` [Patch bpf-next v2 1/5] bpf: clean up sockmap related Kconfigs Cong Wang
2021-02-10 2:21 ` [Patch bpf-next v2 2/5] skmsg: get rid of struct sk_psock_parser Cong Wang
2021-02-12 10:56 ` Lorenz Bauer
2021-02-12 19:09 ` Cong Wang
2021-02-13 1:58 ` Cong Wang [this message]
2021-02-10 2:21 ` [Patch bpf-next v2 3/5] bpf: compute data_end dynamically with JIT code Cong Wang
2021-02-12 10:55 ` Lorenz Bauer
2021-02-12 19:01 ` Cong Wang
2021-02-10 2:21 ` [Patch bpf-next v2 4/5] skmsg: use skb ext instead of TCP_SKB_CB Cong Wang
2021-02-12 10:58 ` Lorenz Bauer
2021-02-10 2:21 ` [Patch bpf-next v2 5/5] sock_map: rename skb_parser and skb_verdict Cong Wang
2021-02-12 10:59 ` Lorenz Bauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAM_iQpUkNA0D8vokqvjLgH3bv6vkKvNoz4Jg149dDnDjFH+qCA@mail.gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.com \
--cc=daniel@iogearbox.net \
--cc=duanxiongchun@bytedance.com \
--cc=jakub@cloudflare.com \
--cc=jiang.wang@bytedance.com \
--cc=john.fastabend@gmail.com \
--cc=lmb@cloudflare.com \
--cc=netdev@vger.kernel.org \
--cc=wangdongdong.6@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).