Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选 PDF转换器

首页 / 操作系统 / Linux / intel dpdk在Ubuntu 12.04中测试testpmd、helloworld程序

一、测试环境
操作系统:Ubuntu12.04  x86_64dpdk版本: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.htmTiny6410内核模块编译之HelloWorld http://www.linuxidc.com/Linux/2013-12/93634.htm用Pthreads进行共享内存编程----HelloWorld http://www.linuxidc.com/Linux/2013-04/83103.htmHadoop实例之HelloWorld http://www.linuxidc.com/Linux/2012-12/75406.htmQt 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-gcc2)、执行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 ScriptOption:下面是本人测试中顺序选择的部分截图下图是step 1 的结果更多详情见请继续阅读下一页的精彩内容: http://www.linuxidc.com/Linux/2014-09/106285p2.htm