All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] net: bridge: propagate safe mcast snooping to switchdev + DSA
@ 2025-05-22 19:17 Linus Lüssing
  2025-05-22 19:17 ` [PATCH net-next 1/5] net: bridge: mcast: explicitly track active state Linus Lüssing
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Linus Lüssing @ 2025-05-22 19:17 UTC (permalink / raw)
  To: bridge
  Cc: netdev, openwrt-devel, linux-kernel, linux-doc,
	Nikolay Aleksandrov, Ido Schimmel, Ivan Vecera, Jiri Pirko,
	Vladimir Oltean, Andrew Lunn, Jonathan Corbet, Simon Horman,
	Paolo Abeni, Jakub Kicinski, Eric Dumazet, David S . Miller,
	Kuniyuki Iwashima, Stanislav Fomichev, Xiao Liang,
	Markus Stockhausen, Jan Hoffmann, Birger Koblitz, Bjørn Mork

For a plain Linux bridge we have a safety mechanism before applying
multicast snooping to payload IP packets in the fast path: We only apply it
if both multicast snooping is enabled and an active IGMP/MLD querier was
detected. Otherwise we default to flooding IPv4/IPv6 multicast traffic.

This reduces the risk of creating multicast packet loss and by that
packet loss for IPv6 unicast, too, which relies on multicast to work.
Without an active IGMP/MLD querier on the link we are not able to get
IGMP/MLD reports reliably and by that wouldn't have a complete picture
about all multicast listeners.

This safety mechanism was introduced in commit
b00589af3b04 ("bridge: disable snooping if there is no querier").

To be able to use this safty mechanism on DSA/switchdev capable hardware
switches, too, and to ensure that a DSA bridge behaves similar to
a plain software bridge this patchset adds a new variable to track
if multicast snooping is active / safely applicable. And notifies DSA
and switchdev when this changes.

This has been tested on an OpenWrt powered Realtek RTL8382 switch,
a ZyXEL GS1900-24HP v1, with the following, pending patchset for OpenWrt
to integrate this: https://github.com/openwrt/openwrt/pull/18780

Regards, Linus


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [PATCH net-next 3/5] net: bridge: mcast: check if snooping is enabled for active state
@ 2025-05-25  8:30 kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2025-05-25  8:30 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250522195952.29265-4-linus.luessing@c0d3.blue>
References: <20250522195952.29265-4-linus.luessing@c0d3.blue>
TO: "Linus Lüssing" <linus.luessing@c0d3.blue>
TO: bridge@lists.linux.dev
CC: netdev@vger.kernel.org
CC: openwrt-devel@lists.openwrt.org
CC: linux-kernel@vger.kernel.org
CC: linux-doc@vger.kernel.org
CC: Nikolay Aleksandrov <razor@blackwall.org>
CC: Ido Schimmel <idosch@nvidia.com>
CC: Ivan Vecera <ivecera@redhat.com>
CC: Jiri Pirko <jiri@resnulli.us>
CC: Vladimir Oltean <olteanv@gmail.com>
CC: Andrew Lunn <andrew@lunn.ch>
CC: Jonathan Corbet <corbet@lwn.net>
CC: Simon Horman <horms@kernel.org>
CC: Paolo Abeni <pabeni@redhat.com>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Eric Dumazet <edumazet@google.com>
CC: "David S . Miller" <davem@davemloft.net>
CC: Kuniyuki Iwashima <kuniyu@amazon.com>
CC: Stanislav Fomichev <sdf@fomichev.me>
CC: Xiao Liang <shaw.leon@gmail.com>
CC: Markus Stockhausen <markus.stockhausen@gmx.de>
CC: Jan Hoffmann <jan.christian.hoffmann@gmail.com>
CC: Birger Koblitz <git@birger-koblitz.de>
CC: "Bjørn Mork" <bjorn@mork.no>
CC: "Linus Lüssing" <linus.luessing@c0d3.blue>

Hi Linus,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net/main]
[also build test WARNING on linus/master v6.15-rc7 next-20250523]
[cannot apply to net-next/main horms-ipvs/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Linus-L-ssing/net-bridge-mcast-explicitly-track-active-state/20250523-040914
base:   net/main
patch link:    https://lore.kernel.org/r/20250522195952.29265-4-linus.luessing%40c0d3.blue
patch subject: [PATCH net-next 3/5] net: bridge: mcast: check if snooping is enabled for active state
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: parisc-randconfig-r072-20250525 (https://download.01.org/0day-ci/archive/20250525/202505251623.Hwyj2Nam-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 12.4.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202505251623.Hwyj2Nam-lkp@intel.com/

smatch warnings:
net/bridge/br_multicast.c:1416 br_multicast_toggle_enabled() error: uninitialized symbol 'old'.

vim +/old +1416 net/bridge/br_multicast.c

8ef2a9a5985499 YOSHIFUJI Hideaki 2010-04-18  1406  
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1407  static int br_multicast_toggle_enabled(struct net_bridge *br, bool on,
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1408  				       struct netlink_ext_ack *extack)
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1409  {
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1410  	int err, old;
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1411  
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1412  	br_opt_toggle(br, BROPT_MULTICAST_ENABLED, on);
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1413  
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1414  	err = br_multicast_update_active(&br->multicast_ctx, extack);
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1415  	if (err && err != -EOPNOTSUPP) {
f9230cbb1d35c0 Linus Lüssing     2025-05-22 @1416  		br_opt_toggle(br, BROPT_MULTICAST_ENABLED, old);
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1417  		return err;
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1418  	}
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1419  
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1420  	return 0;
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1421  }
f9230cbb1d35c0 Linus Lüssing     2025-05-22  1422  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-05-25 17:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22 19:17 [PATCH net-next 0/5] net: bridge: propagate safe mcast snooping to switchdev + DSA Linus Lüssing
2025-05-22 19:17 ` [PATCH net-next 1/5] net: bridge: mcast: explicitly track active state Linus Lüssing
2025-05-23  9:44   ` kernel test robot
2025-05-25 17:13   ` Ido Schimmel
2025-05-22 19:17 ` [PATCH net-next 2/5] net: bridge: mcast: export ip{4,6}_active state to netlink Linus Lüssing
2025-05-25 17:20   ` Ido Schimmel
2025-05-22 19:17 ` [PATCH net-next 3/5] net: bridge: mcast: check if snooping is enabled for active state Linus Lüssing
2025-05-23 13:02   ` Simon Horman
2025-05-22 19:17 ` [PATCH net-next 4/5] net: bridge: switchdev: notify on mcast active changes Linus Lüssing
2025-05-22 19:17 ` [PATCH net-next 5/5] net: dsa: forward bridge/switchdev mcast active notification Linus Lüssing
2025-05-23  9:24   ` kernel test robot
2025-05-23  9:44   ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2025-05-25  8:30 [PATCH net-next 3/5] net: bridge: mcast: check if snooping is enabled for active state kernel test robot

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.