3 ms·
That’s very interesting, thank you for sharing. Looks like it could be a very useful tool for testing high performance networking. I wonder if something simila
by spaceywilly 2mo ago
That’s very interesting, thank you for sharing. Looks like it could be a very useful tool for testing high performance networking.
I wonder if something similar could be done using TC BPF instead of AF_XDP? My only reservation about AF XDP is that it requires a special NIC to support it, so it may not be useful for a “regular Joe” user. I wonder if TC BPF would also work since it similarly bypasses the Kernel networking stack, I believe you can put packets directly into the NIC TX queue for transmission
- bgpdude 2mo agoyou can use generic af_xdp which sits at the TC layer. Just get a bit less performance.
- bgpdude 2mo agoThat's what the veth examples are using
- tptacek 2mo agoYou can, but the interesting thing about AF_XDP is that you've got a userland path to writing directly to the card's DMA buffers; TC BPF still allocates an skbuff for every packet you send.
- adrian_b 2mo agoAlso with liburing you have zero-copy send and receive operations for normal protocols like UDP or TCP, but this requires a NIC that supports scatter/gather DMA (so that the packet headers go to/from kernel buffers, while the data goes to/from userland buffers). AF_XDP is also available in older kernels, but with recent enough kernels (zero-copy receive is a recent addition) and with a good NIC, liburing should provide a similar performance.
- Palomides 2mo agoit seems like every NIC on the market that can do 100Gb has support in its linux kernel driver, so probably not a big deal in practice