Hi Qiliang,

On Fri Oct 9, 2026 at 3:50 AM CEST, Qiliang Yuan wrote:
> tc_edt shapes the traffic of a TCP connection between two netns to
> 5Mbps with a BPF program, and checks that the rate it measures from the
> userspace sender and receiver is within 2% of the target.
>
> The measured time includes the time the sender and the receiver take to
> run. When test_progs runs other tests in parallel, the sender and the
> receiver compete with those for the CPUs, the transfer takes longer,
> and the measured rate falls outside of the 2% margin.
>
> Make tc_edt a serial test.
>
> Fixes: b0f82e7ab6fb ("selftests/bpf: integrate test_tc_edt into test_progs")
> Signed-off-by: Qiliang Yuan <[email protected]>

I don't know how to feel about the proposed fix. As a test involving
bandwith measurement, I get that such things could happen, but:
- I did not see this failure in the recent CI runs (but I could have
  missed it)
- if you see it in your setup, how sure are we that it is due to high
  CPU usage ? I guess it is very likely, but worth asking
- any idea about how much we are missing the 2% margin ? If this is only
  by a little, I would rather increase the margin and keep the tests
  parallel, there's not much point being too restrictive on the target
  bandwith, if we get something close enough, this is a good proof that
  the BPF rate limiter is triggered and running correctly

Thanks,

Alexis
> ---
>  tools/testing/selftests/bpf/prog_tests/test_tc_edt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/test_tc_edt.c 
> b/tools/testing/selftests/bpf/prog_tests/test_tc_edt.c
> index 462512fb191f1..1e82d88c987a7 100644
> --- a/tools/testing/selftests/bpf/prog_tests/test_tc_edt.c
> +++ b/tools/testing/selftests/bpf/prog_tests/test_tc_edt.c
> @@ -127,7 +127,7 @@ static void run_test(void)
>                 "rate error is lower than threshold");
>  }
>  
> -void test_tc_edt(void)
> +void serial_test_tc_edt(void)
>  {
>       struct test_tc_edt *skel;
>  
>
> ---
> base-commit: e1d84a37cba984388988d2f1ddc84561413f0db2
> change-id: 20261009-selftests-bpf-tc-edt-serial-9c65af71f845
>
> Best regards,





-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Reply via email to