]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests: mlxsw: sch_red_core: Lower TBF rate
authorPetr Machata <petrm@nvidia.com>
Mon, 7 Oct 2024 16:26:09 +0000 (18:26 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Oct 2024 22:37:24 +0000 (15:37 -0700)
commit501fa2426b5ffbe08c2571b6f5c3f3afa1970aa2
treef3603aee7921f478dd8e713ee2cd6d80b25bbcb4
parent7049166e51bc2b854935eda72f7fb8c3f4492f6f
selftests: mlxsw: sch_red_core: Lower TBF rate

The RED test uses a pair of TBF shapers. The first to get predictably-sized
stream of traffic, and second to get a 100% saturated chokepoint. To this
chokepoint it injects individual packets. Because the chokepoint is
saturated, these additional packets go straight to the backlog. This allows
the test to check RED behavior across various queue sizes.

The shapers are rated at 1Gbps, for historical reasons (before mlxsw
supported TBF offload, the test used port speed to create the chokepoints).
Machines with a low-power CPU may have trouble consistently generating
1Gbps of traffic, and the test then spuriously fails.

Instead, drop the rate to 200Mbps (Spectrum has a guaranteed shaper rate
granularity of 200Mbps, so anything lower is not guaranteed to work well).
Because that means fewer packets will be mirrored in the ECN-mark test,
adjust the passing condition accordingly.

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