DPDK(Data Plane Development Kit),是一种用户空间数据平面开发工具包,它的主要目标是为开发人员提供一个创建高性能数据平面应用程序的平台。DPDK开发者能够用C语言、汇编与新型Intel架构的linux内核进行交互,使得数据平面应用程序在高度优化的环境中运行。
随着芯片技术与高速网络接口技术的一日千里式发展,报文吞吐需要处理10Gbps 端口处理能力,世面上大量的 25G、 40G 甚至100G 高速端口已经出现,对于这些高吞吐量的网卡和应用场景往往需要专用的硬件加速器或者专门的网络处理器才能处理数据包的转发,传统的Linux协议栈在处理高流量的网络报文时往往会成为性能瓶颈(频繁的上下文切换和内存拷贝)。2009 年开始,以 Venky Venkastraen,Walter Gilmore,Mike Lynch为核心的 Intel 团队,开始了可行性研究, 希望借助纯软件技术+x86通用服务器(而不是专门的硬件)来实现对高速网络的支持,很快他们取得了一定的技术 突破,设计了运行在 Linux 用户态的网卡程序架构。随后,Intel与 6wind 进行了更进一步的合作,共同交付了早期的 DPDK 软件开发包。2011年开始, 6wind、Windriver、Tieto、Radisys 先后宣布了对 Intel DPDK 的商业服务 支持。Intel 起初只是将 DPDK以源代码方式分享给少量客户,作为评估IA 平台和硬件性能的软件服务模块, 随着时间推移与行业的大幅度接受, 2013年Intel 将 DPDK 这一软件以 BSD 开源方式,分享在Intel的网站上,供开发者免费下载。
这部分参考自:About - DPDK
Data Plane Development Kit (DPDK) is a Linux Foundation project that consists of libraries to accelerate packet processing workloads running on a wide variety of CPU architectures.
At its core, DPDK consists of a set of libraries and drivers that support fast packet processing across a variety of hardware and software environments. This framework includes an Environment Abstraction Layer (EAL) that abstracts hardware details from the applications, allowing developers to write portable code that runs efficiently on different platforms, including x86, ARM, and PowerPC processors.
EAL (Environment Abstraction Layer): Provides a basic interface between DPDK applications and the underlying hardware, abstracting away specifics of the operating system and hardware differences.
Memory Management: Includes hugepage support, memory pools, and buffer management, essential for efficient packet processing.
Poll Mode Drivers (PMDs): These are optimized drivers for various network interfaces, bypassing the kernel’s network stack to reduce latency and increase throughput.
Ring Buffers: Utilized for efficient queueing mechanisms, allowing high-speed inter-process communication.
APIs for Packet Processing: Offers a set of functions and libraries for packet manipulation, including header parsing, packet classification, and packet forwarding.
Crypto and Security: Provides libraries and drivers to support cryptographic operations and secure communication.
Eventdev and Timers: For event-driven programming and time management functionalities, aiding in scheduling and execution of tasks in a timely manner.