linux-stable/tools
Amit Cohen 58485b95fd selftests: mlxsw: qos_pfc: Adjust the test to support 8 lanes
[ Upstream commit b34f4de6d3 ]

'qos_pfc' test checks PFC behavior. The idea is to limit the traffic
using a shaper somewhere in the flow of the packets. In this area, the
buffer is smaller than the buffer at the beginning of the flow, so it fills
up until there is no more space left. The test configures there PFC
which is supposed to notice that the headroom is filling up and send PFC
Xoff to indicate the transmitter to stop sending traffic for the priorities
sharing this PG.

The Xon/Xoff threshold is auto-configured and always equal to
2*(MTU rounded up to cell size). Even after sending the PFC Xoff packet,
traffic will keep arriving until the transmitter receives and processes
the PFC packet. This amount of traffic is known as the PFC delay allowance.

Currently the buffer for the delay traffic is configured as 100KB. The
MTU in the test is 10KB, therefore the threshold for Xoff is about 20KB.
This allows 80KB extra to be stored in this buffer.

8-lane ports use two buffers among which the configured buffer is split,
the Xoff threshold then applies to each buffer in parallel.

The test does not take into account the behavior of 8-lane ports, when the
ports are configured to 400Gbps with 8 lanes or 800Gbps with 8 lanes,
packets are dropped and the test fails.

Check if the relevant ports use 8 lanes, in such case double the size of
the buffer, as the headroom is split half-half.

Cc: Shuah Khan <shuah@kernel.org>
Fixes: bfa804784e ("selftests: mlxsw: Add a PFC test")
Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Link: https://lore.kernel.org/r/23ff11b7dff031eb04a41c0f5254a2b636cd8ebb.1705502064.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 14:52:55 -08:00
..
accounting
arch parisc: Drop the HP-UX ENOSYM and EREMOTERELEASE error codes 2023-12-08 08:48:02 +01:00
bootconfig bootconfig: Fix testcase to increase max node 2023-03-30 12:47:47 +02:00
bpf bpftool: Use a local bpf_perf_event_value to fix accessing its fields 2023-09-19 12:22:32 +02:00
build tools build: Add feature test for init_disassemble_info API changes 2023-03-17 08:49:03 +01:00
cgroup
debugging
edid
firewire
firmware
gpio tools: gpio: fix debounce_period_us output of lsgpio 2023-06-21 15:59:12 +02:00
hv vmbus_testing: fix wrong python syntax for integer value comparison 2023-09-19 12:22:28 +02:00
iio tools: iio: iio_generic_buffer ensure alignment 2023-11-20 11:08:25 +01:00
include bpf: Add crosstask check to __bpf_get_stack 2024-01-25 14:52:36 -08:00
io_uring
kvm/kvm_stat tools/kvm_stat: fix display of error when multiple processes are found 2022-08-11 13:07:51 +02:00
laptop
leds
lib libapi: Add missing linux/types.h header to get the __u64 type on io.h 2024-01-25 14:52:50 -08:00
memory-model
objtool objtool/x86: add missing embedded_insn check 2023-11-08 17:26:43 +01:00
pci
pcmcia
perf perf env: Avoid recursively taking env->bpf_progs.lock 2024-01-25 14:52:52 -08:00
power tools/power/turbostat: Enable the C-state Pre-wake printing 2023-11-28 16:56:25 +00:00
rcu
scripts
spi
testing selftests: mlxsw: qos_pfc: Adjust the test to support 8 lanes 2024-01-25 14:52:55 -08:00
thermal/tmon tools/thermal: Fix possible path truncations 2022-08-17 14:24:15 +02:00
time
tracing tools/latency-collector: Use correct size when writing queue_full_warning 2021-11-18 19:16:19 +01:00
usb
virtio tools/virtio: fix the vringh test for virtio ring changes 2023-02-22 12:57:01 +01:00
vm tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" 2022-12-08 11:28:42 +01:00
wmi
Makefile