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