From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8B48433A8; Tue, 22 Jul 2025 13:49:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753192161; cv=none; b=a3uobISKLqMoW/eSJZXKLlJCcV2+obK5Aiuwzy2gyOQzxPlEoV63NLDYlxkXbF0WjKVBZMPpGAi6J/iy6JCh/3/YAgJryLirv55eFIKTNPlrufxHlRpJXCVtueJYR7FBZHIIUC/fvu2DlLiwMSerTHNSp0V8589h2GFtTlYjnJc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753192161; c=relaxed/simple; bh=jsb1Y3GPeB0MNPYWLpX96TC1cberxXW0J3coibOiZr4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JX6GL3xJpZPHANOUH+FrRsa8T8QKXk+XJ8aX+vBaxLzOskLwL6of9WboheWcRw325P2wp6AukEuv81owlhkpOPH7l2sIIAp+alMgO+KdWuxZyq3TpIBoZpM6GpJJ62mlZoNA2j8vs08K9Md1uSRMkmdUXH/53LVG/2zrLpGC1xw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XCsXTk1N; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="XCsXTk1N" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C8F3C4CEEB; Tue, 22 Jul 2025 13:49:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753192161; bh=jsb1Y3GPeB0MNPYWLpX96TC1cberxXW0J3coibOiZr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XCsXTk1NT+Vtrh9wXyikD4GqHR1AIyeX98d/YnHjdVH/aGIlBThomXKEg7f0Y/+cU ppqvxCE0v1nrmi9dX6pXKxEyH8O9+Si6fR5pycyD3PDB4MruVbIHUN3S7kFt9iThim isGu3KV9KV1Qzoy60dvRnSBcfNt5HgS+t4c2fRqI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Joseph Huang , Nikolay Aleksandrov , Ido Schimmel , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.1 63/79] net: bridge: Do not offload IGMP/MLD messages Date: Tue, 22 Jul 2025 15:44:59 +0200 Message-ID: <20250722134330.689931332@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250722134328.384139905@linuxfoundation.org> References: <20250722134328.384139905@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Joseph Huang [ Upstream commit 683dc24da8bf199bb7446e445ad7f801c79a550e ] 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. Consider the case where the local host is sending out reports in response to a remote querier like the following: mcast-listener-process (IP_ADD_MEMBERSHIP) \ br0 / \ swp1 swp2 | | QUERIER SOME-OTHER-HOST In the above setup, br0 will want to br_forward() reports for mcast-listener-process's group(s) via swp1 to QUERIER; but since the source hwdom is 0, the report is eligible for tx offloading, and is flooded by hardware to both swp1 and swp2, reaching SOME-OTHER-HOST as well. (Example and illustration provided by Tobias.) Fixes: 472111920f1c ("net: bridge: switchdev: allow the TX data plane forwarding to be offloaded") Signed-off-by: Joseph Huang Acked-by: Nikolay Aleksandrov Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20250716153551.1830255-1-Joseph.Huang@garmin.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/bridge/br_switchdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c index b61ef2dff7a4b..a0974374bf717 100644 --- a/net/bridge/br_switchdev.c +++ b/net/bridge/br_switchdev.c @@ -17,6 +17,9 @@ static bool nbp_switchdev_can_offload_tx_fwd(const struct net_bridge_port *p, if (!static_branch_unlikely(&br_switchdev_tx_fwd_offload)) return false; + if (br_multicast_igmp_type(skb)) + return false; + return (p->flags & BR_TX_FWD_OFFLOAD) && (p->hwdom != BR_INPUT_SKB_CB(skb)->src_hwdom); } -- 2.39.5