Question

I would like to have UDP packets copied directly from the ethernet adapter into my userspace buffer

Some details on my setup:

I am receiving data from a pair of gigabit ethernet cameras. Combined I am receiving 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 am already looking into tuning driver level interrupts for reduced CPU utilization. What I am after here is reducing the number of times I am copying this ~40MB/s data stream.

This is the best source I have found on this, but I was hoping there was a more complete reference or proof that such an approach worked out in practice.

Was it helpful?

OTHER TIPS

Your best avenues are recvmmsg and increasing RX interrupt coalescing.

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

You can move lower and match how Wireshark/tcpdump operate but it becomes futile to attempt any serious processing above it having to decode everything yourself.

At only 30,000 packets per second I wouldn't worry too much about copying packets, those problems arise when dealing with 3,000,000 messages per second.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top