Data Plane Development Kit (DPDK): Getting Started

时间:2022-09-02 12:05:19

参考:dpdk getting started

系统:

Ubuntu 14.04

内核信息:

执行 uname -a

Linux chen-VirtualBox 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Using the Data Plane Development Kit

预准备

三种安装途径:

(1) wget www.dpdk.org/browse/dpdk/snapshot/dpdk-2.1.0.tar.gz

(2) sudo apt-get www.dpdk.org/browse/dpdk/snapshot/dpdk-2.1.0.tar.gz

(3) yum install www.dpdk.org/browse/dpdk/snapshot/dpdk-2.1.0.tar.gz

Ubuntu系统下选择(1) 或者 (2),等待五分钟安装完毕。

解压压缩包:

tar zxvf dpdk-2.1.0.tar.gz

进入目录:

cd dpdk-2.1.0

检查CPU设置 Check the CPU configurations.

cd tools
./cpu_layout.py

结果:

Data Plane Development Kit (DPDK): Getting Started

检查NIC配置 Check the NIC configurations.

./dpdk_nic_bind.py --status

结果:

Data Plane Development Kit (DPDK): Getting Started

Set up the DPDK

setup.sh is a useful utility that guides you through the process of compiling DPDK and configuring your system. To run it you need to be the root, and from the tools directory simply type:

./setup.sh

运行脚本,出现如下选项:

------------------------------------------------------------------------------
RTE_SDK exported as /admin/software_installfiles/dpdk-2.1.0
------------------------------------------------------------------------------
----------------------------------------------------------
Step 1: Select the DPDK environment to build
----------------------------------------------------------
[1] i686-native-linuxapp-gcc
[2] i686-native-linuxapp-icc
[3] ppc_64-power8-linuxapp-gcc
[4] tile-tilegx-linuxapp-gcc
[5] x86_64-ivshmem-linuxapp-gcc
[6] x86_64-ivshmem-linuxapp-icc
[7] x86_64-native-bsdapp-clang
[8] x86_64-native-bsdapp-gcc
[9] x86_64-native-linuxapp-clang
[10] x86_64-native-linuxapp-gcc
[11] x86_64-native-linuxapp-icc
[12] x86_x32-native-linuxapp-gcc ----------------------------------------------------------
Step 2: Setup linuxapp environment
----------------------------------------------------------
[13] Insert IGB UIO module
[14] Insert VFIO module
[15] Insert KNI module
[16] Setup hugepage mappings for non-NUMA systems
[17] Setup hugepage mappings for NUMA systems
[18] Display current Ethernet device settings
[19] Bind Ethernet device to IGB UIO module
[20] Bind Ethernet device to VFIO module
[21] Setup VFIO permissions ----------------------------------------------------------
Step 3: Run test application for linuxapp environment
----------------------------------------------------------
[22] Run test application ($RTE_TARGET/app/test)
[23] Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd) ----------------------------------------------------------
Step 4: Other tools
----------------------------------------------------------
[24] List hugepage info from /proc/meminfo
----------------------------------------------------------
Step 5: Uninstall and system cleanup
----------------------------------------------------------
[25] Uninstall all targets
[26] Unbind NICs from IGB UIO or VFIO driver
[27] Remove IGB UIO module
[28] Remove VFIO module
[29] Remove KNI module
[30] Remove hugepage mappings [31] Exit Script Option:

你需要选择一个选项运行。

首先选择DPDK环境进行编译,一般选择Option 10.

结果:

Data Plane Development Kit (DPDK): Getting Started

设置linux app环境,Option 13,加载最新的IGB UIO模型,并编译它的驱动。

结果:

Data Plane Development Kit (DPDK): Getting Started

关于IGB UIO:IGB UIO is a DPDK kernel module which deals with PCI enumeration and handles links status interrupts in user mode, instead of being handled by the kernel.

接下来设置 Huge page mappings。需要根据在预准备阶段跑的命令./cpu_layout.py所显示的socket个数进行选择。

我的socket个数为0,选择 Option 16. 在教程内选择的是Option 17.

选择了 Option 16,在跳出来的选项中输入128.

Data Plane Development Kit (DPDK): Getting Started

注意:如果选择了Option 17,那么根据原教程需要输入两次128。

接下来查看当前的以太网设置,Option 18:

Data Plane Development Kit (DPDK): Getting Started

Option 19,从Linux kernel driver中解耦出网卡,再通过Option 13绑定到IGB UIO模型(视频教程中没有进行选项13的操作,这里根据视频教程来)。

Option 19:

Data Plane Development Kit (DPDK): Getting Started

注意:Option 19,需要输入一个PCI的地址,这个地址需要在弹出的内容中找到有igb.uio的选项。

我这里只有一个选项,填的是00:03.0

再次查看以太网设置。

Option 18:

Data Plane Development Kit (DPDK): Getting Started

