selftests: forwarding: Make tc-police pass on debug kernels
authorIdo Schimmel <idosch@nvidia.com>
Mon, 4 Mar 2024 09:56:09 +0000 (11:56 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 5 Mar 2024 17:18:07 +0000 (09:18 -0800)
commit4aca9eae6f7bfea30467fce6b1062f1bf5f21e9b
tree28ecb22f437bb4d9d24770fefc0bd91bbeefdb93
parent748d27447daa3f2bdf519f2a97647ff69fd1b70b
selftests: forwarding: Make tc-police pass on debug kernels

The test configures a policer with a rate of 80Mbps and expects to
measure a rate close to it. This is a too high rate for debug kernels,
causing the test to fail [1].

Fix by reducing the rate to 10Mbps.

[1]
 # ./tc_police.sh
 TEST: police on rx                                                  [FAIL]
         Expected rate 76.2Mbps, got 29.6Mbps, which is -61% off. Required accuracy is +-10%.
 TEST: police on tx                                                  [FAIL]
         Expected rate 76.2Mbps, got 30.4Mbps, which is -60% off. Required accuracy is +-10%.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/20240304095612.462900-4-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/forwarding/tc_police.sh