Skip to content

Commit

Permalink
Merge branch 'mlxsw-PFC-and-headroom-selftests'
Browse files Browse the repository at this point in the history
Petr Machata says:

====================
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/
====================

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Sep 30, 2020
2 parents 611ba75 + bfa8047 commit e13dbc4
Show file tree
Hide file tree
Showing 8 changed files with 875 additions and 12 deletions.
9 changes: 9 additions & 0 deletions tools/testing/selftests/drivers/net/mlxsw/qos_ets_strict.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,26 @@ switch_create()

# Make sure that ingress quotas are smaller than egress so that there is
# room for both streams of traffic to be admitted to shared buffer.
devlink_pool_size_thtype_save 0
devlink_pool_size_thtype_set 0 dynamic 10000000
devlink_pool_size_thtype_save 4
devlink_pool_size_thtype_set 4 dynamic 10000000

devlink_port_pool_th_save $swp1 0
devlink_port_pool_th_set $swp1 0 6
devlink_tc_bind_pool_th_save $swp1 1 ingress
devlink_tc_bind_pool_th_set $swp1 1 ingress 0 6

devlink_port_pool_th_save $swp2 0
devlink_port_pool_th_set $swp2 0 6
devlink_tc_bind_pool_th_save $swp2 2 ingress
devlink_tc_bind_pool_th_set $swp2 2 ingress 0 6

devlink_tc_bind_pool_th_save $swp3 1 egress
devlink_tc_bind_pool_th_set $swp3 1 egress 4 7
devlink_tc_bind_pool_th_save $swp3 2 egress
devlink_tc_bind_pool_th_set $swp3 2 egress 4 7
devlink_port_pool_th_save $swp3 4
devlink_port_pool_th_set $swp3 4 7
}

Expand Down
Loading

0 comments on commit e13dbc4

Please sign in to comment.