Skip to content

net: dsa: management mode for bcm_sf2

Florian Fainelli netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest12 patches 15 repliesIn review
  2. v114 patches 23 repliesSuperseded

Changes in v2 from the cover letter

- correctly propagate return from br_mc_disabled_update() called from br_multicast_toggle

- dropped changes to VLAN and bridge code that was pushing multicast entries with VID and instead refuse disabling multicast snooping in b53 when there is another standalone port, or that there are other bridged ports with multicast snooping enabled

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12net: bridge: multicast: Propagate br_mc_disabled_update() returnnet/bridge/br_multicast.c+16 -76 replies
2/12net: dsa: b53: Fix default VLAN IDdrivers/net/dsa/b53/b53_common.c+16 -130 replies
3/12net: dsa: b53: Properly account for VLAN filteringdrivers/net/dsa/b53/b53_common.c drivers/net/dsa/b53/b53_priv.h+57 -50 replies
4/12net: systemport: Fix reception of BPDUsdrivers/net/ethernet/broadcom/bcmsysport.c+4 -00 replies
5/12net: dsa: b53: Define registers for IGMP snoopingdrivers/net/dsa/b53/b53_regs.h+22 -00 replies
6/12net: dsa: b53: Add support for MDBdrivers/net/dsa/b53/b53_common.c drivers/net/dsa/b53/b53_priv.h+67 -30 replies
7/12net: dsa: Add ability to program multicast filter for CPU portnet/dsa/slave.c+50 -02 replies
8/12net: dsa: Add ndo_vlan_rx_{add,kill}_vid implementationnet/dsa/port.c net/dsa/slave.c+62 -31 reply
9/12net: dsa: Make VLAN filtering use DSA notifiersnet/dsa/dsa_priv.h net/dsa/port.c net/dsa/switch.c+46 -110 replies
10/12net: dsa: Wire up multicast IGMP snooping attribute notificationinclude/net/dsa.h net/dsa/dsa_priv.h net/dsa/port.c +2 more+58 -04 replies
11/12net: dsa: b53: Add support for toggling IGMP snoopingdrivers/net/dsa/b53/b53_common.c drivers/net/dsa/b53/b53_priv.h+70 -00 replies
12/12net: dsa: bcm_sf2: Enable management modedrivers/net/dsa/b53/b53_common.c drivers/net/dsa/b53/b53_priv.h drivers/net/dsa/bcm_sf2.c +1 more+84 -170 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH net-next v2 00/12] net: dsa: management mode for bcm_sf2

Hi all,

This patch series does a number of things in order to enable management mode for bcm_sf2 (which could be easily extended to b53 with proper testing later on). In order to get there, there were several use cases that did not work correctly and that needed to be fixed:

- VLAN devices on top of switch ports not being member of a bridge, with other switch ports being bridged, with the bridge having VLAN filtering enabled.

- lack of multicast filtering by default on network ports which should be happening in order for the non-bridged DSA ports to behave strictly as Ethernet NICs with proper filering. This is accomplished by hooking a ndo_set_rx_mode() function to the DSA slave network devices

- when VLAN filtering is globally enabled on the switch (because at least a bridge device requires it), then we also need to make sure that when doing multicast over VLAN devices over a switch port (bridged or not) happens with the correct MDB address *and* VID

Hopefully the changes to net/8021q and net/bridge are deemed acceptable.

The Broadcom switches have a switch-wide VLAN filtering attribute, which is why we must always make sure there is a valid VLAN entry even for switch ports which are not part of a bridge device, yet there is at least one bridge device spanning the switch.

Multicast flooding can be done on a per-port basis, including for the CPU/management port, however, once multicast reception is enabled on the CPU port, it bypasses the ARL (Address Resolution Logic), so we receive *all* multicast, even from ports do not have their flooding bit set, which is unfortunate. This is the reason why we must continue adding enough HOST_MDB notifications to let the CPU port continue to filter multicast traffic.

Changes in v2:

- correctly propagate return from br_mc_disabled_update() called from br_multicast_toggle

- dropped changes to VLAN and bridge code that was pushing multicast entries with VID and instead refuse disabling multicast snooping in b53 when there is another standalone port, or that there are other bridged ports with multicast snooping enabled

Florian Fainelli (12):
net: bridge: multicast: Propagate br_mc_disabled_update() return
net: dsa: b53: Fix default VLAN ID
net: dsa: b53: Properly account for VLAN filtering
net: systemport: Fix reception of BPDUs
net: dsa: b53: Define registers for IGMP snooping
net: dsa: b53: Add support for MDB
net: dsa: Add ability to program multicast filter for CPU port
net: dsa: Add ndo_vlan_rx_{add,kill}_vid implementation
net: dsa: Make VLAN filtering use DSA notifiers
net: dsa: Wire up multicast IGMP snooping attribute notification
net: dsa: b53: Add support for toggling IGMP snooping
net: dsa: bcm_sf2: Enable management mode

 drivers/net/dsa/b53/b53_common.c           | 257 +++++++++++++++++++--
 drivers/net/dsa/b53/b53_priv.h             |  14 +-
 drivers/net/dsa/b53/b53_regs.h             |  22 ++
 drivers/net/dsa/bcm_sf2.c                  |  56 +++--
 drivers/net/dsa/bcm_sf2_regs.h             |   5 +
 drivers/net/ethernet/broadcom/bcmsysport.c |   4 +
 include/net/dsa.h                          |   2 +
 net/bridge/br_multicast.c                  |  23 +-
 net/dsa/dsa_priv.h                         |  22 +-
 net/dsa/port.c                             |  42 +++-
 net/dsa/slave.c                            | 107 ++++++++-
 net/dsa/switch.c                           |  57 +++++
 12 files changed, 552 insertions(+), 59 deletions(-)
Signature · 1 line
2.17.1