Skip to content

mlxsw: PFC and headroom selftests

Petr Machata netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6selftests: forwarding: devlink_lib: Split devlink_..._set() into save & settools/testing/selftests/drivers/net/mlxsw/qos_ets_strict.sh tools/testing/selftests/drivers/net/mlxsw/qos_mc_aware.sh tools/testing/selftests/drivers/net/mlxsw/sch_ets.sh +2 more+73 -120 replies
2/6selftests: forwarding: devlink_lib: Add devlink_cell_size_get()tools/testing/selftests/net/forwarding/devlink_lib.sh+6 -00 replies
3/6selftests: forwarding: devlink_lib: Support port-less topologiestools/testing/selftests/net/forwarding/devlink_lib.sh+1 -10 replies
4/6selftests: mlxsw: qos_lib: Add a wrapper for running mlnx_qostools/testing/selftests/drivers/net/mlxsw/qos_lib.sh+14 -00 replies
5/6selftests: mlxsw: Add headroom handling testtools/testing/selftests/drivers/net/mlxsw/qos_headroom.sh+379 -00 replies
6/6selftests: mlxsw: Add a PFC testtools/testing/selftests/drivers/net/mlxsw/qos_pfc.sh+403 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH net-next 0/6] mlxsw: PFC and headroom selftests

Recent changes in the headroom management code made it clear that an automated way of testing this functionality is needed. This patchset brings two tests: a synthetic headroom behavior test, which verifies mechanics of headroom management. And a PFC test, which verifies whether this behavior actually translates into a working lossless configuration.

Both of these tests rely on mlnx_qos[1], a tool that interfaces with Linux DCB API. The tool was originally written to work with Mellanox NICs, but does not actually rely on anything Mellanox-specific, and can be used for mlxsw as well as for any other NIC-like driver. Unlike Open LLDP it does support buffer commands and permits a fire-and-forget approach to configuration, which makes it very handy for writing of selftests.

Patches #1-#3 extend the selftest devlink_lib.sh in various ways. Patch #4 then adds a helper wrapper for mlnx_qos to mlxsw's qos_lib.sh.

Patch #5 adds a test for management of port headroom.

Patch #6 adds a PFC test.

[1] https://github.com/Mellanox/mlnx-tools/

Petr Machata (6):
selftests: forwarding: devlink_lib: Split devlink_..._set() into save
& set
selftests: forwarding: devlink_lib: Add devlink_cell_size_get()
selftests: forwarding: devlink_lib: Support port-less topologies
selftests: mlxsw: qos_lib: Add a wrapper for running mlnx_qos
selftests: mlxsw: Add headroom handling test
selftests: mlxsw: Add a PFC test

 .../drivers/net/mlxsw/qos_ets_strict.sh       |   9 +
 .../drivers/net/mlxsw/qos_headroom.sh         | 379 ++++++++++++++++
 .../selftests/drivers/net/mlxsw/qos_lib.sh    |  14 +
 .../drivers/net/mlxsw/qos_mc_aware.sh         |   5 +
 .../selftests/drivers/net/mlxsw/qos_pfc.sh    | 403 ++++++++++++++++++
 .../selftests/drivers/net/mlxsw/sch_ets.sh    |   6 +
 .../drivers/net/mlxsw/sch_red_core.sh         |   1 +
 .../selftests/net/forwarding/devlink_lib.sh   |  72 +++-
 8 files changed, 876 insertions(+), 13 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/mlxsw/qos_headroom.sh
 create mode 100755 tools/testing/selftests/drivers/net/mlxsw/qos_pfc.sh
Signature · 1 line
2.20.1