ipv6: lockless IPV6_MULTICAST_LOOP implementation
authorEric Dumazet <edumazet@google.com>
Tue, 12 Sep 2023 16:02:00 +0000 (16:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Sep 2023 09:33:46 +0000 (10:33 +0100)
commitd986f52124e062753e33b6fe303be5904a997eac
treee565543f2059fbdeb5f97f5383941fe6f4b42869
parentb0adfba7ee770fef20b1b6d86706c28f7fccfb07
ipv6: lockless IPV6_MULTICAST_LOOP implementation

Add inet6_{test|set|clear|assign}_bit() helpers.

Note that I am using bits from inet->inet_flags,
this might change in the future if we need more flags.

While solving data-races accessing np->mc_loop,
this patch also allows to implement lockless accesses
to np->mcast_hops in the following patch.

Also constify sk_mc_loop() argument.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ipv6.h
include/net/inet_sock.h
include/net/sock.h
net/core/sock.c
net/ipv6/af_inet6.c
net/ipv6/ipv6_sockglue.c
net/ipv6/ndisc.c
net/netfilter/ipvs/ip_vs_sync.c