Skip to content

Port and flow policers for DSA (SJA1105, Felix/Ocelot)

Vladimir Oltean lkml netdev 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 1 replyIn review
  2. v16 patches 6 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6net: mscc: ocelot: add action of police on vcap_is2drivers/net/ethernet/mscc/ocelot_ace.c drivers/net/ethernet/mscc/ocelot_ace.h drivers/net/ethernet/mscc/ocelot_flower.c +3 more+100 -70 replies
2/6net: dsa: refactor matchall mirred action to separate functionnet/dsa/slave.c+40 -300 replies
3/6net: dsa: add port policersinclude/net/dsa.h net/dsa/slave.c+85 -70 replies
4/6net: dsa: felix: add port policersdrivers/net/dsa/ocelot/felix.c drivers/net/ethernet/mscc/ocelot_police.c drivers/net/ethernet/mscc/ocelot_police.h +2 more+36 -110 replies
5/6net: dsa: sja1105: add configuration of port policersdrivers/net/dsa/sja1105/sja1105_main.c+100 -320 replies
6/6net: dsa: sja1105: add broadcast and per-traffic class policersdrivers/net/dsa/sja1105/Makefile drivers/net/dsa/sja1105/sja1105.h drivers/net/dsa/sja1105/sja1105_flower.c +1 more+385 -00 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 net-next 0/6] Port and flow policers for DSA (SJA1105, Felix/Ocelot)

From: Vladimir Oltean <[email protected]>

This series adds support for 2 types of policers:
- port policers, via tc matchall filter
- flow policers, via tc flower filter
for 2 DSA drivers:
- sja1105
- felix/ocelot

First we start with ocelot/felix. Prior to this patch, the ocelot core library currently only supported:
- Port policers
- Flow-based dropping and trapping
But the felix wrapper could not actually use the port policers due to missing linkage and support in the DSA core. So one of the patches addresses exactly that limitation by adding the missing support to the DSA core. The other patch for felix flow policers (via the VCAP IS2 engine) is actually in the ocelot library itself, since the linkage with the ocelot flower classifier has already been done in an earlier patch set.

Then with the newly added .port_policer_add and .port_policer_del, we can also start supporting the L2 policers on sja1105.

Then, for full functionality of these L2 policers on sja1105, we also implement a more limited set of flow-based policing keys for this switch, namely for broadcast and VLAN PCP.

Series version 1 was submitted here:
https://patchwork.ozlabs.org/cover/1263353/

Nothing functional changed in v2, only a rebase.

Vladimir Oltean (5):
net: dsa: refactor matchall mirred action to separate function
net: dsa: add port policers
net: dsa: felix: add port policers
net: dsa: sja1105: add configuration of port policers
net: dsa: sja1105: add broadcast and per-traffic class policers

Xiaoliang Yang (1):
net: mscc: ocelot: add action of police on vcap_is2

 drivers/net/dsa/ocelot/felix.c            |  24 ++
 drivers/net/dsa/sja1105/Makefile          |   1 +
 drivers/net/dsa/sja1105/sja1105.h         |  40 +++
 drivers/net/dsa/sja1105/sja1105_flower.c  | 340 ++++++++++++++++++++++
 drivers/net/dsa/sja1105/sja1105_main.c    | 136 +++++++--
 drivers/net/ethernet/mscc/ocelot_ace.c    |  64 +++-
 drivers/net/ethernet/mscc/ocelot_ace.h    |   4 +
 drivers/net/ethernet/mscc/ocelot_flower.c |   9 +
 drivers/net/ethernet/mscc/ocelot_police.c |  27 ++
 drivers/net/ethernet/mscc/ocelot_police.h |  11 +-
 drivers/net/ethernet/mscc/ocelot_tc.c     |   2 +-
 include/net/dsa.h                         |  13 +-
 include/soc/mscc/ocelot.h                 |   9 +
 net/dsa/slave.c                           | 145 ++++++---
 14 files changed, 742 insertions(+), 83 deletions(-)
 create mode 100644 drivers/net/dsa/sja1105/sja1105_flower.c
Signature · 1 line
2.17.1