一、测试环境
操作系统: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模式。
--------------------------------------分割线 --------------------------------------
用Pthreads进行共享内存编程----HelloWorld
Hadoop实例之HelloWorld
Qt Creator for PlayBook上的HelloWorld (Windows版)
--------------------------------------分割线 --------------------------------------
三、测试过程
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 的结果