Re: [PATCH net] net: bridge: Do not offload IGMP/MLD messages
From: Vladimir Oltean
Date: Mon Jul 07 2025 - 09:01:33 EST
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@xxxxxxxxxx>
> ---
> 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?