]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/tc-testing: Adapt tc police action tests for Gb rounding changes
authorVictor Nogueira <victor@mojatatu.com>
Fri, 12 Sep 2025 15:46:16 +0000 (12:46 -0300)
committerJakub Kicinski <kuba@kernel.org>
Mon, 15 Sep 2025 23:13:13 +0000 (16:13 -0700)
commitb7df2e7eaef7c5402d47553b2cc82f92b301ecb4
treecc654fc38389ed5f035492eba3503c00d43fd953
parentc5e389cc6b36701098d31fa3438c553c7fe7c1bb
selftests/tc-testing: Adapt tc police action tests for Gb rounding changes

For the tc police action, iproute2 rounds up mtu and burst sizes to a
higher order representation. For example, if the user specifies the default
mtu for a police action instance (4294967295 bytes), iproute2 will output
it as 4096Mb when this action instance is dumped. After Jay's changes [1],
iproute2 will round up to Gb, so 4096Mb becomes 4Gb. With that in mind,
fix police's tc test output so that it works both with the current
iproute2 version and Jay's.

[1] https://lore.kernel.org/netdev/20250907014216.2691844-1-jay.vosburgh@canonical.com/

Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Reviewed-by: Cong Wang <cwang@multikernel.io>
Reviewed-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Link: https://patch.msgid.link/20250912154616.67489-1-victor@mojatatu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/tc-testing/tc-tests/actions/police.json