]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests: mlxsw: sch_red_core: Send more packets for drop tests
authorPetr Machata <petrm@nvidia.com>
Mon, 7 Oct 2024 16:26:08 +0000 (18:26 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Oct 2024 22:37:24 +0000 (15:37 -0700)
commit7049166e51bc2b854935eda72f7fb8c3f4492f6f
treeaa2b0443a53c7912d948ecb2225bb3b6d68f5ae1
parent787f148cec340114dc22c49d8b045ff3ff0adad6
selftests: mlxsw: sch_red_core: Send more packets for drop tests

This test works by injecting into a port with a maxed-out queue a couple
packets and checks if a corresponding number of packets were dropped. This
has worked well on Spectrum<4, but on Spectrum-4 it has been noisy. This
is in line with the observation that on Spectrum-4, queue size tends to
fluctuate more. A handful of packets could then still be accepted to the
queue even though it was nominally full just recently.

In order to accommodate this behavior, send many more packets. The buffer
can fit N extra packets, but not N% packets. This therefore allows us to
set wider absolute margins, while actually narrowing them relatively.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/abc869b9f6003d400d6293ddd5edb2f4517f44d5.1728316370.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh