ubantu18.04@Intel 82545EM 【安装文档】TRex流量分析仪保姆级安装指南--基于VMware虚拟机( 二 )

添加环境变量在dpdk的文件目录下配置环境变量,否则会导致之后用脚本安装dpdk构建环境时出错
root@ubuntu:/root/trex/v3.00/dpdk-stable-18.11.9# export RTE_SDK=`pwd`root@ubuntu:/root/trex/v3.00/dpdk-stable-18.11.9# export DESTDIR=`pwd`root@ubuntu:/root/trex/v3.00/dpdk-stable-18.11.9# export RTE_TARGET=x86_64-default-linuxapp-gcc加载uio驱动
# 加载uio驱动root@ubuntu:/root/trex/v3.00/dpdk-stable-18.11.9# modprobe uio使用脚本安装dpdk使用dpdk-setup.sh脚本进行安装
root@ubuntu:/root/trex/v3.00/dpdk-stable-18.11.9# ./usertools/dpdk-setup.sh------------------------------------------------------------------------------ RTE_SDK exported as /root/dpdk---------------------------------------------------------------------------------------------------------------------------------------- Step 1: Select the DPDK environment to build----------------------------------------------------------[1] arm64-armv8a-linuxapp-clang[2] arm64-armv8a-linuxapp-gcc[3] arm64-dpaa2-linuxapp-gcc[4] arm64-dpaa-linuxapp-gcc[5] arm64-stingray-linuxapp-gcc[6] arm64-thunderx-linuxapp-gcc[7] arm64-xgene1-linuxapp-gcc[8] arm-armv7a-linuxapp-gcc[9] i686-native-linuxapp-gcc[10] i686-native-linuxapp-icc[11] ppc_64-power8-linuxapp-gcc[12] x86_64-native-bsdapp-clang[13] x86_64-native-bsdapp-gcc[14] x86_64-native-linuxapp-clang[15] x86_64-native-linuxapp-gcc[16] x86_64-native-linuxapp-icc[17] x86_x32-native-linuxapp-gcc---------------------------------------------------------- Step 2: Setup linuxapp environment----------------------------------------------------------[18] Insert IGB UIO module[19] Insert VFIO module[20] Insert KNI module[21] Setup hugepage mappings for non-NUMA systems[22] Setup hugepage mappings for NUMA systems[23] Display current Ethernet/Crypto device settings[24] Bind Ethernet/Crypto device to IGB UIO module[25] Bind Ethernet/Crypto device to VFIO module[26] Setup VFIO permissions---------------------------------------------------------- Step 3: Run test application for linuxapp environment----------------------------------------------------------[27] Run test application ($RTE_TARGET/app/test)[28] Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd)---------------------------------------------------------- Step 4: Other tools----------------------------------------------------------[29] List hugepage info from /proc/meminfo---------------------------------------------------------- Step 5: Uninstall and system cleanup----------------------------------------------------------[30] Unbind devices from IGB UIO or VFIO driver[31] Remove IGB UIO module[32] Remove VFIO module[33] Remove KNI module[34] Remove hugepage mappings[35] Exit ScriptOption:步骤一根据虚拟机的环境选择相应的build,例如我的虚拟机是64位Intel架构的环境,则选择[15]x86_64-native-linuxapp-gcc
...Installation in /root/dpdk/ complete------------------------------------------------------------------------------ RTE_TARGET exported as x86_64-native-linuxapp-gcc------------------------------------------------------------------------------Press enter to continue ...注:若此时输出信息为以下情况(报错“Installation cannot run with T defined and DESTDIR undefined”)
INSTALL-APP dpdk-test-eventdevINSTALL-MAP dpdk-test-eventdev.mapBuild complete [x86_64-native-linuxapp-gcc]Installation cannot run with T defined and DESTDIR undefined------------------------------------------------------------------------------ RTE_TARGET exported as x86_64-native-linuxapp-gcc--------------------------------------------Press enter to continue ...请先添加环境变量并再次执行[15]
步骤二

  • 选择[18]加载igb_uio模块
Unloading any existing DPDK UIO moduleLoading DPDK UIO modulePress enter to continue ...
  • 选择[19]加载VFIO module
Unloading any existing VFIO moduleLoading VFIO modulechmod /dev/vfioOKPress enter to continue ...
  • 选择[20]加载KNI module
Unloading any existing DPDK KNI moduleLoading DPDK KNI modulePress enter to continue ...
  • 选择[21]来创建Hugepage
Option: 21Removing currently reserved hugepagesUnmounting /mnt/huge and removing directoryInput the number of 2048kB hugepagesExample: to have 128MB of hugepages available in a 2MB huge page system,enter '64' to reserve 64 * 2MB pagesNumber of pages: 1024Reserving hugepagesCreating /mnt/huge and mounting as hugetlbfsPress enter to continue ...
  • 选择[24]来绑定PCI网卡
Option: 24Network devices using kernel driver===================================0000:02:01.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' if=ens33 drv=e1000 unused=igb_uio,vfio-pci *Active*0000:02:06.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' if=ens38 drv=e1000 unused=igb_uio,vfio-pci0000:02:07.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' if=ens39 drv=e1000 unused=igb_uio,vfio-pci No 'Crypto' devices detected============================No 'Eventdev' devices detected==============================No 'Mempool' devices detected=============================No 'Compress' devices detected==============================Enter PCI address of device to bind to IGB UIO driver: 02:06.0OKPress enter to continue ...============================================================================================================================================Option: 24Network devices using DPDK-compatible driver============================================0000:02:06.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' drv=igb_uio unused=e1000,vfio-pciNetwork devices using kernel driver===================================0000:02:01.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' if=ens33 drv=e1000 unused=igb_uio,vfio-pci *Active*0000:02:07.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' if=ens39 drv=e1000 unused=igb_uio,vfio-pci No 'Crypto' devices detected============================No 'Eventdev' devices detected==============================No 'Mempool' devices detected=============================No 'Compress' devices detected==============================Enter PCI address of device to bind to IGB UIO driver: 02:07.0OKPress enter to continue ...

推荐阅读