diff options
author | Willem de Bruijn <willemb@google.com> | 2018-10-05 17:31:40 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-05 20:52:38 +0200 |
commit | f2e9de210d50187d206989e60bc5a99c2b692209 (patch) | |
tree | 89597b81b0eb9e6ce7318ace7a17ff8ec507c325 /net/ipv4/udp.c | |
parent | gigaset: asyncdata: mark expected switch fall-throughs (diff) | |
download | linux-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 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 2 |
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); |