aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis LothorĂ© (eBPF Foundation) <[email protected]>2024-07-21 21:33:03 +0200
committerAndrii Nakryiko <[email protected]>2024-07-29 15:05:09 -0700
commit0bfdda9db88990539b63a11028c84c4c069e8a0f (patch)
tree5e174d14baf6fa5dc925f1346f8c6a47e496cdb6
parent04a94133f1b3cccb19e056c26f056c50b4e5b3b1 (diff)
selftests/bpf: Update xdp_redirect_map prog sections for libbpf
xdp_redirect_map.c is a bpf program used by test_xdp_veth.sh, which is not handled by the generic test runner (test_progs). To allow converting this test to test_progs, the corresponding program must be updated to allow handling it through skeletons generated by bpftool and libbpf. Update programs section names to allow to manipulate those with libbpf. Signed-off-by: Alexis LothorĂ© (eBPF Foundation) <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Stanislav Fomichev <[email protected]> Link: https://lore.kernel.org/bpf/[email protected] Signed-off-by: Andrii Nakryiko <[email protected]>
-rw-r--r--tools/testing/selftests/bpf/progs/xdp_redirect_map.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/progs/xdp_redirect_map.c b/tools/testing/selftests/bpf/progs/xdp_redirect_map.c
index d037262c8937..682dda8dabbc 100644
--- a/tools/testing/selftests/bpf/progs/xdp_redirect_map.c
+++ b/tools/testing/selftests/bpf/progs/xdp_redirect_map.c
@@ -10,19 +10,19 @@ struct {
__uint(value_size, sizeof(int));
} tx_port SEC(".maps");
-SEC("redirect_map_0")
+SEC("xdp")
int xdp_redirect_map_0(struct xdp_md *xdp)
{
return bpf_redirect_map(&tx_port, 0, 0);
}
-SEC("redirect_map_1")
+SEC("xdp")
int xdp_redirect_map_1(struct xdp_md *xdp)
{
return bpf_redirect_map(&tx_port, 1, 0);
}
-SEC("redirect_map_2")
+SEC("xdp")
int xdp_redirect_map_2(struct xdp_md *xdp)
{
return bpf_redirect_map(&tx_port, 2, 0);