Skip to content

LAG offload for Ocelot DSA switches

Vladimir Oltean netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (refs/heads/master):

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest12 patches 0 repliesApplied 12/12
  2. v214 patches 7 repliesSuperseded

Patches in v3 All 12 applied

#Subject and filesSizeRepliesApplied
1/12net: mscc: ocelot: rename ocelot_netdevice_port_event to ocelot_netdevice_changeupperdrivers/net/ethernet/mscc/ocelot_net.c+27 -320 repliesApplied
2/12net: mscc: ocelot: use a switch-case statement in ocelot_netdevice_eventdrivers/net/ethernet/mscc/ocelot_net.c+45 -230 repliesApplied
3/12net: mscc: ocelot: don't refuse bonding interfaces we can't offloaddrivers/net/ethernet/mscc/ocelot.c drivers/net/ethernet/mscc/ocelot.h drivers/net/ethernet/mscc/ocelot_net.c+17 -280 repliesApplied
4/12net: mscc: ocelot: use ipv6 in the aggregation codedrivers/net/ethernet/mscc/ocelot.c+4 -10 repliesApplied
5/12net: mscc: ocelot: set up the bonding mask in a way that avoids a net_devicedrivers/net/ethernet/mscc/ocelot.c include/soc/mscc/ocelot.h+24 -70 repliesApplied
6/12net: mscc: ocelot: avoid unneeded "lp" variable in LAG joindrivers/net/ethernet/mscc/ocelot.c+6 -100 repliesApplied
7/12net: mscc: ocelot: set up logical port IDs centrallydrivers/net/ethernet/mscc/ocelot.c+28 -190 repliesApplied
8/12net: mscc: ocelot: drop the use of the "lags" arraydrivers/net/ethernet/mscc/ocelot.c include/soc/mscc/ocelot.h+39 -580 repliesApplied
9/12net: mscc: ocelot: rename aggr_count to num_ports_in_lagdrivers/net/ethernet/mscc/ocelot.c+3 -40 repliesApplied
10/12net: mscc: ocelot: rebalance LAGs on link up/down eventsdrivers/net/ethernet/mscc/ocelot.c drivers/net/ethernet/mscc/ocelot.h drivers/net/ethernet/mscc/ocelot_net.c +1 more+64 -90 repliesApplied
11/12net: dsa: make assisted_learning_on_cpu_port bypass offloaded LAG interfacesnet/dsa/dsa_priv.h net/dsa/slave.c+21 -00 repliesApplied
12/12net: dsa: felix: propagate the LAG offload ops towards the ocelot libdrivers/net/dsa/ocelot/felix.c drivers/net/ethernet/mscc/ocelot.h include/soc/mscc/ocelot.h+38 -60 repliesApplied

Reviews trailers per patch

5 of 12 patches have a Reviewed-by or Acked-by.

PatchAlexandre Belloni
1/12
2/12R-b
3/12R-b
4/12R-b
5/12R-b
6/12R-b
7/12
8/12
9/12
10/12
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH RESEND v3 net-next 00/12] LAG offload for Ocelot DSA switches

From: Vladimir Oltean <[email protected]>

This patch series reworks the ocelot switchdev driver such that it could share the same implementation for LAG offload as the felix DSA driver.

Testing has been done in the following topology:

         +----------------------------------+
         | Board 1         br0              |
         |             +---------+          |
         |            /           \         |
         |            |           |         |
         |            |         bond0       |
         |            |        +-----+      |
         |            |       /       \     |
         |  eno0     swp0    swp1    swp2   |
         +---|--------|-------|-------|-----+
             |        |       |       |
             +--------+       |       |
               Cable          |       |
                         Cable|       |Cable
               Cable          |       |
             +--------+       |       |
             |        |       |       |
         +---|--------|-------|-------|-----+
         |  eno0     swp0    swp1    swp2   |
         |            |       \       /     |
         |            |        +-----+      |
         |            |         bond0       |
         |            |           |         |
         |            \           /         |
         |             +---------+          |
         | Board 2         br0              |
         +----------------------------------+

The same script can be run on both Board 1 and Board 2 to set this up:

ip link del bond0
ip link add bond0 type bond mode balance-xor miimon 1
OR
ip link add bond0 type bond mode 802.3ad
ip link set swp1 down && ip link set swp1 master bond0 && ip link set swp1 up ip link set swp2 down && ip link set swp2 master bond0 && ip link set swp2 up ip link del br0
ip link add br0 type bridge
ip link set bond0 master br0
ip link set swp0 master br0

Then traffic can be tested between eno0 of Board 1 and eno0 of Board 2.

Vladimir Oltean (12):
net: mscc: ocelot: rename ocelot_netdevice_port_event to
ocelot_netdevice_changeupper
net: mscc: ocelot: use a switch-case statement in
ocelot_netdevice_event
net: mscc: ocelot: don't refuse bonding interfaces we can't offload
net: mscc: ocelot: use ipv6 in the aggregation code
net: mscc: ocelot: set up the bonding mask in a way that avoids a
net_device
net: mscc: ocelot: avoid unneeded "lp" variable in LAG join
net: mscc: ocelot: set up logical port IDs centrally
net: mscc: ocelot: drop the use of the "lags" array
net: mscc: ocelot: rename aggr_count to num_ports_in_lag
net: mscc: ocelot: rebalance LAGs on link up/down events
net: dsa: make assisted_learning_on_cpu_port bypass offloaded LAG
interfaces
net: dsa: felix: propagate the LAG offload ops towards the ocelot lib

 drivers/net/dsa/ocelot/felix.c         |  32 ++++
 drivers/net/ethernet/mscc/ocelot.c     | 206 ++++++++++++++-----------
 drivers/net/ethernet/mscc/ocelot.h     |   4 -
 drivers/net/ethernet/mscc/ocelot_net.c | 131 ++++++++++------
 include/soc/mscc/ocelot.h              |  11 +-
 net/dsa/dsa_priv.h                     |  13 ++
 net/dsa/slave.c                        |   8 +
 7 files changed, 262 insertions(+), 143 deletions(-)
Signature · 1 line
2.25.1