diff options
author | Willem de Bruijn <willemb@google.com> | 2018-10-05 11:31:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-05 11:52:38 -0700 |
commit | f2e9de210d50187d206989e60bc5a99c2b692209 (patch) | |
tree | 89597b81b0eb9e6ce7318ace7a17ff8ec507c325 /net/ipv6/udp.c | |
parent | 2b9156129f8ee7312287c4826fe4c34a5402d74e (diff) | |
download | linux-stable-f2e9de210d50187d206989e60bc5a99c2b692209.tar.gz linux-stable-f2e9de210d50187d206989e60bc5a99c2b692209.tar.bz2 linux-stable-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 'net/ipv6/udp.c')
-rw-r--r-- | net/ipv6/udp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 28c4aa5078fc..374e7d302f26 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -548,7 +548,7 @@ static __inline__ void udpv6_err(struct sk_buff *skb, __udp6_lib_err(skb, opt, type, code, offset, info, &udp_table); } -static DEFINE_STATIC_KEY_FALSE(udpv6_encap_needed_key); +DEFINE_STATIC_KEY_FALSE(udpv6_encap_needed_key); void udpv6_encap_enable(void) { static_branch_enable(&udpv6_encap_needed_key); |