Skip to content

Commit 3841dfa

Browse files
joamakigregkh
authored andcommitted
selftests/bpf: Fix xdp_tx.c prog section name
[ Upstream commit 9541384 ] The program type cannot be deduced from 'tx' which causes an invalid argument error when trying to load xdp_tx.o using the skeleton. Rename the section name to "xdp" so that libbpf can deduce the type. Signed-off-by: Jussi Maki <joamaki@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210731055738.16820-7-joamaki@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 63ebc1f commit 3841dfa

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎tools/testing/selftests/bpf/progs/xdp_tx.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <linux/bpf.h>
44
#include <bpf/bpf_helpers.h>
55

6-
SEC("tx")
6+
SEC("xdp")
77
int xdp_tx(struct xdp_md *xdp)
88
{
99
return XDP_TX;

‎tools/testing/selftests/bpf/test_xdp_veth.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ ip link set dev veth2 xdp pinned $BPF_DIR/progs/redirect_map_1
108108
ip link set dev veth3 xdp pinned $BPF_DIR/progs/redirect_map_2
109109

110110
ip -n ns1 link set dev veth11 xdp obj xdp_dummy.o sec xdp_dummy
111-
ip -n ns2 link set dev veth22 xdp obj xdp_tx.o sec tx
111+
ip -n ns2 link set dev veth22 xdp obj xdp_tx.o sec xdp
112112
ip -n ns3 link set dev veth33 xdp obj xdp_dummy.o sec xdp_dummy
113113

114114
trap cleanup EXIT

0 commit comments

Comments
 (0)