aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2018-10-05 11:31:40 -0400
committerDavid S. Miller <davem@davemloft.net>2018-10-05 11:52:38 -0700
commitf2e9de210d50187d206989e60bc5a99c2b692209 (patch)
tree89597b81b0eb9e6ce7318ace7a17ff8ec507c325 /net/ipv4/udp.c
parentgigaset: asyncdata: mark expected switch fall-throughs (diff)
downloadlinux-dev-f2e9de210d50187d206989e60bc5a99c2b692209.tar.xz
linux-dev-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 '')
-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 5fc4beb1c336..1bec2203d558 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1889,7 +1889,7 @@ static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
return 0;
}
-static DEFINE_STATIC_KEY_FALSE(udp_encap_needed_key);
+DEFINE_STATIC_KEY_FALSE(udp_encap_needed_key);
void udp_encap_enable(void)
{
static_branch_enable(&udp_encap_needed_key);