* [PATCH net] selftests: mlxsw: tc_restrictions: Fix test failure with new iproute2
@ 2026-02-09 13:53 Petr Machata
2026-02-12 13:55 ` Simon Horman
2026-02-13 2:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Petr Machata @ 2026-02-09 13:53 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Andrew Lunn, netdev
Cc: Ido Schimmel, Petr Machata, mlxsw
From: Ido Schimmel <idosch@nvidia.com>
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: cb12d1763267 ("selftests: mlxsw: tc_restrictions: Test tc-police restrictions")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
---
tools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh b/tools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh
index 0441a18f098b..aac8ef490feb 100755
--- a/tools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/tc_restrictions.sh
@@ -317,7 +317,7 @@ police_limits_test()
tc filter add dev $swp1 ingress pref 1 proto ip handle 101 \
flower skip_sw \
- action police rate 0.5kbit burst 1m conform-exceed drop/ok
+ action police rate 0.5kbit burst 2k conform-exceed drop/ok
check_fail $? "Incorrect success to add police action with too low rate"
tc filter add dev $swp1 ingress pref 1 proto ip handle 101 \
@@ -327,7 +327,7 @@ police_limits_test()
tc filter add dev $swp1 ingress pref 1 proto ip handle 101 \
flower skip_sw \
- action police rate 1.5kbit burst 1m conform-exceed drop/ok
+ action police rate 1.5kbit burst 2k conform-exceed drop/ok
check_err $? "Failed to add police action with low rate"
tc filter del dev $swp1 ingress protocol ip pref 1 handle 101 flower
--
2.51.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net] selftests: mlxsw: tc_restrictions: Fix test failure with new iproute2
2026-02-09 13:53 [PATCH net] selftests: mlxsw: tc_restrictions: Fix test failure with new iproute2 Petr Machata
@ 2026-02-12 13:55 ` Simon Horman
2026-02-13 2:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2026-02-12 13:55 UTC (permalink / raw)
To: Petr Machata
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Andrew Lunn, netdev, Ido Schimmel, mlxsw
On Mon, Feb 09, 2026 at 02:53:53PM +0100, Petr Machata wrote:
> From: Ido Schimmel <idosch@nvidia.com>
>
> 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: cb12d1763267 ("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>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net] selftests: mlxsw: tc_restrictions: Fix test failure with new iproute2
2026-02-09 13:53 [PATCH net] selftests: mlxsw: tc_restrictions: Fix test failure with new iproute2 Petr Machata
2026-02-12 13:55 ` Simon Horman
@ 2026-02-13 2:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-02-13 2:50 UTC (permalink / raw)
To: Petr Machata
Cc: davem, edumazet, kuba, pabeni, andrew+netdev, netdev, idosch,
mlxsw
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 9 Feb 2026 14:53:53 +0100 you wrote:
> From: Ido Schimmel <idosch@nvidia.com>
>
> 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.
>
> [...]
Here is the summary with links:
- [net] selftests: mlxsw: tc_restrictions: Fix test failure with new iproute2
https://git.kernel.org/netdev/net/c/a2646773a005
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-13 2:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-09 13:53 [PATCH net] selftests: mlxsw: tc_restrictions: Fix test failure with new iproute2 Petr Machata
2026-02-12 13:55 ` Simon Horman
2026-02-13 2:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox