DPDK usage discussions
 help / color / mirror / Atom feed
* dpdk-testpmd on XDP
@ 2024-03-19 10:48 Alessio Igor Bogani
  2024-03-19 16:07 ` Stephen Hemminger
  0 siblings, 1 reply; 7+ messages in thread
From: Alessio Igor Bogani @ 2024-03-19 10:48 UTC (permalink / raw)
  To: users

Hi all,

I have a machine that works without a flow using DPDK 22.11.4:
# dpdk-devbind.py --bind=vfio-pci 0000:15:00.0
# dpdk-devbind.py --bind=vfio-pci 0000:15:00.3
# dpdk-testpmd -a 0000:15:00.0 -a 0000:15:00.3 -- --tx-first

The dpdk-testpmd utility works as expected:
+++++++++++++++ Accumulated forward statistics for all ports++++++
RX-packets: 29666849       RX-dropped: 0             RX-total: 29666849
TX-packets: 29666849       TX-dropped: 0             TX-total: 29666849
++++++++++++++++++++++++++++++++++++++++++++++++++++++

I would like to test the same machine with XDP (libbpf 0.7.0 and
libxdp 1.2.8) on the same NICs:
# reboot
# export LIBXDP_OBJECT_PATH=/root/libxdp (*)
# ulimit -l unlimited
# dpdk-testpmd --vdev net_af_xdp0,iface=enp21s0f0 --vdev
net_af_xdp1,iface=enp21s0f3 -- --tx-first

In this case dpdk-testpmd doesn't work:
+++++++++++++++ Accumulated forward statistics for all ports++++
RX-packets: 0              RX-dropped: 0             RX-total: 0
TX-packets: 64             TX-dropped: 0             TX-total: 64
++++++++++++++++++++++++++++++++++++++++++++++++++++

The only suspicious part in the output of the dpdk-testpmd utility is:
[...]
libxdp: XDP flag not supported by libxdp.
libbpf: prog 'xdp_dispatcher': BPF program load failed: Invalid argument
libbpf: prog 'xdp_dispatcher': -- BEGIN PROG LOAD LOG --
Validating prog0() func#1...
btf_vmlinux is malformed
Arg#0 type PTR in prog0() is not supported yet.
processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0
peak_states 0 mark_read 0
-- END PROG LOAD LOG --
libbpf: failed to load program 'xdp_dispatcher'
libbpf: failed to load object 'xdp-dispatcher.o'
libxdp: Failed to load dispatcher: Invalid argument
libxdp: Falling back to loading single prog without dispatcher
[...]

I made a mistake for sure but I haven't understood what yet. Do you
have any suggestions for me, please?

Thank you very much!

Ciao,
Alessio

(*) This doesn't seem to have any effect
I copied all file that I thought relevant in /root/libxdp: Makefile,
compat.h, libxdp.c, libxdp.pc, protocol.org, xdp-dispatcher.c,
xdp-dispatcher.ll, xsk_def_xdp_prog.c, xsk_def_xdp_prog.ll,
xsk_def_xdp_prog_5.3.embed.o, README.org, libxdp.3, libxdp.map,
libxdp.pc.template, staticobjs, xdp-dispatcher.c.in, xdp-dispatcher.o,
xsk_def_xdp_prog.embed.o, xsk_def_xdp_prog.o, xsk_def_xdp_prog_5.3.ll,
bpf_instr.h, libxdp.a, libxdp.mk, libxdp_internal.h, tests,
xdp-dispatcher.embed.o, xsk.c, xsk_def_xdp_prog.h,
xsk_def_xdp_prog_5.3.c and xsk_def_xdp_prog_5.3.o.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-22 23:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-19 10:48 dpdk-testpmd on XDP Alessio Igor Bogani
2024-03-19 16:07 ` Stephen Hemminger
2024-03-20  7:22   ` Alessio Igor Bogani
2024-03-20 16:24     ` Stephen Hemminger
2024-03-22 17:57       ` Alessio Igor Bogani
2024-03-22 18:13         ` Alessio Igor Bogani
2024-03-22 23:32         ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).