aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo Abeni <[email protected]>2023-07-18 14:38:09 +0000
committerJakub Kicinski <[email protected]>2023-07-20 04:12:59 +0000
commit0558e1674598ec9029c1d3bceb787c8340272b51 (patch)
tree7f6d266fae8d81c53295f3504165114cafe8714b
parentMerge branch 'clean-up-the-fec-driver' (diff)
downloadkernel-0558e1674598ec9029c1d3bceb787c8340272b51.tar.gz
kernel-0558e1674598ec9029c1d3bceb787c8340272b51.zip
udp: use indirect call wrapper for data ready()
In most cases UDP sockets use the default data ready callback. Leverage the indirect call wrapper for such callback to avoid an indirect call in fastpath. The above gives small but measurable performance gain under UDP flood. Signed-off-by: Paolo Abeni <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Link: https://lore.kernel.org/r/d47d53e6f8ee7a11228ca2f025d6243cc04b77f3.1689691004.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--net/ipv4/udp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 42a96b3547c9..8c3ebd95f5b9 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1553,7 +1553,7 @@ int __udp_enqueue_schedule_skb(struct sock *sk, struct sk_buff *skb)
spin_unlock(&list->lock);
if (!sock_flag(sk, SOCK_DEAD))
- sk->sk_data_ready(sk);
+ INDIRECT_CALL_1(sk->sk_data_ready, sock_def_readable, sk);
busylock_release(busy);
return 0;