net: sock_dequeue_err_skb() optimization
Subsystems (2)
PATCH 1/1 net: sock_dequeue_err_skb() optimization
Exit early if the list is empty.
Some applications using TCP zerocopy are calling recvmsg( ... MSG_ERRQUEUE) and hit this case quite often, probably because busy polling only deals with sk_receive_queue.
Signed-off-by Eric Dumazet <[email protected]>
--- net/core/skbuff.c | 3 +++ 1 file changed, 3 insertions(+)
net/core/skbuff.c +3 -0
@@ -5162,6 +5162,9 @@ struct sk_buff *sock_dequeue_err_skb(struct sock *sk)bool icmp_next = false;unsigned long flags; +if (skb_queue_empty_lockless (q)) +return NULL ; +spin_lock_irqsave (&q->lock, flags); skb =__skb_dequeue (q);if (skb && (skb_next =skb_peek (q))) {
Signature · 1 line
2.42.0.582.g8ccd20d70d-goog
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Thu, 5 Oct 2023 11:45:04 +0000 you wrote:
Exit early if the list is empty.
Some applications using TCP zerocopy are calling recvmsg( ...
MSG_ERRQUEUE) and hit this case quite often, probably because busy polling only deals withsk_receive_queue.Signed-off-by Eric Dumazet <[email protected]>[...]
Here is the summary with links:
- [net-next] net: sock_dequeue_err_skb() optimization
https://git.kernel.org/netdev/net-next/c/48533eca606e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html