dpdk
环境适配
dpdk22.11
4.19.90-24.4.v2101.ky10.x86_64
指导文档
2. System Requirements — Data Plane Development Kit 22.11.1 documentation (dpdk.org)
Required Tools and Libraries
dnf groupinstall "Development Tools"
yum install --assumeyes python3-pip
pip3 install meson ninja
pip3 install meson ninja
yum install numactl
yum install numactl-devel
检查内核>=4.14
uname -r
glibc >= 2.7 (可选项)
ldd --version
dpdk的编译
tar -Jxf dpdk-22.11.1.tar.xz
cd dpdk-stable-22.11.1
meson -Dexamples=all build #meson build
ninja -C build
加载驱动,配置vfio-pci
modprobe vfio
modprobe vfio-pci enable_sriov=1
cd dpdk-stable-22.11.1
./usertools/dpdk-devbind.py -s
./usertools/dpdk-devbind.py -b vfio-pci 0000:21:00.0
./usertools/dpdk-devbind.py -b vfio-pci 0000:61:00.0
./usertools/dpdk-devbind.py -b vfio-pci 0000:61:00.1
临时配置Hugepagesize
### 查看网卡所在node
cat /sys/bus/pci/devices/0000\:21\:00.0/numa_node
mkdir -p /mnt/hugepages
mount -t hugetlbfs nodev /mnt/hugepages #或者mountpoint -q /mnt/hugepages
cd /root/build_uts/dpdk/dpdk-next-net-private && ./usertools/dpdk-devbind.py -b vfio-pci 0000:21:00.0
cd dpdk-stable-22.11.1
### 多numa机器
echo 64 > /sys/devices/system/node/node2/hugepages/hugepages-2048kB/nr_hugepages
echo 1024 > /sys/devices/system/node/node6/hugepages/hugepages-2048kB/nr_hugepages
### 单节点
echo 64 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
cat /proc/meminfo | grep Huge
testpmd
cd /root/build_uts/dpdk/dpdk-next-net-private && ./build/app/dpdk-testpmd -l 16-19 -n 4 -- -i
start
show port stats all
l2fwd
./build/examples/dpdk-l2fwd -a 0000:21:00.0 -l 16-19 -n 4 -- -q 1 -p 0x3
./build/examples/dpdk-l2fwd -a 0000:61:00.0 -l 48-51 -n 4 -- -q 1 -p 0x1
dpdk l2fwd
export RTE_SDK=/(自己的安装目录)/dpdk-stable-18.02.2 #DPDK的安装目录
export RTE_TARGET=x86_64-native-linuxapp-gcc #DPDK的目标环境目录
make
./l2fwd -l 0-3 -n 4 -- -q 8 -p 3
参数说明:
-c 指定cpu
-n 内存通道数量
-p 0x3接口bitmap
编译18.11dpdk网卡驱动
dpdk-18.11.11.tar.xz文件
解压
进入dpdk-stable-18.11.11/usertools/目录下
然后执行:./dpdk-setup.sh
选择15,
选择19
选择35
参考:
DPDK L2FWD使用 - 简书 (jianshu.com)
(47条消息) 使用DPDK应用示例l2fwd进行性能测试_redwingz的博客-CSDN博客_dpdk l2fwd 性能测试
(47条消息) l2fwd 测试_疯疯癫癫的博客-CSDN博客_l2fwd
(47条消息) DPDK总结(网卡初始化)_hz5034的博客-CSDN博客_rte_eth_dev_start
(47条消息) dpdk:vfio-pci模式下iommu(N+Y)-Huge配置-numa配置_linggang_123的博客-CSDN博客
(47条消息) DPDK 21.11.0-rc2 环境配置以及测试_三颗水的博客-CSDN博客_挂载巨页
(29条消息) DPDK : 用 TestPMD 测试 DPDK 性能和功能_dpdk testpmd_技术探索者的博客-CSDN博客
标签:vfio,博客,l2fwd,pci,hugepages,dpdk From: https://www.cnblogs.com/ftiany/p/17762153.html