DPDK network packet forwarding processing

https://www.intel.cn/content/www/cn/zh/communications/data-plane-development-kit.html

https://www.dpdk.org/

 

Software Description

Intel® DPDK, the full name of Intel Data Plane Development Kit, is a data plane development tool set provided by Intel. It provides library functions and driver support for efficient data packet processing in user space under Intel architecture (IA) processor architecture. It is different from Linux systems. For the purpose of universal design, it focuses on high-performance processing of data packets in network applications. It has been verified to run on most Linux operating systems, including FreeBSD 9.2, Fedora release18, Ubuntu 12.04 LTS, RedHat Enterprise Linux 6.3 and Suse EnterpriseLinux 11 SP2. DPDK uses BSDLicense, which greatly facilitates enterprises to implement their own protocol stacks or applications on its basis. 

It should be emphasized that the DPDK application program runs in the user space and uses the data plane library provided by itself to send and receive data packets, bypassing the Linux kernel protocol stack for processing data packets. The Linux kernel regards the DPDK application as an ordinary user-mode process, including its compilation, connection, and loading methods, which are no different from ordinary programs.

The overall structure

Mainly have the following cores

  • Network layer module

  • Memory management module

  • Kernel management module

Network module

Overall analysis

DPDK has a special treatment for the network process from the kernel layer to the user layer relative to the traditional network module. The following is a comparison between the traditional network module structure and the network structure in DPDK

Traditional Linux network layer:

Hardware interrupt--->Get the packet and distribute it to the kernel thread--->Software interrupt--->The kernel thread processes the packet in the protocol stack--->Notify the user layer when the processing is completed, the user layer receives the packet-->Network layer-- ->Logic layer--->Business layer

dpdk network layer:

Hardware interrupt ---> abandon the interrupt process. The
user layer fetches packets through device mapping ---> enters the user layer protocol stack ---> logic layer ---> business layer

Summary after comparison:

dpdk advantages:

  • Reduce the number of interruptions.

  • Reduce the number of memory copies.

  • Bypassing the linux protocol stack and entering the user protocol stack, the user gains control of the protocol stack and can customize the protocol stack to reduce complexity

dpdk disadvantage

  • The transfer of the kernel stack to the user layer increases development costs.

  • Low-load servers are not practical and will cause the core to spin.

Guess you like

Origin blog.csdn.net/boonya/article/details/110009478