lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3365174.1757974481@famine>
Date: Mon, 15 Sep 2025 15:14:41 -0700
From: Jay Vosburgh <jay.vosburgh@...onical.com>
To: Victor Nogueira <victor@...atatu.com>
cc: jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us,
    kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] selftests/tc-testing: Adapt tc police action
 tests for Gb rounding changes

Victor Nogueira <victor@...atatu.com> wrote:

>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@...atatu.com>

Reviewed-by: Jay Vosburgh <jay.vosburgh@...onical.com>


>---
> tools/testing/selftests/tc-testing/tc-tests/actions/police.json | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/police.json b/tools/testing/selftests/tc-testing/tc-tests/actions/police.json
>index 5596f4df0e9f..b2cc6ea74450 100644
>--- a/tools/testing/selftests/tc-testing/tc-tests/actions/police.json
>+++ b/tools/testing/selftests/tc-testing/tc-tests/actions/police.json
>@@ -879,7 +879,7 @@
>         "cmdUnderTest": "$TC actions add action police pkts_rate 1000 pkts_burst 200 index 1",
>         "expExitCode": "0",
>         "verifyCmd": "$TC actions ls action police",
>-        "matchPattern": "action order [0-9]*:  police 0x1 rate 0bit burst 0b mtu 4096Mb pkts_rate 1000 pkts_burst 200",
>+        "matchPattern": "action order [0-9]*:  police 0x1 rate 0bit burst 0b mtu (4Gb|4096Mb) pkts_rate 1000 pkts_burst 200",
>         "matchCount": "1",
>         "teardown": [
>             "$TC actions flush action police"
>-- 
>2.51.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