###### tags: `DPDK Test` # Intel X710 10GB DPDK Setting 安裝與配置 https://hackmd.io/@yenpc/S1DDT9fAQ 其他安裝與配置 https://www.itread01.com/content/1524632297.html https://inuyashaos.blogspot.com/2020/05/dpdk-ubuntu.html https://www.codeleading.com/article/11364273130/ https://www.xknote.com/ask/60fb39a70d7bf.html DPDK Intel NIC Performance Report https://fast.dpdk.org/doc/perf/DPDK_20_05_Intel_NIC_performance_report.pdf ### 範例環境 Ubuntu 20.04 apt-get update apt-get install librte-net-i40e21 apt-get install meson apt-get install gcc apt-get install python3-pyelftools sudo apt-get install make gcc python libpcap-dev libnuma-dev pkg-config -y sudo apt-get update ### 用編輯方式複製 sudo apt-get install -y python libpcap-dev build-essential linux-headers-`uname -r` libnuma-dev pkg-config gcc libnuma-dev libpcre3 libpcre3-dev libssl-dev ### Build DPDK https://doc.dpdk.org/guides-20.11/linux_gsg/build_dpdk.html #### Boot and DPDK Settings ![](https://i.imgur.com/62nOC3z.png) #### BOOT Settings vi /etc/default/grub default_hugepagesz=1G hugepagesz=1G hugepages=16 intel_iommu=on iommu=pt isolcpus=32-47 nohz_full=32-47 rcu_nocbs=32-47 sudo update-grub reboot cat /proc/cmdline #### DPDK Settings cd examples/ vi /l3fwd/l3fwd.h add #define RTE_TEST_RX_DESC_DEFAULT 4096 #define RTE_TEST_TX_DESC_DEFAULT 4096 meson -Dexamples=12fwd,13fwd build cd build apt-get install ninja-build ninja ninja install ldconfig DPDK and i40e FW 推薦匹配列表 https://doc.dpdk.org/guides/nics/i40e.html ## Running testpmd https://doc.dpdk.org/guides-16.11/nics/i40e.html https://doc.dpdk.org/guides-20.11/nics/build_and_test.html#pmd-build-and-test https://www.twblogs.net/a/5c45ce4ebd9eee35b3a72c32 重新開機後要在執行一次 #modprobe vfio-pci dpdk-stable-20.11.3#./usertools/dpdk-devbind.py --bind vfio-pci 0000:66:00.0 dpdk-stable-20.11.3#./usertools/dpdk-devbind.py --bind vfio-pci 0000:66:00.1 !要移除LAN cable再執行 ![](https://i.imgur.com/BVD793C.png) /dpdk-stable-20.11.3/build/app#./dpdk-testpmd -c 0x1 -n 4 -a 66:00.0 -- -i ![](https://i.imgur.com/j7dLaKf.png) ./build/examples/dpdk-l3fwd -l 46-47 -n 4 -a 0000:66:00.0 -- -p 0x1 --config='(0,0,47)(0,1,46)' ![](https://i.imgur.com/dh0lilu.png) ### spirent setting ![](https://i.imgur.com/Lx23asS.png) ![](https://i.imgur.com/1oblUcF.png) ![](https://i.imgur.com/RWGi3VP.png) ./build/examples/dpdk-l3fwd -l 46-47 -n 4 -a 0000:66:00.0 -- -p 0x1 --config='(0,0,47)(0,1,46)' ![](https://i.imgur.com/o51pjlU.png) ./build/examples/dpdk-l3fwd -l 47 -n 4 -a 0000:66:00.0 -- -p 0x1 --config='(0,0,47)' ![](https://i.imgur.com/hYkit4g.png) ### 範例 Running testpmd #modprobe vfio-pci dpdk-stable-20.11.3#./usertools/dpdk-devbind.py --bind vfio-pci 0000:66:00.0 dpdk-stable-20.11.3#./usertools/dpdk-devbind.py --bind vfio-pci 0000:66:00.1 /dpdk-stable-20.11.3/build/app#./dpdk-testpmd -c 0x1 -n 4 -a 66:00.0 -- -i (用編輯模式copy) apt-get install linux-tools-5.11.0-16-generic cpupower frequency-set -g performance cpupower -c 46-47 idle-set -d 1 cpupower -c 46-47 monitor service qat_service stop service ufw stop service unattended-upgrades stop service openvpn stop ifconfig ens98f0 mtu 9000 ifconfig ens98f1 mtu 9000 #### 1 Port ./build/examples/dpdk-l3fwd -l 47 -n 4 -a 0000:66:00.0 -- -p 0x1 --config='(0,0,47)' #### 2 Port ./build/examples/dpdk-l3fwd -l 46-47 -n 4 -a 0000:66:00.0 -a 0000:66:00.1 -- -p 0x3 --config='(0,0,47),(1,0,46)'