Skip to content

Commit e13dbc4

Browse files
committed
Merge branch 'mlxsw-PFC-and-headroom-selftests'
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]>
2 parents 611ba75 + bfa8047 commit e13dbc4

File tree

8 files changed

+875
-12
lines changed

8 files changed

+875
-12
lines changed

tools/testing/selftests/drivers/net/mlxsw/qos_ets_strict.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,26 @@ switch_create()
147147

148148
# Make sure that ingress quotas are smaller than egress so that there is
149149
# room for both streams of traffic to be admitted to shared buffer.
150+
devlink_pool_size_thtype_save 0
150151
devlink_pool_size_thtype_set 0 dynamic 10000000
152+
devlink_pool_size_thtype_save 4
151153
devlink_pool_size_thtype_set 4 dynamic 10000000
152154

155+
devlink_port_pool_th_save $swp1 0
153156
devlink_port_pool_th_set $swp1 0 6
157+
devlink_tc_bind_pool_th_save $swp1 1 ingress
154158
devlink_tc_bind_pool_th_set $swp1 1 ingress 0 6
155159

160+
devlink_port_pool_th_save $swp2 0
156161
devlink_port_pool_th_set $swp2 0 6
162+
devlink_tc_bind_pool_th_save $swp2 2 ingress
157163
devlink_tc_bind_pool_th_set $swp2 2 ingress 0 6
158164

165+
devlink_tc_bind_pool_th_save $swp3 1 egress
159166
devlink_tc_bind_pool_th_set $swp3 1 egress 4 7
167+
devlink_tc_bind_pool_th_save $swp3 2 egress
160168
devlink_tc_bind_pool_th_set $swp3 2 egress 4 7
169+
devlink_port_pool_th_save $swp3 4
161170
devlink_port_pool_th_set $swp3 4 7
162171
}
163172

0 commit comments

Comments
 (0)