mbox series

[net-next,0/2] add egress rate limit offload for Marvell 6393X family

Message ID 20230609141812.297521-1-alexis.lothore@bootlin.com (mailing list archive)
Headers show
Series add egress rate limit offload for Marvell 6393X family | expand

Message

Alexis Lothoré June 9, 2023, 2:18 p.m. UTC
From: Alexis Lothoré <alexis.lothore@bootlin.com>

This series aims to give access to egress rate shaping offloading available
on Marvell 88E6393X family (88E6393X/88E6193X/88E6191X/88E6361)

The switch offers a very basic egress rate limiter: rate can be configured
from 64kbps up to 10gbps depending on the model, with some specific
increments depending on the targeted rate, and is "burstless".

Since available controls are quite limited, this series proposes to provide
controls to userspace through a TBF qdisc. Since hardware features do no
completely matches what TBF qidsc expects, some passed parameters (burst,
latency) are simply ignored

- 1st commit allows mv88e6xxx driver to attach the port_setup_tc callback
  in dsa_switch_opts and to dispatch it to any switch implementing it
- 2nd commit add tbf configuration for 88E6393X family

Alexis Lothoré (2):
  net: dsa: mv88e6xxx: allow driver to hook TC callback
  net: dsa: mv88e6xxx: implement egress tbf qdisc for 6393x family

 drivers/net/dsa/mv88e6xxx/chip.c |  18 ++++++
 drivers/net/dsa/mv88e6xxx/chip.h |   3 +-
 drivers/net/dsa/mv88e6xxx/port.c | 104 +++++++++++++++++++++++++++++++
 drivers/net/dsa/mv88e6xxx/port.h |  17 ++++-
 4 files changed, 139 insertions(+), 3 deletions(-)