一、測試環境
操作系統:Ubuntu12.04 x86_64
dpdk版本:1.6.0r2
虛擬機:VMware 10
網卡: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
二、測試准備
利用VMware 給 Ubuntu 12.04添加4塊虛擬網卡,添加網卡的過程中選擇的是默認的NAT模式。
--------------------------------------分割線 --------------------------------------
HelloWorld之Hibernate版 http://www.linuxidc.com/Linux/2014-04/99294.htm
在Ubuntu上編寫Qt HelloWorld程序 http://www.linuxidc.com/Linux/2014-06/103671.htm
Tiny6410內核模塊編譯之HelloWorld http://www.linuxidc.com/Linux/2013-12/93634.htm
用Pthreads進行共享內存編程----HelloWorld http://www.linuxidc.com/Linux/2013-04/83103.htm
Hadoop實例之HelloWorld http://www.linuxidc.com/Linux/2012-12/75406.htm
Qt Creator for PlayBook上的HelloWorld (Windows版) http://www.linuxidc.com/Linux/2012-05/60653.htm
--------------------------------------分割線 --------------------------------------
三、測試過程
1、利用setup.sh測試testpmd程序
1)、配置環境變量RTE_SDK 和 RTE_TARGET
解壓dpdk文件: tar -xf dpdk-1.6.0r2.tar.gz
進入解壓後的文件夾 :cd dpdk-1.6.0r2
設置環境變量RTE_SDK、RTE_TARGET
export RTE_SDK= `pwd`
export RTE_TARGET = x86_64-default-linuxapp-gcc
2)、執行setup.sh腳本
setup.sh腳本在tools目錄中,在dpdk目錄中執行命令“./tools/setup.sh”,可能需要root權限。
下面的代碼是彈出的提示,按步驟順序選擇即可。
步驟2 需要關閉eth0、eth1,執行命令sudo ifconfig eth0 down關閉eth0,執行命令sudo ifconfig eth1 down關閉eth1。
Step 1: Select the DPDK environment to build
----------------------------------------------------------
[1] i686-default-linuxapp-gcc
[2] i686-default-linuxapp-icc
[3] x86_64-default-bsdapp-gcc
[4] x86_64-default-linuxapp-gcc
[5] x86_64-default-linuxapp-icc
[6] x86_64-ivshmem-linuxapp-gcc
[7] x86_64-ivshmem-linuxapp-icc
----------------------------------------------------------
Step 2: Setup linuxapp environment
----------------------------------------------------------
[8] Insert IGB UIO module
[9] Insert KNI module
[10] Setup hugepage mappings for non-NUMA systems
[11] Setup hugepage mappings for NUMA systems
[12] Display current Ethernet device settings
[13] Bind Ethernet device to IGB UIO module
----------------------------------------------------------
Step 3: Run test application for linuxapp environment
----------------------------------------------------------
[14] Run test application ($RTE_TARGET/app/test)
[15] Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd)
----------------------------------------------------------
Step 4: Other tools
----------------------------------------------------------
[16] List hugepage info from /proc/meminfo
----------------------------------------------------------
Step 5: Uninstall and system cleanup
----------------------------------------------------------
[17] Uninstall all targets
[18] Unbind NICs from IGB UIO driver
[19] Remove IGB UIO module
[20] Remove KNI module
[21] Remove hugepage mappings
[22] Exit Script
Option:
下面是本人測試中順序選擇的部分截圖
下圖是step 1 的結果
更多詳情見請繼續閱讀下一頁的精彩內容: http://www.linuxidc.com/Linux/2014-09/106285p2.htm