Skip to content

DPDK Hands-onDPDK 入门实战教程

从零开始学习 DPDK 高性能网络编程

课程概览

课程主题难度需要网卡
Lesson 1Hello World - EAL 初始化
Lesson 2Hash 哈希表使用⭐⭐
Lesson 3网卡初始化与数据包捕获⭐⭐⭐
Lesson 4数据包协议解析⭐⭐⭐
Lesson 5Mempool 内存池管理⭐⭐
Lesson 6Flow Manager 流管理⭐⭐⭐⭐
Lesson 7多进程架构⭐⭐⭐⭐
Lesson 8进程间通信⭐⭐⭐
Lesson 9Timer 定时器⭐⭐
Lesson 10Ring SP/SC & MP/MC⭐⭐⭐
Lesson 12Ring HTS 模式⭐⭐⭐
Lesson 13Mbuf 入门⭐⭐

快速开始

环境要求

  • 操作系统: Linux (推荐 Ubuntu 20.04+)
  • DPDK: 版本 22.11+
  • 编译工具: GCC 7.0+, CMake 3.10+, pkg-config

构建项目

bash
# 克隆项目
git clone https://github.com/haolipeng/dpdk-hands-on.git
cd dpdk-hands-on

# 配置大页内存
echo 1024 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

# 构建
mkdir -p build && cd build
cmake ..
make

# 运行第一个示例
sudo ../bin/helloworld -l 0 --no-pci

参考资源

Released under the MIT License.