使用Option 24测试下:

Data Plane Development Kit (DPDK): Getting Started

Option 31 退出。

2016/10/21

Data Plane Development Kit (DPDK): Getting Started的更多相关文章

  1. PatentTips - Data Plane Packet Processing Tool Chain

    BACKGROUND The present disclosure relates generally to systems and methods for providing a data plan ...

  2. How to install JDK (Java Development Kit) on Linux

    This tutorial will guide you on how to install JDK (Java Development Kit) on Linux. Since I use Cent ...

  3. Cloudera Development Kit(CDK) 简介

    Cloudera Development Kit(CDK) 简介 guibin.beijing@gmail.com 2013.07.02 CDK简介 CDK(Cloudera Development ...

  4. 【关注图像采集视频传输】之CYUSB3014 EZ-USB FX3 Software Development Kit

    网址:http://www.cypress.com.与之前的High Speed FX2相比,新的产品叫Super Speed  FX3,沿用了之前的命名习惯.FX2芯片内嵌一个8051核,FX3则内 ...

  5. 380-Xilinx Kintex UltraScale FPGA KCU1500 Acceleration Development Kit

    Xilinx Kintex UltraScale FPGA KCU1500 Acceleration Development Kit Product Description The Kintex® U ...

  6. FBX Software Development Kit

    FBX Software Development Kit The FBX Software Development Kit (FBX SDK) allows software developers t ...

  7. eclipse解压后启动弹出A Java Runtime Evironment(JRE) or Java Development Kit(JDK)....

    系统环境:win7 64bit JDK:jdk-7u79-windows-x64 Eclipse:eclipse-jee-helios-win32 启动eclipse:弹出A Java Runtime ...

  8. ubuntu myeclipse 启动时提示 A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be avail ....

    jdk已经安装过但是启动eclipse时提示“A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be avail  ...

  9. Linux 下报错:A Java RunTime Environment (JRE) or Java Development Kit (JDK) must解决方案

    一.报错环境:在Linux mint下,前几天还用得很好的的eclipse,今天开机不知为什么这样. Linux 下报错:A Java RunTime Environment (JRE) or Jav ...

随机推荐

  1. MVC5入门

    http://www.cnblogs.com/youring2/p/mvc-5-examining-the-edit-methods-and-edit-view.html

  2. Codeforces 706 C. Hard problem (dp)

    题目链接:http://codeforces.com/problemset/problem/706/C 给你n个字符串,可以反转任意一个字符串,反转每个字符串都有其对应的花费ci. 经过操作后是否能满 ...

  3. 新建VM_Script

    在Hyper-V群集中,不需要设置VM的自启动,当宿主机意外关机重新启动后,上面的VM会自动转移到另一台主机:如果另一台主机处于关机状态,则宿主机重新启动后,其VM也会自启动(如果其VM在宿主机关机前 ...

  4. Eclipse Java 关联源码

    今天打代码的时候打算看看Java的源码是怎么实现的 没想到还没关联源码 遇到上面的情况只需要关联下源码就可以对着方法按F3查看JAVA的开源代码. 解决上面如下: 找到jdk的安装目录 找到src.z ...

  5. Win7系统修改hosts无法保存怎么办?

    背景 有的时候我们需要修改hosts文件,但是在某些情况下竟提示保存不了.之前有一次IntelliJ IDEA提示我快到期了,于是我到网上找到了一个激活方法,但需要将一个地址放到hosts文件中去,此 ...

  6. HTML事件属性

    1.常用窗口事件属性 属性 值 描述 onbeforeonload script 在文档加载之前运行脚本 onblur script 当窗口失去焦点时运行脚本 onerror script 当错误发生 ...

  7. Ubuntu允许root远程登录配置

    1.背景 近期在本地的虚拟机VMware上安装了Ubuntu Server 17.04,由于系统是*面的,所有操作都需要通过Linux命令进行操作.后来不想直接在服务器上操作,想通过远程工具Xshe ...

  8. SQL优化之踩过的坑【一】

    正看资料看的过瘾,突然收到报警,说服务器负载太高,好吧,登录服务器看看,我擦嘞,还能不能愉快的玩耍了?下面是当时的负载情况 看见mysql使用cpu已经到了2000,io没有等待.说明应该没有大的临时 ...

  9. 《剑指offer》第四题(二维数组中的查找)

    // 二维数组中的查找 // 题目:在一个二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按 // 照从上到下递增的顺序排序.请完成一个函数,输入这样的一个二维数组和一个 // 整数,判断数组 ...

  10. 【bzoj2219-数论之神】求解x^a==b(%n)-crt推论-原根-指标-BSGS

    http://www.lydsy.com/JudgeOnline/problem.php?id=2219 弄了一个晚上加一个午休再加下午一个钟..终于ac..TAT 数论渣渣求轻虐!! 题意:求解 x ...