bpf, sockmap: Reschedule is now done through backlog
authorJohn Fastabend <john.fastabend@gmail.com>
Tue, 23 May 2023 02:56:07 +0000 (19:56 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 23 May 2023 14:10:04 +0000 (16:10 +0200)
commitbce22552f92ea7c577f49839b8e8f7d29afaf880
tree2b1e7ee53dacbc746865ccb299d32c5f622bdf69
parent29173d07f79883ac94f5570294f98af3d4287382
bpf, sockmap: Reschedule is now done through backlog

Now that the backlog manages the reschedule() logic correctly we can drop
the partial fix to reschedule from recvmsg hook.

Rescheduling on recvmsg hook was added to address a corner case where we
still had data in the backlog state but had nothing to kick it and
reschedule the backlog worker to run and finish copying data out of the
state. This had a couple limitations, first it required user space to
kick it introducing an unnecessary EBUSY and retry. Second it only
handled the ingress case and egress redirects would still be hung.

With the correct fix, pushing the reschedule logic down to where the
enomem error occurs we can drop this fix.

Fixes: bec217197b412 ("skmsg: Schedule psock work if the cached skb exists on the psock")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Link: https://lore.kernel.org/bpf/20230523025618.113937-4-john.fastabend@gmail.com
net/core/skmsg.c