From the kernel to the user space (DMA)

c, dma, kernel, linux-kernel, networking

Solution

The easiest thing it to use Linux's normal sockets. It might not be the most efficient, but it's easiest.

There are frameworks, which allow very efficiently to receive and transmit data in user space. They map the same buffers to the NIC (DMA) and the process, so data doesn't need to be copied. These frameworks bypass the kernel completely - you have to interact with the NICs directly. Such frameworks are, for example, PF-RING and Netmap

Problem

Lately, I have been reading a lot of websites,and books about 10gb/s NICs, their DMA and the way data are handled by the linux kernel (10/100 mb/s NICs) and a few questions came to my mind. What would be the easiest way to send a 10GB/s flow of data from the NIC to the user-land (I assume being able to process the data in the user-land at the same rate). And Do you think it would be a good idea to implement the DMA buffer inside the user-space to read the raw data directly from there (and process them obviously at the same rate) or is their any better solutions I didn't think of :/ Thank you.

Original source