All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 net-next 0/5] bridge: dsa: switchdev: mv88e6xxx: Implement bridge flood flags
@ 2022-03-17  6:50 Mattias Forsblad
  2022-03-17  6:50 ` [PATCH 1/5] switchdev: Add local_receive attribute Mattias Forsblad
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Mattias Forsblad @ 2022-03-17  6:50 UTC (permalink / raw)
  To: netdev
  Cc: David S . Miller, Jakub Kicinski, Andrew Lunn, Florian Fainelli,
	Vivien Didelot, Roopa Prabhu, Tobias Waldekranz,
	Mattias Forsblad

Greetings,

This series implements new bridge flood flags
{flood,mcast_flood,bcast_flood}
and HW offloading for Marvell mv88e6xxx.

When using a non-VLAN filtering bridge we want to be able to limit
traffic to the CPU port to lessen the CPU load. This is specially
important when we have disabled learning on user ports.

A sample configuration could be something like this:

       br0
      /   \
   swp0   swp1

ip link add dev br0 type bridge stp_state 0 vlan_filtering 0
ip link set swp0 master br0
ip link set swp1 master br0
ip link set swp0 type bridge_slave learning off
ip link set swp1 type bridge_slave learning off
ip link set swp0 up
ip link set swp1 up
ip link set br0 type bridge flood 0 mcast_flood 0 bcast_flood 0
ip link set br0 up

To further explain the reasoning for this please refer to post by
Tobias Waldekranz:
https://lore.kernel.org/netdev/87ilsxo052.fsf@waldekranz.com/

The first part(1,2) of the series implements the flags for the SW bridge
and the second part(3) the DSA infrastructure. Part (4) implements
offloading of this flag to HW for mv88e6xxx, which uses the
port vlan table to restrict the ingress from user ports
to the CPU port when all of the flag is cleared. Part (5) adds
selftests for these flags.

v2 -> v3:
  - Fixed compile warnings (Jakub Kicinski, lkp@intel.com)
  
v1 -> v2:
  - Split patch series in a more consistent way (Ido Shimmel)
  - Drop sysfs implementation (Ido, Nikolay Aleksandrov)
  - Change to use the boolopt API (Nikolay)
  - Drop ioctl implementation (Nikolay)
  - Split and rename local_receive to match bridge_slave
    {flood,mcast_flood,bcast_flood} (Ido)
  - Only handle the flags at apropiate places in the hot-path (Ido)
  - Add selftest (Ido)
  
Mattias Forsblad (5):
  switchdev: Add local_receive attribute
  net: bridge: Implement bridge flood flag
  dsa: Handle the flood flag in the DSA layer.
  mv88e6xxx: Offload the flood flag
  selftest: Add bridge flood flag tests

 drivers/net/dsa/mv88e6xxx/chip.c              |  45 ++++-
 include/linux/if_bridge.h                     |   6 +
 include/net/dsa.h                             |   7 +
 include/net/switchdev.h                       |   1 +
 include/uapi/linux/if_bridge.h                |   9 +-
 net/bridge/br.c                               |  46 +++++
 net/bridge/br_device.c                        |   3 +
 net/bridge/br_input.c                         |  23 ++-
 net/bridge/br_private.h                       |   4 +
 net/dsa/dsa_priv.h                            |   2 +
 net/dsa/slave.c                               |  18 ++
 .../testing/selftests/net/forwarding/Makefile |   1 +
 .../selftests/net/forwarding/bridge_flood.sh  | 169 ++++++++++++++++++
 tools/testing/selftests/net/forwarding/lib.sh |   8 +
 14 files changed, 335 insertions(+), 7 deletions(-)
 create mode 100755 tools/testing/selftests/net/forwarding/bridge_flood.sh

-- 
2.25.1


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

end of thread, other threads:[~2022-03-31 15:00 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17  6:50 [PATCH v3 net-next 0/5] bridge: dsa: switchdev: mv88e6xxx: Implement bridge flood flags Mattias Forsblad
2022-03-17  6:50 ` [PATCH 1/5] switchdev: Add local_receive attribute Mattias Forsblad
2022-03-17  6:50 ` [PATCH 2/5] net: bridge: Implement bridge flood flag Mattias Forsblad
2022-03-17  9:07   ` Joachim Wiberg
2022-03-17 10:30     ` Nikolay Aleksandrov
2022-03-17 11:39     ` Mattias Forsblad
2022-03-17 11:42       ` Nikolay Aleksandrov
2022-03-17 12:26         ` Ido Schimmel
2022-03-17 13:34           ` Tobias Waldekranz
2022-03-17 14:10             ` Ido Schimmel
2022-03-17 16:02               ` Tobias Waldekranz
2022-03-17 10:11   ` Nikolay Aleksandrov
2022-03-17 10:32     ` Nikolay Aleksandrov
2022-03-17 11:15     ` Vladimir Oltean
2022-03-17 11:57       ` Vladimir Oltean
2022-03-17 11:59         ` Vladimir Oltean
2022-03-17 12:08           ` Mattias Forsblad
2022-03-17  6:50 ` [PATCH 3/5] dsa: Handle the flood flag in the DSA layer Mattias Forsblad
2022-03-17  6:50 ` [PATCH 4/5] mv88e6xxx: Offload the flood flag Mattias Forsblad
2022-03-17 13:05   ` Vladimir Oltean
2022-03-31  8:11     ` Tobias Waldekranz
2022-03-31 15:00       ` Vladimir Oltean
2022-03-17  6:50 ` [PATCH 5/5] selftest: Add bridge flood flag tests Mattias Forsblad

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.