[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM_iQpUj7h0L7xE=CY0zHTJ=VzJ-Cmy6foJQvvpTv1aixLwY6Q@mail.gmail.com>
Date: Fri, 1 Oct 2021 17:00:39 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: John Fastabend <john.fastabend@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
bpf <bpf@...r.kernel.org>, Cong Wang <cong.wang@...edance.com>,
Yucong Sun <sunyucong@...il.com>,
Daniel Borkmann <daniel@...earbox.net>,
Jakub Sitnicki <jakub@...udflare.com>,
Lorenz Bauer <lmb@...udflare.com>
Subject: Re: [Patch bpf v2 3/4] net: implement ->sock_is_readable for UDP and AF_UNIX
On Thu, Sep 30, 2021 at 2:44 PM John Fastabend <john.fastabend@...il.com> wrote:
> > +bool sk_msg_is_readable(struct sock *sk)
> > +{
> > + struct sk_psock *psock;
> > + bool empty = true;
> > +
> > + psock = sk_psock_get_checked(sk);
>
> We shouldn't need the checked version here right? We only get here because
> we hooked the sk with the callbacks from *_bpf_rebuild_rpotos. Then we
> can just use sk_psock() and save a few extra insns/branch.
Good catch! Indeed only sockmap overwrites that hook.
I will send V3 shortly after all tests are done.
Thanks
Powered by blists - more mailing lists