xdp-tutorial
xdp-tutorial copied to clipboard
Packets arrival during xdp loading
I am having an interesting observation. If I am receiving network packets through the nic, while loading xdp my throughout is getting reduced (this throughput is consistent with a reduction from the expected throughput). If I am receiving packets only after xdp loading on the interface I am getting full throughput. For example if receiving packets, while loading xdp I am getting consistently the same reduced throughput of 400mbps, but expected was 600mbps, which I will receive if packets are coming after xdp load ? What is the reason for it ? Any clear I have to perform ? Should I down the nic during xdp load ? @magnus-karlsson @tohojo
How are you receiving these packets? Is this TCP? Using what tool? How long did you wait to see if it recovered after the load?
Packets are UDP. Transmission is multicast. We are using xdp and af_xdp. I have waited for 10 minute. I am consistently seeing the same reduced throughput. It seems it's not recovering.
Packets are sending with UDP c program
Can I down the nic just before xdp load and make it up just after loading. Will that work ?
Your receiver is using AF_XDP? So how are you receiving packets prior to loading an XDP program?
I am receiving packets after loading xdp only. Packets are continuously coming in the nic at 1gbps rate. During that I try to load xdp, then the reduced throughput I am observing consistently. The same behaviour is not observed if there is no active packets in the link and if I try loading xdp and then sending packets, I am getting full throughput
Ah, right, so what you mean is that it depends on which order you start the receiver and sender in?
Where do the rest of the packets go? What does ethtool -S tell you? And which NIC/driver is this?
Yeah exactly. I am seeing an order dependency of starting of sender and receiver. The os is RHEL 8.4 Do I need to do any clearing operation ? Making the link down just before xdp load and making it up right after the load will resolve the issue ?
@tohojo @magnus-karlsson @netoptimizer @dmitris @davem330 any idea on this ?
What NIC are you using?
Details are as follows Ixgbe Kernel driver : ixgbe Kernel modules : ixgbe Ethernet controller : intel corporation Ethernet connection X552 GbE Backplane
I hope we are having support for the above one ? Does clock speed having any role here ? Or hyper threading ?
XDP_DRV is supported on ixgbe. I tried the two samples xdp1 and xdp2 found in samples/bpf and I get the same throughput independent on traffic being started after or before launching the program. Can you please try these out on your system? After that, please try them out with the latest and greatest kernel from bpf-next or net-next. I do not know what kernel RHEL 8.4 contains.