Skip to content

Conversation

Tropicao
Copy link
Contributor

@Tropicao Tropicao commented Oct 9, 2025

CI test run

Kernel Patches Daemon and others added 4 commits October 8, 2025 16:18
The tc_tunnel test defines some convenient functions to create a qdisc
and attach bpf programs to it. It would be beneficial to new tests to
get those functions exported as helpers in a tc_helpers.h. There is
however already a tc_helpers.h file in the BPF selftests, used by a few
tests. This header is quite coupled to some BPF programs (some exposed
helpers consume a skeleton from some specific BPF programs), so rename
it to something more related to its original purpose.

Signed-off-by: Alexis Lothoré (eBPF Foundation) <[email protected]>
The tc_tunnel.c test defines small fonctions to easily attach eBPF
programs to tc hooks, either on egress, ingress or both.

Move those helpers in a dedicated file so that other tests can benefit
from it.

Signed-off-by: Alexis Lothoré (eBPF Foundation) <[email protected]>
The test_tc_tunnel.sh checks that a large variety of tunneling
mechanisms handled by the kernel can be handled as well by eBPF
programs. While this test shares similarities with test_tunnel.c (which is
already integrated in test_progs), those are testing slightly different
things:
- test_tunnel.c get and set tunnel keys in packet metadata with the corresponding
  bpf-helpers
- test_tc_tunnels.sh manually parses/crafts packets content

Bring the tests covered by test_tc_tunnel.sh into the test_progs
framework, by creating a dedicated test_tc_tunnel.sh. This new test
defines a "generic" runner which, for each test configuration:
- will bring the relevant veth pair, each of those isolated in a
  dedicated namespace
- will check that traffic will fail if there is only an encapsulating
  program attached to one veth egress
- will check that traffic succeed if we enable some decapsulation module
  on kernel side
- will check that traffic still succeeds if we replace the kernel
  decapsulation with some eBPF ingress decapsulation.

Example of the new test execution:

  # ./test_progs -a tc_tunnel
  kernel-patches#447/1   tc_tunnel/ipip_none:OK
  kernel-patches#447/2   tc_tunnel/ipip6_none:OK
  kernel-patches#447/3   tc_tunnel/ip6tnl_none:OK
  kernel-patches#447/4   tc_tunnel/sit_none:OK
  kernel-patches#447/5   tc_tunnel/vxlan_eth:OK
  kernel-patches#447/6   tc_tunnel/ip6vxlan_eth:OK
  kernel-patches#447/7   tc_tunnel/gre_none:OK
  kernel-patches#447/8   tc_tunnel/gre_eth:OK
  kernel-patches#447/9   tc_tunnel/gre_mpls:OK
  kernel-patches#447/10  tc_tunnel/ip6gre_none:OK
  kernel-patches#447/11  tc_tunnel/ip6gre_eth:OK
  kernel-patches#447/12  tc_tunnel/ip6gre_mpls:OK
  kernel-patches#447/13  tc_tunnel/udp_none:OK
  kernel-patches#447/14  tc_tunnel/udp_eth:OK
  kernel-patches#447/15  tc_tunnel/udp_mpls:OK
  kernel-patches#447/16  tc_tunnel/ip6udp_none:OK
  kernel-patches#447/17  tc_tunnel/ip6udp_eth:OK
  kernel-patches#447/18  tc_tunnel/ip6udp_mpls:OK
  kernel-patches#447     tc_tunnel:OK
  Summary: 1/18 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Alexis Lothoré (eBPF Foundation) <[email protected]>
@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot force-pushed the bpf-next_base branch 7 times, most recently from a4b455f to 4038f13 Compare October 12, 2025 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant