net: bridge: mcast: fix br_multicast_ctx_vlan_global_disabled helper
Subsystems (3)
PATCH 1/1 net: bridge: mcast: fix br_multicast_ctx_vlan_global_disabled helper
We need to first check if the context is a vlan one, then we need to check the global bridge multicast vlan snooping flag, and finally the vlan's multicast flag, otherwise we will unnecessarily enable vlan mcast processing (e.g. querier timers).
--- net/bridge/br_private.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
net/bridge/br_private.h +3 -3
@@ -1153,9 +1153,9 @@ br_multicast_port_ctx_get_global(const struct net_bridge_mcast_port *pmctx)static inline bool br_multicast_ctx_vlan_global_disabled (const struct net_bridge_mcast *brmctx) { -return br_opt_get (brmctx->br,BROPT_MCAST_VLAN_SNOOPING_ENABLED ) && -br_multicast_ctx_is_vlan (brmctx) && - !(brmctx->vlan->priv_flags &BR_VLFLAG_GLOBAL_MCAST_ENABLED ); +return br_multicast_ctx_is_vlan (brmctx) && + (!br_opt_get (brmctx->br,BROPT_MCAST_VLAN_SNOOPING_ENABLED ) || + !(brmctx->vlan->priv_flags &BR_VLFLAG_GLOBAL_MCAST_ENABLED )); } static inline bool
Signature · 1 line
2.33.1
PATCH v2 1/1 net: bridge: mcast: fix br_multicast_ctx_vlan_global_disabled helper
We need to first check if the context is a vlan one, then we need to check the global bridge multicast vlan snooping flag, and finally the vlan's multicast flag, otherwise we will unnecessarily enable vlan mcast processing (e.g. querier timers).
---
v2: fix indentation warning by checkpatch
net/bridge/br_private.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
net/bridge/br_private.h +3 -3
@@ -1153,9 +1153,9 @@ br_multicast_port_ctx_get_global(const struct net_bridge_mcast_port *pmctx)static inline bool br_multicast_ctx_vlan_global_disabled (const struct net_bridge_mcast *brmctx) { -return br_opt_get (brmctx->br,BROPT_MCAST_VLAN_SNOOPING_ENABLED ) && -br_multicast_ctx_is_vlan (brmctx) && - !(brmctx->vlan->priv_flags &BR_VLFLAG_GLOBAL_MCAST_ENABLED ); +return br_multicast_ctx_is_vlan (brmctx) && + (!br_opt_get (brmctx->br,BROPT_MCAST_VLAN_SNOOPING_ENABLED ) || + !(brmctx->vlan->priv_flags &BR_VLFLAG_GLOBAL_MCAST_ENABLED )); } static inline bool
Signature · 1 line
2.33.1
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Tue, 28 Dec 2021 17:31:42 +0200 you wrote:
We need to first check if the context is a vlan one, then we need to check the global bridge multicast vlan snooping flag, and finally the vlan's multicast flag, otherwise we will unnecessarily enable vlan mcast processing (e.g. querier timers).
Fixes 7b54aaaf53cb ("net: bridge: multicast: add vlan state initialization and control")Signed-off-by Nikolay Aleksandrov <[email protected]>[...]
Here is the summary with links:
- [net,v2] net: bridge: mcast: fix br_multicast_ctx_vlan_global_disabled helper
https://git.kernel.org/netdev/net/c/168fed986b3a
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html