public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/4] selftests/bpf: convert test_tc_edt.sh into test_progs
@ 2025-11-28 22:27 Alexis Lothoré (eBPF Foundation)
  2025-11-28 22:27 ` [PATCH bpf-next v2 1/4] selftests/bpf: rename test_tc_edt.bpf.c section to expose program type Alexis Lothoré (eBPF Foundation)
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Alexis Lothoré (eBPF Foundation) @ 2025-11-28 22:27 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Shuah Khan
  Cc: ebpf, Bastien Curutchet, Thomas Petazzoni, bpf, linux-kselftest,
	linux-kernel, Alexis Lothoré (eBPF Foundation)

Hello,
this is a (late) v2 to my first attempt to convert the test_tc_edt
script to test_progs. This new version is way simpler, thanks to
Martin's suggestion about properly using the existing network_helpers
rather than reinventing the wheel. It also fixes a small bug in the
measured effective rate.

The converted test roughly follows the original script logic, with two
veths in two namespaces, a TCP connection between a client and a server,
and the client pushing a specific amount of data. Time is recorded
before and after the transmission to compute the effective rate.

There are two knobs driving the robustness of the test in CI:
- the amount of pushed data (the higher, the more precise is the
  effective rate)
- the tolerated error margin

The original test was configured with a 20s duration and a 1% error
margin. The new test is configured with 1MB of data being pushed and a
2% error margin, to:
- make the duration tolerable in CI
- while keeping enough margin for rate measure fluctuations depending on
  the CI machines load

This has been run multiple times locally to ensure that those values are
sane, and once in CI before sending the series, but I suggest to let it
live a few days in CI to see how it really behaves. 

Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
---
Changes in v2:
- drop custom client/server management
- update bpf program now that server pushes data
- fix effective rate computation
- Link to v1: https://lore.kernel.org/r/20251031-tc_edt-v1-0-5d34a5823144@bootlin.com

---
Alexis Lothoré (eBPF Foundation) (4):
      selftests/bpf: rename test_tc_edt.bpf.c section to expose program type
      selftests/bpf: integrate test_tc_edt into test_progs
      selftests/bpf: remove test_tc_edt.sh
      selftests/bpf: do not hardcode target rate in test_tc_edt BPF program

 tools/testing/selftests/bpf/Makefile               |   2 -
 .../testing/selftests/bpf/prog_tests/test_tc_edt.c | 145 +++++++++++++++++++++
 tools/testing/selftests/bpf/progs/test_tc_edt.c    |  11 +-
 tools/testing/selftests/bpf/test_tc_edt.sh         | 100 --------------
 4 files changed, 151 insertions(+), 107 deletions(-)
---
base-commit: 233a075a1b27070af76d64541cf001340ecff917
change-id: 20251030-tc_edt-3ea8e8d3d14e

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-11-29 19:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-28 22:27 [PATCH bpf-next v2 0/4] selftests/bpf: convert test_tc_edt.sh into test_progs Alexis Lothoré (eBPF Foundation)
2025-11-28 22:27 ` [PATCH bpf-next v2 1/4] selftests/bpf: rename test_tc_edt.bpf.c section to expose program type Alexis Lothoré (eBPF Foundation)
2025-11-28 22:27 ` [PATCH bpf-next v2 2/4] selftests/bpf: integrate test_tc_edt into test_progs Alexis Lothoré (eBPF Foundation)
2025-11-28 22:27 ` [PATCH bpf-next v2 3/4] selftests/bpf: remove test_tc_edt.sh Alexis Lothoré (eBPF Foundation)
2025-11-28 22:27 ` [PATCH bpf-next v2 4/4] selftests/bpf: do not hardcode target rate in test_tc_edt BPF program Alexis Lothoré (eBPF Foundation)
2025-11-29 17:46 ` [PATCH bpf-next v2 0/4] selftests/bpf: convert test_tc_edt.sh into test_progs Alexei Starovoitov
2025-11-29 19:11   ` Alexis Lothoré
2025-11-29 17: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