public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Joseph Huang <Joseph.Huang@garmin.com>
Cc: netdev@vger.kernel.org, Nikolay Aleksandrov <razor@blackwall.org>,
	Ido Schimmel <idosch@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Tobias Waldekranz <tobias@waldekranz.com>,
	bridge@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: bridge: Do not offload IGMP/MLD messages
Date: Mon, 7 Jul 2025 16:00:52 +0300	[thread overview]
Message-ID: <20250707130052.wwd7e6fenp7imvy7@skbuf> (raw)
In-Reply-To: <20250701193639.836027-1-Joseph.Huang@garmin.com>

Hi Joseph,

On Tue, Jul 01, 2025 at 03:36:38PM -0400, Joseph Huang wrote:
> Do not offload IGMP/MLD messages as it could lead to IGMP/MLD Reports
> being unintentionally flooded to Hosts. Instead, let the bridge decide
> where to send these IGMP/MLD messages.
> 
> Fixes: 472111920f1c ("net: bridge: switchdev: allow the TX data plane forwarding to be offloaded")
> Signed-off-by: Joseph Huang <Joseph.Huang@garmin.com>
> ---
>  net/bridge/br_switchdev.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c
> index 95d7355a0407..757c34bf5931 100644
> --- a/net/bridge/br_switchdev.c
> +++ b/net/bridge/br_switchdev.c
> @@ -18,7 +18,8 @@ static bool nbp_switchdev_can_offload_tx_fwd(const struct net_bridge_port *p,
>                 return false;
> 
>         return (p->flags & BR_TX_FWD_OFFLOAD) &&
> -              (p->hwdom != BR_INPUT_SKB_CB(skb)->src_hwdom);
> +              (p->hwdom != BR_INPUT_SKB_CB(skb)->src_hwdom) &&
> +              !br_multicast_igmp_type(skb);
>  }
> 
>  bool br_switchdev_frame_uses_tx_fwd_offload(struct sk_buff *skb)
> --
> 2.49.0
>

Can you please incorporate the extra clarifications made to Tobias in
the commit message? They provide valuable background.

Also, keeping in mind I have no experience with IGMP/MLD snooping:
aren't there IGMP/MLD messages which should be delivered to all hosts?
Are you looking for BR_INPUT_SKB_CB_MROUTERS_ONLY(skb) as a substitute
to br_multicast_igmp_type() instead?

  parent reply	other threads:[~2025-07-07 13:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01 19:36 [PATCH net] net: bridge: Do not offload IGMP/MLD messages Joseph Huang
2025-07-02  8:41 ` Tobias Waldekranz
2025-07-02 14:58   ` Joseph Huang
2025-07-07 13:00 ` Vladimir Oltean [this message]
2025-07-07 16:49   ` Joseph Huang

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=20250707130052.wwd7e6fenp7imvy7@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=Joseph.Huang@garmin.com \
    --cc=bridge@lists.linux.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=tobias@waldekranz.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox