Message ID | 20210730061822.6600-7-joamaki@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | BPF |
Headers | show |
Series | XDP bonding support | expand |
On Wed, Aug 4, 2021 at 5:45 AM Jussi Maki <joamaki@gmail.com> wrote: > > 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/tx" so that libbpf can deduce the type. > > Signed-off-by: Jussi Maki <joamaki@gmail.com> > --- > tools/testing/selftests/bpf/progs/xdp_tx.c | 2 +- > tools/testing/selftests/bpf/test_xdp_veth.sh | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/selftests/bpf/progs/xdp_tx.c b/tools/testing/selftests/bpf/progs/xdp_tx.c > index 94e6c2b281cb..ece1fbbc0984 100644 > --- a/tools/testing/selftests/bpf/progs/xdp_tx.c > +++ b/tools/testing/selftests/bpf/progs/xdp_tx.c > @@ -3,7 +3,7 @@ > #include <linux/bpf.h> > #include <bpf/bpf_helpers.h> > > -SEC("tx") > +SEC("xdp/tx") please use just SEC("xdp") > int xdp_tx(struct xdp_md *xdp) > { > return XDP_TX; > diff --git a/tools/testing/selftests/bpf/test_xdp_veth.sh b/tools/testing/selftests/bpf/test_xdp_veth.sh > index ba8ffcdaac30..c8e0b7d36f56 100755 > --- a/tools/testing/selftests/bpf/test_xdp_veth.sh > +++ b/tools/testing/selftests/bpf/test_xdp_veth.sh > @@ -108,7 +108,7 @@ ip link set dev veth2 xdp pinned $BPF_DIR/progs/redirect_map_1 > ip link set dev veth3 xdp pinned $BPF_DIR/progs/redirect_map_2 > > ip -n ns1 link set dev veth11 xdp obj xdp_dummy.o sec xdp_dummy > -ip -n ns2 link set dev veth22 xdp obj xdp_tx.o sec tx > +ip -n ns2 link set dev veth22 xdp obj xdp_tx.o sec xdp/tx > ip -n ns3 link set dev veth33 xdp obj xdp_dummy.o sec xdp_dummy > > trap cleanup EXIT > -- > 2.17.1 >
diff --git a/tools/testing/selftests/bpf/progs/xdp_tx.c b/tools/testing/selftests/bpf/progs/xdp_tx.c index 94e6c2b281cb..ece1fbbc0984 100644 --- a/tools/testing/selftests/bpf/progs/xdp_tx.c +++ b/tools/testing/selftests/bpf/progs/xdp_tx.c @@ -3,7 +3,7 @@ #include <linux/bpf.h> #include <bpf/bpf_helpers.h> -SEC("tx") +SEC("xdp/tx") int xdp_tx(struct xdp_md *xdp) { return XDP_TX; diff --git a/tools/testing/selftests/bpf/test_xdp_veth.sh b/tools/testing/selftests/bpf/test_xdp_veth.sh index ba8ffcdaac30..c8e0b7d36f56 100755 --- a/tools/testing/selftests/bpf/test_xdp_veth.sh +++ b/tools/testing/selftests/bpf/test_xdp_veth.sh @@ -108,7 +108,7 @@ ip link set dev veth2 xdp pinned $BPF_DIR/progs/redirect_map_1 ip link set dev veth3 xdp pinned $BPF_DIR/progs/redirect_map_2 ip -n ns1 link set dev veth11 xdp obj xdp_dummy.o sec xdp_dummy -ip -n ns2 link set dev veth22 xdp obj xdp_tx.o sec tx +ip -n ns2 link set dev veth22 xdp obj xdp_tx.o sec xdp/tx ip -n ns3 link set dev veth33 xdp obj xdp_dummy.o sec xdp_dummy trap cleanup EXIT
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/tx" so that libbpf can deduce the type. Signed-off-by: Jussi Maki <joamaki@gmail.com> --- tools/testing/selftests/bpf/progs/xdp_tx.c | 2 +- tools/testing/selftests/bpf/test_xdp_veth.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)