[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230523025618.113937-4-john.fastabend@gmail.com>
Date: Mon, 22 May 2023 19:56:07 -0700
From: John Fastabend <john.fastabend@...il.com>
To: jakub@...udflare.com,
daniel@...earbox.net
Cc: john.fastabend@...il.com,
bpf@...r.kernel.org,
netdev@...r.kernel.org,
edumazet@...gle.com,
ast@...nel.org,
andrii@...nel.org,
will@...valent.com
Subject: [PATCH bpf v10 03/14] 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.
Reviewed-by: Jakub Sitnicki <jakub@...udflare.com>
Fixes: bec217197b412 ("skmsg: Schedule psock work if the cached skb exists on the psock")
Signed-off-by: John Fastabend <john.fastabend@...il.com>
---
net/core/skmsg.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/core/skmsg.c b/net/core/skmsg.c
index 0a9ee2acac0b..76ff15f8bb06 100644
--- a/net/core/skmsg.c
+++ b/net/core/skmsg.c
@@ -481,8 +481,6 @@ int sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg,
msg_rx = sk_psock_peek_msg(psock);
}
out:
- if (psock->work_state.skb && copied > 0)
- schedule_delayed_work(&psock->work, 0);
return copied;
}
EXPORT_SYMBOL_GPL(sk_msg_recvmsg);
--
2.33.0
Powered by blists - more mailing lists