Skip to content

Software fallback for bridging in DSA

Vladimir Oltean netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net: dsa: don't offload switchdev objects on ports that don't offload the bridgenet/dsa/dsa_priv.h net/dsa/slave.c net/dsa/switch.c+12 -21 reply
2/4net: dsa: reject switchdev objects centrally from dsa_slave_port_obj_{add,del}net/dsa/slave.c+6 -101 reply
3/4net: dsa: return -EOPNOTSUPP if .port_lag_join is not implementednet/dsa/switch.c+5 -11 reply
4/4net: dsa: don't set skb->offload_fwd_mark when not offloading the bridgenet/dsa/dsa_priv.h net/dsa/tag_brcm.c net/dsa/tag_dsa.c +9 more+32 -164 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchTobias Waldekranz
1/4R-b
2/4R-b
3/4R-b
4/4R-b

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

Read the v1 thread

Cover letter [PATCH net-next 0/4] Software fallback for bridging in DSA

From: Vladimir Oltean <[email protected]>

As was discussed here:
https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/

it is desirable to not reject a LAG interface (bonding, team) even if the switch isn't able to offload bridging towards that link aggregation group. At least the DSA setups I have are not that unbalanced between the horsepower of the CPU and the horsepower of the switch such that software forwarding to be completely impractical.

This series makes all switch drivers theoretically able to do the right thing when they are configured in a way similar to this (credits to Tobias Waldekranz for the drawing):

      br0
     /   \

team0 \
/ \ \
swp0 swp1 swp2

although in practice there is one more prerequisite: for software fallback mode, they need to disable address learning. It is preferable that they do this by implementing the .port_pre_bridge_join and .port_bridge_join methods.

Vladimir Oltean (4):
net: dsa: don't offload switchdev objects on ports that don't offload
the bridge
net: dsa: reject switchdev objects centrally from

    dsa_slave_port_obj_{add,del}

net: dsa: return -EOPNOTSUPP if .port_lag_join is not implemented
net: dsa: don't set skb->offload_fwd_mark when not offloading the
bridge

 net/dsa/dsa_priv.h         | 16 ++++++++++++++++
 net/dsa/slave.c            | 21 +++++++++++----------
 net/dsa/switch.c           | 13 ++++++++++---
 net/dsa/tag_brcm.c         |  2 +-
 net/dsa/tag_dsa.c          |  9 +++++----
 net/dsa/tag_hellcreek.c    |  2 +-
 net/dsa/tag_ksz.c          |  2 +-
 net/dsa/tag_lan9303.c      |  4 +++-
 net/dsa/tag_mtk.c          |  2 +-
 net/dsa/tag_ocelot.c       |  2 +-
 net/dsa/tag_ocelot_8021q.c |  2 +-
 net/dsa/tag_rtl4_a.c       |  2 +-
 net/dsa/tag_sja1105.c      |  4 ++--
 net/dsa/tag_xrs700x.c      |  3 +--
 14 files changed, 55 insertions(+), 29 deletions(-)
Signature · 1 line
2.25.1