Skip to content

mlxsw: Refactor qdisc offload

Petr Machata netdev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10mlxsw: spectrum_qdisc: Drop one argument from check_params callbackdrivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c+1 -70 replies
2/10mlxsw: spectrum_qdisc: Simplify mlxsw_sp_qdisc_compare()drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c+7 -150 replies
3/10mlxsw: spectrum_qdisc: Drop an always-true conditiondrivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c+1 -40 replies
4/10mlxsw: spectrum_qdisc: Track tclass_num as int, not u8drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c+6 -60 replies
5/10mlxsw: spectrum_qdisc: Promote backlog reduction to mlxsw_sp_qdisc_destroy()drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c+18 -300 replies
6/10mlxsw: spectrum_qdisc: Track children per qdiscdrivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c+118 -460 replies
7/10mlxsw: spectrum_qdisc: Guard all qdisc accesses with a lockdrivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c+73 -160 replies
8/10mlxsw: spectrum_qdisc: Allocate child qdiscs dynamicallydrivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c+83 -320 replies
9/10mlxsw: spectrum_qdisc: Index future FIFOs by band numberdrivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c+6 -70 replies
10/10selftests: mlxsw: sch_red_ets: Test proper counter cleaning in ETStools/testing/selftests/drivers/net/mlxsw/sch_red_ets.sh+7 -00 replies

Reviews trailers per patch

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

PatchIdo Schimmel
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-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 00/10] mlxsw: Refactor qdisc offload

Currently, mlxsw admits for offload a suitable root qdisc, and its children. Thus up to two levels of hierarchy are offloaded. Often, this is
enough: one can configure TCs with RED and TCs with a shaper, and can even see counters for each TC by looking at a qdisc at a sufficiently shallow position.

While simple, the system has obvious shortcomings. It is not possible to configure both RED and shaping on one TC. It is not possible to place a PRIO below root TBF, which would then be offloaded as port shaper. FIFOs are only offloaded at root or directly below, which is confusing to users, because RED and TBF of course have their own FIFO.

This patchset is a step towards the end goal of allowing more comprehensive qdisc tree offload and cleans up the qdisc offload code.

- Patches #1-#4 contain small cleanups.

- Up until now, since mlxsw offloaded only a very simple qdisc configurations, basically all bookkeeping was done using one container for the root qdisc, and 8 containers for its children. Patches #5, #6, #8 and #9 gradually introduce a more dynamic structure, where parent-child relationships are tracked directly at qdiscs, instead of being implicit.

- This tree management assumes only one qdisc is created at a time. In FIFO handlers, this condition was enforced simply by asserting RTNL lock. But instead of furthering this RTNL dependence, patch #7 converts the whole qdisc offload logic to a per-port mutex.

- Patch #10 adds a selftest.

Petr Machata (10):
mlxsw: spectrum_qdisc: Drop one argument from check_params callback
mlxsw: spectrum_qdisc: Simplify mlxsw_sp_qdisc_compare()
mlxsw: spectrum_qdisc: Drop an always-true condition
mlxsw: spectrum_qdisc: Track tclass_num as int, not u8
mlxsw: spectrum_qdisc: Promote backlog reduction to
mlxsw_sp_qdisc_destroy()
mlxsw: spectrum_qdisc: Track children per qdisc
mlxsw: spectrum_qdisc: Guard all qdisc accesses with a lock
mlxsw: spectrum_qdisc: Allocate child qdiscs dynamically
mlxsw: spectrum_qdisc: Index future FIFOs by band number
selftests: mlxsw: sch_red_ets: Test proper counter cleaning in ETS

 .../ethernet/mellanox/mlxsw/spectrum_qdisc.c  | 448 ++++++++++++------
 .../drivers/net/mlxsw/sch_red_ets.sh          |   7 +
 2 files changed, 306 insertions(+), 149 deletions(-)
Signature · 1 line
2.26.2