Skip to content

Configuring congestion watermarks on ocelot switch using devlink-sb

Vladimir Oltean netdev 5 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. v6 Latest10 patches 0 repliesApplied 10/10
  2. v510 patches 1 replySuperseded
  3. v410 patches 6 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v310 patches25 repliesSuperseded
v210 patches2 repliesSuperseded

Patches in v6 All 10 applied

#Subject and filesSizeRepliesApplied
1/10net: mscc: ocelot: auto-detect packet buffer size and number of frame referencesdrivers/net/dsa/ocelot/felix.c drivers/net/dsa/ocelot/felix.h drivers/net/dsa/ocelot/felix_vsc9959.c +5 more+26 -70 repliesApplied
2/10net: mscc: ocelot: add ops for decoding watermark threshold and occupancydrivers/net/dsa/ocelot/felix_vsc9959.c drivers/net/dsa/ocelot/seville_vsc9953.c drivers/net/ethernet/mscc/ocelot_vsc7514.c +2 more+54 -60 repliesApplied
3/10net: dsa: add ops for devlink-sbinclude/net/dsa.h net/dsa/dsa2.c+192 -10 repliesApplied
4/10net: dsa: felix: reindent struct dsa_switch_opsdrivers/net/dsa/ocelot/felix.c+37 -370 repliesApplied
5/10net: dsa: felix: perform teardown in reverse order of setupdrivers/net/dsa/ocelot/felix.c+5 -50 repliesApplied
6/10net: mscc: ocelot: export NUM_TC constant from felix to common switch libdrivers/net/dsa/ocelot/felix.c drivers/net/dsa/ocelot/felix.h drivers/net/dsa/ocelot/felix_vsc9959.c +2 more+5 -40 repliesApplied
7/10net: mscc: ocelot: delete unused ocelot_set_cpu_port prototypedrivers/net/ethernet/mscc/ocelot.h+0 -40 repliesApplied
8/10net: mscc: ocelot: register devlink portsdrivers/net/ethernet/mscc/ocelot.h drivers/net/ethernet/mscc/ocelot_net.c drivers/net/ethernet/mscc/ocelot_vsc7514.c +1 more+148 -440 repliesApplied
9/10net: mscc: ocelot: initialize watermarks to sane defaultsdrivers/net/ethernet/mscc/Makefile drivers/net/ethernet/mscc/ocelot.c drivers/net/ethernet/mscc/ocelot.h +1 more+446 -10 repliesApplied
10/10net: mscc: ocelot: configure watermarks using devlink-sbdrivers/net/dsa/ocelot/felix.c drivers/net/ethernet/mscc/ocelot.c drivers/net/ethernet/mscc/ocelot.h +4 more+761 -110 repliesApplied

Reviews trailers per patch

9 of 10 patches have a Reviewed-by or Acked-by.

PatchFlorian FainelliAndrew Lunn
1/10R-b
2/10R-b
3/10R-b R-b
4/10R-b
5/10R-b
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10

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

Read the v6 thread

Cover letter [PATCH v6 net-next 00/10] Configuring congestion watermarks on ocelot switch using devlink-sb

From: Vladimir Oltean <[email protected]>

In some applications, it is important to create resource reservations in the Ethernet switches, to prevent background traffic, or deliberate attacks, from inducing denial of service into the high-priority traffic.

These patches give the user some knobs to turn. The ocelot switches support per-port and per-port-tc reservations, on ingress and on egress. The resources that are monitored are packet buffers (in cells of 60 bytes each) and frame references.

The frames that exceed the reservations can optionally consume from sharing watermarks which are not per-port but global across the switch. There are 10 sharing watermarks, 8 of them are per traffic class and 2 are per drop priority.

I am configuring the hardware using the best of my knowledge, and mostly through trial and error. Same goes for devlink-sb integration. Feedback is welcome.

Vladimir Oltean (10):
net: mscc: ocelot: auto-detect packet buffer size and number of frame
references
net: mscc: ocelot: add ops for decoding watermark threshold and
occupancy
net: dsa: add ops for devlink-sb
net: dsa: felix: reindent struct dsa_switch_ops
net: dsa: felix: perform teardown in reverse order of setup
net: mscc: ocelot: export NUM_TC constant from felix to common switch
lib
net: mscc: ocelot: delete unused ocelot_set_cpu_port prototype
net: mscc: ocelot: register devlink ports
net: mscc: ocelot: initialize watermarks to sane defaults
net: mscc: ocelot: configure watermarks using devlink-sb

 drivers/net/dsa/ocelot/felix.c             | 205 ++++-
 drivers/net/dsa/ocelot/felix.h             |   2 -
 drivers/net/dsa/ocelot/felix_vsc9959.c     |  23 +-
 drivers/net/dsa/ocelot/seville_vsc9953.c   |  20 +-
 drivers/net/ethernet/mscc/Makefile         |   3 +-
 drivers/net/ethernet/mscc/ocelot.c         |  18 +-
 drivers/net/ethernet/mscc/ocelot.h         |  10 +-
 drivers/net/ethernet/mscc/ocelot_devlink.c | 885 +++++++++++++++++++++
 drivers/net/ethernet/mscc/ocelot_net.c     | 206 ++++-
 drivers/net/ethernet/mscc/ocelot_vsc7514.c | 143 +++-
 include/net/dsa.h                          |  34 +
 include/soc/mscc/ocelot.h                  |  55 +-
 include/soc/mscc/ocelot_qsys.h             |   7 +-
 net/dsa/dsa2.c                             | 159 +++-
 14 files changed, 1662 insertions(+), 108 deletions(-)
 create mode 100644 drivers/net/ethernet/mscc/ocelot_devlink.c
Signature · 1 line
2.25.1