]> Gentwo Git Trees - linux/.git/commit
selftests/bpf: do not hardcode target rate in test_tc_edt BPF program
authorAlexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Fri, 28 Nov 2025 22:27:21 +0000 (23:27 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 29 Nov 2025 17:37:41 +0000 (09:37 -0800)
commit1d17bcce6a0e55b075309418199be212f70817ff
tree6f7f7b1f6d533325f14d1af5f6dbcaee604a8bc1
parent50ce5ea5f7929b7a0267a2ab70115a6b8800a1d7
selftests/bpf: do not hardcode target rate in test_tc_edt BPF program

test_tc_edt currently defines the target rate in both the userspace and
BPF parts. This value could be defined once in the userspace part if we
make it able to configure the BPF program before starting the test.

Add a target_rate variable in the BPF part, and make the userspace part
set it to the desired rate before attaching the shaping program.

Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Link: https://lore.kernel.org/r/20251128-tc_edt-v2-4-26db48373e73@bootlin.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/test_tc_edt.c
tools/testing/selftests/bpf/progs/test_tc_edt.c