Recently I got the opportunity to work on Intel’s DPDK platform. I have collated my understanding of the subject here, and will try to address what it is.
There is plenty of material already on the internet, which explains about DPDK. The best documentation I recommend is directly from the DPDK site DPDK documentation.
The documentation path to follow, should be:
DPDK basically enables you to receive Ethernet packets at very high rates 10Gbps/40Gbps. The DPDK platform uses a number of techniques to achieve this feast, some of them being:
- Poll mode NIC drivers : Polling allows to mitigate interrupt costs. each interrupt cost us CPU cycles due to context switches. At high data rates, this can be huge.
- Use of advanced hardware instructions : Increased efficiency by using SSE instructions, TSX etc.
- Move the processing to “User Space” : Reduction of system calls and context switches.
- Use of “huge pages” : Page sizes of 2MB to 1GB are used instead of the default 4K. This reduces the TLB misses (virtual to physical mapping).

The picture above shows the components of Linux stack that implement the functionality of HTTP stack.
As the ‘packets’ arrive at the NIC (hardware layer), they are pulled by the Ethernet driver (link layer) and passed onto subsequent upper layers for further processing. Other than the ‘application layer’, all other layers run in the kernel mode.

The above figure shows the DPDK stack. Notably, the NIC that is bound to the DPDK is not visible in the Linux environment; the NIC traffic totally bypasses the Linux stack. Instead a ‘Poll mode driver’ (PMD) that runs in user space is responsible for pulling the packets from the NIC. All the rest of the handling (application or protocol specific) has to happen in your user space ‘Application’. DPDK provides some helper libraries such as IP reassembly library (to re-assemble IP fragments), but does not provide any support for the whole TCP/IP stack. As such , your ‘Application’ is solely responsible for all the functionality beyond the ‘link layer’.
There are implementations of the TCP/IP stack over DPDK, such as mTCP, F-Stack etc. which can be used to aid your development. DPDK is fast gaining place in NFV, routing devices etc. Read more at dpdk.org.
You must be logged in to post a comment.