📚
详细的中文教程
每个示例都配有完整的中文教程,从基础到进阶,循序渐进,适合 DPDK 零基础学习者
| 课程 | 主题 | 难度 | 需要网卡 |
|---|---|---|---|
| Lesson 1 | Hello World - EAL 初始化 | ⭐ | ❌ |
| Lesson 2 | Hash 哈希表使用 | ⭐⭐ | ❌ |
| Lesson 3 | 网卡初始化与数据包捕获 | ⭐⭐⭐ | ✅ |
| Lesson 4 | 数据包协议解析 | ⭐⭐⭐ | ✅ |
| Lesson 5 | Mempool 内存池管理 | ⭐⭐ | ❌ |
| Lesson 6 | Flow Manager 流管理 | ⭐⭐⭐⭐ | ✅ |
| Lesson 7 | 多进程架构 | ⭐⭐⭐⭐ | ❌ |
| Lesson 8 | 进程间通信 | ⭐⭐⭐ | ❌ |
| Lesson 9 | Timer 定时器 | ⭐⭐ | ❌ |
| Lesson 10 | Ring SP/SC & MP/MC | ⭐⭐⭐ | ❌ |
| Lesson 12 | Ring HTS 模式 | ⭐⭐⭐ | ❌ |
| Lesson 13 | Mbuf 入门 | ⭐⭐ | ❌ |
# 克隆项目
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