You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
libxdp: Loading XDP program 'xsk_def_xdp_prog.o' from embedded object file
libbpf: elf: skipping unrecognized data section(8) .xdp_run_config
libbpf: elf: skipping unrecognized data section(9) xdp_metadata
libxdp: Generating multi-prog dispatcher for 1 programs
libxdp: Checking for kernel frags support
libxdp: Loading XDP program 'xdp-dispatcher.o' from embedded object file
libbpf: elf: skipping unrecognized data section(7) xdp_metadata
libxdp: DATASEC '.xdp_run_config' not found.
libbpf: prog 'xdp_pass': BPF program load failed: Invalid argument
libbpf: prog 'xdp_pass': failed to load: -22
libbpf: failed to load object 'xdp-dispatcher.o'
libxdp: Kernel DOES NOT support XDP programs with frags
libxdp: Loading XDP program 'xdp-dispatcher.o' from embedded object file
libbpf: elf: skipping unrecognized data section(7) xdp_metadata
libxdp: DATASEC '.xdp_run_config' not found.
libxdp: Loading multiprog dispatcher for 1 programs without frags support
libxdp: Loaded XDP program xdp_dispatcher, got fd 7
libxdp: Duplicated fd 7 to 9 for prog xdp_dispatcher
libxdp: Checking dispatcher compatibility
libxdp: Loading XDP program 'xdp-dispatcher.o' from embedded object file
libbpf: elf: skipping unrecognized data section(7) xdp_metadata
libxdp: DATASEC '.xdp_run_config' not found.
libxdp: Loading XDP program 'xdp-dispatcher.o' from embedded object file
libbpf: elf: skipping unrecognized data section(7) xdp_metadata
libxdp: DATASEC '.xdp_run_config' not found.
libxdp: Loaded XDP program xdp_pass, got fd 13
libxdp: Duplicated fd 13 to 14 for prog xdp_pass
libxdp: Loaded XDP program xdp_pass, got fd 18
libxdp: Duplicated fd 18 to 19 for prog xdp_pass
libxdp: Acquired lock from /sys/fs/bpf/xdp with fd 21
libxdp: Released lock fd 21
libxdp: Linking prog xsk_def_prog as multiprog entry 0
libxdp: Loaded XDP program xsk_def_prog, got fd 13
libxdp: Duplicated fd 13 to 14 for prog xsk_def_prog
libxdp: Duplicated fd 14 to 15 for prog xsk_def_prog
libxdp: Attached prog 'xsk_def_prog' with priority 20 in dispatcher entry 'prog0' with fd 16
libxdp: Acquired lock from /sys/fs/bpf/xdp with fd 17
libxdp: Pinning multiprog fd 9 beneath /sys/fs/bpf/xdp/dispatch-6-5804
libxdp: Pinned link for prog xsk_def_prog at /sys/fs/bpf/xdp/dispatch-6-5804/prog0-link
libxdp: Pinned prog xsk_def_prog at /sys/fs/bpf/xdp/dispatch-6-5804/prog0-prog
libxdp: Released lock fd 17
libxdp: Replacing XDP fd -1 with 9 on ifindex 6
libxdp: Loaded 1 programs on ifindex 6
BUG workaround: sleep one minute to make sure xdp ready to send packets
send package 0
send package 1
send package 2
send package 3
send package 4
send package 5
send package 6
send package 7
send package 8
send package 9
^C libxdp: Acquired lock from /sys/fs/bpf/xdp with fd 6
libxdp: Released lock fd 6
libxdp: Verified XDP dispatcher version 2 <= 2
libxdp: Duplicated fd 6 to 7 for prog xdp_dispatcher
libxdp: DATASEC '.xdp_run_config' not found.
libxdp: Acquired lock from /sys/fs/bpf/xdp with fd 8
libxdp: Reading multiprog component programs from pinned directory
libxdp: Duplicated fd 9 to 15 for prog xsk_def_prog
libxdp: Released lock fd 8
libxdp: Found multiprog with id 5804 and 1 component progs
libxdp: Replacing XDP fd 7 with -1 on ifindex 6
libxdp: Detached multiprog on ifindex 6
libxdp: Acquired lock from /sys/fs/bpf/xdp with fd 6
libxdp: Unpinning multiprog fd 7 beneath /sys/fs/bpf/xdp/dispatch-6-5804
libxdp: Unpinned link for prog xsk_def_prog from /sys/fs/bpf/xdp/dispatch-6-5804/prog0-link
libxdp: Unpinned prog xsk_def_prog from /sys/fs/bpf/xdp/dispatch-6-5804/prog0-prog
libxdp: Removed pin directory /sys/fs/bpf/xdp/dispatch-6-5804
libxdp: Released lock fd 6
Result
Packet fill to tx ring should be sent after xsk_socket initialized, but have to wait extra about 30 seconds to send (call SendRawEthernetPacketData and FlushTxBuffer) or the packets are gone (cannot received on target machine with tcpdump)
xsk_socket__create seems do a lot of things:
set the NIC down
load the BPF program
set the NIC up (the attached bpf prog shown with ip link)
Have no idea why extra 30 seconds needed to wait before send working.
The text was updated successfully, but these errors were encountered:
30 seconds is quite excessive indeed! For a large system with around 100 cores, it might take nearly a second to set everything up, but not 30 s. Could you please try on a newer kernel and see if you get the same problem? Mainline 6.7 would be one good choice.
Do you know how much time the steps 1, 2, or 3 above consumes? Or is it after step 3 is completed you have to wait for 30 seconds?
Environment
Linux 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
NIC:
Intel Corporation Ethernet Controller 10-Gigabit X540-AT2
Reproduce
AF_XDP initializtion
Send package
Log
Result
Packet fill to
tx
ring should be sent afterxsk_socket
initialized, but have to wait extra about 30 seconds to send (callSendRawEthernetPacketData
andFlushTxBuffer
) or the packets are gone (cannot received on target machine withtcpdump
)xsk_socket__create
seems do a lot of things:ip link
)Have no idea why extra 30 seconds needed to wait before send working.
The text was updated successfully, but these errors were encountered: