Skip to content

Commit 0bfdda9

Browse files
Tropicaoanakryiko
authored andcommitted
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]>
1 parent 04a9413 commit 0bfdda9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/testing/selftests/bpf/progs/xdp_redirect_map.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ struct {
1010
__uint(value_size, sizeof(int));
1111
} tx_port SEC(".maps");
1212

13-
SEC("redirect_map_0")
13+
SEC("xdp")
1414
int xdp_redirect_map_0(struct xdp_md *xdp)
1515
{
1616
return bpf_redirect_map(&tx_port, 0, 0);
1717
}
1818

19-
SEC("redirect_map_1")
19+
SEC("xdp")
2020
int xdp_redirect_map_1(struct xdp_md *xdp)
2121
{
2222
return bpf_redirect_map(&tx_port, 1, 0);
2323
}
2424

25-
SEC("redirect_map_2")
25+
SEC("xdp")
2626
int xdp_redirect_map_2(struct xdp_md *xdp)
2727
{
2828
return bpf_redirect_map(&tx_port, 2, 0);

0 commit comments

Comments
 (0)