Is it possible to get UDP packaging with a zero copy on Linux?

I would like to have UDP packets copied directly from the ethernet adapter to my user space buffer

Some information about my setup:

I get data from a pair of gigabit network cameras. In combination, I get 28800 UDP packets per second (1 packet per line * 30FPS * 2 cameras * 480 lines). There is no way for me to switch to jumbo frames, and I'm already studying driver level interrupt settings to reduce processor load. Being here reduces the number of copies of this data stream by ~ 40 MB / s.

This is the best source I have found on this, but I was hoping there would be more complete reference or evidence that such an approach was developed in practice.

+6
source share
2 answers

Your best features are recvmmsg and increased RX interrupt collapse.

http://lwn.net/Articles/334532/

You can move lower and correspond to how Wireshark / tcpdump works, but it is useless to try to do any serious processing on it, forcing everyone to decrypt everything on their own.

At 30,000 packets per second, I would not worry too much about copying packets; these problems arise when working with 3,000,000 messages per second.

+2
source

Source: https://habr.com/ru/post/897496/


All Articles