From: Nikolay Aleksandrov <nikolay@nvidia.com> To: <netdev@vger.kernel.org> Cc: <roopa@nvidia.com>, <davem@davemloft.net>, <bridge@lists.linux-foundation.org>, <kuba@kernel.org>, Nikolay Aleksandrov <nikolay@nvidia.com> Subject: [PATCH net v2] net: bridge: mcast: fix br_multicast_ctx_vlan_global_disabled helper Date: Tue, 28 Dec 2021 17:31:42 +0200 [thread overview] Message-ID: <20211228153142.536969-1-nikolay@nvidia.com> (raw) In-Reply-To: <20211228152811.534521-1-nikolay@nvidia.com> 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 <nikolay@nvidia.com> --- v2: fix indentation warning by checkpatch net/bridge/br_private.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 2187a0c3fd22..e8c6ee322c71 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -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 -- 2.33.1
WARNING: multiple messages have this Message-ID (diff)
From: Nikolay Aleksandrov <nikolay@nvidia.com> To: netdev@vger.kernel.org Cc: Nikolay Aleksandrov <nikolay@nvidia.com>, kuba@kernel.org, bridge@lists.linux-foundation.org, davem@davemloft.net, roopa@nvidia.com Subject: [Bridge] [PATCH net v2] net: bridge: mcast: fix br_multicast_ctx_vlan_global_disabled helper Date: Tue, 28 Dec 2021 17:31:42 +0200 [thread overview] Message-ID: <20211228153142.536969-1-nikolay@nvidia.com> (raw) In-Reply-To: <20211228152811.534521-1-nikolay@nvidia.com> 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 <nikolay@nvidia.com> --- v2: fix indentation warning by checkpatch net/bridge/br_private.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 2187a0c3fd22..e8c6ee322c71 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -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 -- 2.33.1
next prev parent reply other threads:[~2021-12-28 15:32 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-28 15:28 [PATCH net] net: bridge: mcast: fix br_multicast_ctx_vlan_global_disabled helper Nikolay Aleksandrov 2021-12-28 15:28 ` [Bridge] " Nikolay Aleksandrov 2021-12-28 15:31 ` Nikolay Aleksandrov [this message] 2021-12-28 15:31 ` [Bridge] [PATCH net v2] " Nikolay Aleksandrov 2021-12-30 2:00 ` patchwork-bot+netdevbpf 2021-12-30 2:00 ` [Bridge] " patchwork-bot+netdevbpf
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211228153142.536969-1-nikolay@nvidia.com \ --to=nikolay@nvidia.com \ --cc=bridge@lists.linux-foundation.org \ --cc=davem@davemloft.net \ --cc=kuba@kernel.org \ --cc=netdev@vger.kernel.org \ --cc=roopa@nvidia.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.