Thread (7 messages) 7 messages, 2 authors, 2021-10-02

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

flat view

From: Cong Wang <hidden>
Date: 2021-10-02 00:00:52
Also in: bpf

On Thu, Sep 30, 2021 at 2:44 PM John Fastabend [off-list ref] wrote:
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help