]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/bpf: Extend netkit tests to validate skb meta data
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 4 Oct 2024 10:13:35 +0000 (12:13 +0200)
committerMartin KaFai Lau <martin.lau@kernel.org>
Tue, 8 Oct 2024 01:13:10 +0000 (18:13 -0700)
commit716fa7dadf116ec4a27f56558b2a5bdd7e8decab
tree0e94eb12fd4088f28cc578d826537d962d7fc019
parent107525833bcedb9d7c2c6a21abb8b9747410f364
selftests/bpf: Extend netkit tests to validate skb meta data

Add a small netkit test to validate skb mark and priority under the
default scrubbing as well as with mark and priority scrubbing off.

  # ./vmtest.sh -- ./test_progs -t netkit
  [...]
  ./test_progs -t netkit
  [    1.419662] tsc: Refined TSC clocksource calibration: 3407.993 MHz
  [    1.420151] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fcd52370, max_idle_ns: 440795242006 ns
  [    1.420897] clocksource: Switched to clocksource tsc
  [    1.447996] bpf_testmod: loading out-of-tree module taints kernel.
  [    1.448447] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
  #357     tc_netkit_basic:OK
  #358     tc_netkit_device:OK
  #359     tc_netkit_multi_links:OK
  #360     tc_netkit_multi_opts:OK
  #361     tc_netkit_neigh_links:OK
  #362     tc_netkit_pkt_type:OK
  #363     tc_netkit_scrub:OK
  Summary: 7/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Nikolay Aleksandrov <razor@blackwall.org>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://lore.kernel.org/r/20241004101335.117711-5-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/prog_tests/tc_netkit.c
tools/testing/selftests/bpf/progs/test_tc_link.c