diff options
author | Eric Dumazet <edumazet@google.com> | 2023-09-12 09:17:27 +0000 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-09-14 16:16:36 +0200 |
commit | ac9a7f4ce5dda1472e8f44096f33066c6ec1a3b4 (patch) | |
tree | 70a7b9065ac78d7a5825886380984469fab4ca28 /net/ipv6/udp.c | |
parent | f5f52f0884a595ff99ab1a608643fe4025fca2d5 (diff) |
udp: lockless UDP_ENCAP_L2TPINUDP / UDP_GRO
Move udp->encap_enabled to udp->udp_flags.
Add udp_test_and_set_bit() helper to allow lockless
udp_tunnel_encap_enable() implementation.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
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 2c3281879b6d..90688877e900 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -1670,7 +1670,7 @@ void udpv6_destroy_sock(struct sock *sk) if (encap_destroy) encap_destroy(sk); } - if (up->encap_enabled) { + if (udp_test_bit(ENCAP_ENABLED, sk)) { static_branch_dec(&udpv6_encap_needed_key); udp_encap_disable(); } |