diff options
author | Nikolay Aleksandrov <nikolay@nvidia.com> | 2021-08-10 17:29:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-11 14:34:41 +0200 |
commit | 4d5b4e84c72451face4d7817697684196cbee50d (patch) | |
tree | 399745a08b826682d4da6fdf78c74449b9a25511 /net/bridge/br_private.h | |
parent | net: bridge: vlan: add support for mcast startup query interval global option (diff) | |
download | linux-4d5b4e84c72451face4d7817697684196cbee50d.tar.xz linux-4d5b4e84c72451face4d7817697684196cbee50d.zip |
net: bridge: mcast: move querier state to the multicast context
We need to have the querier state per multicast context in order to have
per-vlan control, so remove the internal option bit and move it to the
multicast context. Also annotate the lockless reads of the new variable.
Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_private.h')
-rw-r--r-- | net/bridge/br_private.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 8dde124d0464..b85203e8eb26 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -118,6 +118,7 @@ struct net_bridge_mcast { u32 multicast_last_member_count; u32 multicast_startup_query_count; + u8 multicast_querier; u8 multicast_igmp_version; u8 multicast_router; #if IS_ENABLED(CONFIG_IPV6) @@ -431,7 +432,6 @@ enum net_bridge_opts { BROPT_NF_CALL_ARPTABLES, BROPT_GROUP_ADDR_SET, BROPT_MULTICAST_ENABLED, - BROPT_MULTICAST_QUERIER, BROPT_MULTICAST_QUERY_USE_IFADDR, BROPT_MULTICAST_STATS_ENABLED, BROPT_HAS_IPV6_ADDR, @@ -1028,7 +1028,7 @@ __br_multicast_querier_exists(struct net_bridge_mcast *brmctx, { bool own_querier_enabled; - if (br_opt_get(brmctx->br, BROPT_MULTICAST_QUERIER)) { + if (READ_ONCE(brmctx->multicast_querier)) { if (is_ipv6 && !br_opt_get(brmctx->br, BROPT_HAS_IPV6_ADDR)) own_querier_enabled = false; else |