DPDK 快速发包流程
Basic knowledge
dpdk_flow.png是对上一篇原理概述dpdk 架构与原理的总结和添加了自己的理解,若有不同意见,欢迎指出,共同进步
Linux Kernel and CPU
dpdk init
DPDK Packet Distributor
DPDK compile and config
Dpdk compile
export RTE_TARGET=x86_64-native-linuxapp-gcc
export RTE_SDK=`pwd`
make -j 10 install T=x86_64-native-linuxapp-gcc
make -j 10 -C test/
Environmental configuration
huge page config
awk '/Hugepagesize/ {print $2}' /proc/meminfo
umount `awk '/hugetlbfs/ { print $2 }' /proc/mounts`
awk '/hugetlbfs/ { print $2 }' /proc/mounts
mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge
uio driver
modprobe uio
insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
EAL init
./x86_64-native-linuxapp-clang/app/testpmd
EAL: Detected 72 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: 1024 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size
EAL: Probing VFIO support...
EAL: PCI device 0000:03:00.0 on NUMA socket 0
EAL: probe driver: 8086:1572 net_i40e
EAL: PCI device 0000:03:00.1 on NUMA socket 0
EAL: probe driver: 8086:1572 net_i40e
EAL: PCI device 0000:03:00.2 on NUMA socket 0
EAL: probe driver: 8086:1572 net_i40e
EAL: PCI device 0000:03:00.3 on NUMA socket 0
EAL: probe driver: 8086:1572 net_i40e
DPDK Flow
DPDK Flow(packet distributor pipeline)
参考博客