Skip to content
/ linux Public

Commit 9eefda7

Browse files
idoschSasha Levin
authored andcommitted
selftests: mlxsw: tc_restrictions: Fix test failure with new iproute2
[ Upstream commit a264677 ] As explained in [1], iproute2 started rejecting tc-police burst sizes that result in an overflow. This can happen when the burst size is high enough and the rate is low enough. A couple of test cases specify such configurations, resulting in iproute2 errors and test failure. Fix by reducing the burst size so that the test will pass with both new and old iproute2 versions. [1] https://lore.kernel.org/netdev/20250916215731.3431465-1-jay.vosburgh@canonical.com/ Fixes: cb12d17 ("selftests: mlxsw: tc_restrictions: Test tc-police restrictions") Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/88b00c6e85188aa6a065dc240206119b328c46e1.1770643998.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 5c577ac commit 9eefda7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ police_limits_test()
317317

318318
tc filter add dev $swp1 ingress pref 1 proto ip handle 101 \
319319
flower skip_sw \
320-
action police rate 0.5kbit burst 1m conform-exceed drop/ok
320+
action police rate 0.5kbit burst 2k conform-exceed drop/ok
321321
check_fail $? "Incorrect success to add police action with too low rate"
322322

323323
tc filter add dev $swp1 ingress pref 1 proto ip handle 101 \
@@ -327,7 +327,7 @@ police_limits_test()
327327

328328
tc filter add dev $swp1 ingress pref 1 proto ip handle 101 \
329329
flower skip_sw \
330-
action police rate 1.5kbit burst 1m conform-exceed drop/ok
330+
action police rate 1.5kbit burst 2k conform-exceed drop/ok
331331
check_err $? "Failed to add police action with low rate"
332332

333333
tc filter del dev $swp1 ingress protocol ip pref 1 handle 101 flower

0 commit comments

Comments
 (0)