Re: [Patch bpf v2 3/4] net: implement ->sock_is_readable for UDP and AF_UNIX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 30, 2021 at 2:44 PM John Fastabend <john.fastabend@xxxxxxxxx> 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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux