summaryrefslogtreecommitdiffstats
path: root/include/net/udp.h
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2018-10-05 17:31:40 +0200
committerDavid S. Miller <davem@davemloft.net>2018-10-05 20:52:38 +0200
commitf2e9de210d50187d206989e60bc5a99c2b692209 (patch)
tree89597b81b0eb9e6ce7318ace7a17ff8ec507c325 /include/net/udp.h
parentgigaset: asyncdata: mark expected switch fall-throughs (diff)
downloadlinux-f2e9de210d50187d206989e60bc5a99c2b692209.tar.xz
linux-f2e9de210d50187d206989e60bc5a99c2b692209.zip
udp: gro behind static key
Avoid the socket lookup cost in udp_gro_receive if no socket has a udp tunnel callback configured. udp_sk(sk)->gro_receive requires a registration with setup_udp_tunnel_sock, which enables the static key. Signed-off-by: Willem de Bruijn <willemb@google.com> Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/udp.h')
-rw-r--r--include/net/udp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/udp.h b/include/net/udp.h
index 8482a990b0bb..9e82cb391dea 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -443,8 +443,10 @@ int udpv4_offload_init(void);
void udp_init(void);
+DECLARE_STATIC_KEY_FALSE(udp_encap_needed_key);
void udp_encap_enable(void);
#if IS_ENABLED(CONFIG_IPV6)
+DECLARE_STATIC_KEY_FALSE(udpv6_encap_needed_key);
void udpv6_encap_enable(void);
#endif