Welcome to the Linux Foundation Forum!

fast layer 2 stream processing from userspace

Options

I need to process some ethernet layer 2 data stream (at least ~1600 frames/s where frame size is 700 bytes, the more the better). I'm using linux kernel 4.14.40 from Texas Instrumens on Sitara AM335x platform. I'm trying to achieve that by using raw sockets like this:

recvfrom(); //blocking
//processing
sendto();

Sometimes packets are lost, even if I don't do any processing. How can I encrease performance? Also while 15300 frames/s for 700 bytes frames is physical maximum, what performance can I achieve passing streams through raw sockets on linux?

Categories

Upcoming Training