Open comphilip opened 5 months ago
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?
@magnus-karlsson use kernel 6.6.11-x64v3-xanmod1
and not fixed: need to wait extra 30 seconds after step 3.
If BPF prog is already attached to the NIC, then step 1~3 will be skipped and no need to wait extra 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.