• 进入DPDK目录编译环境
# cd ~/DPDK/usertools
# ./dpdk-setup.py

注意,setup脚本需要在root权限下运行,并且每次重启电脑,都需要重新插入模块和绑定网卡。

  • 在step1中选取合适的选项编译DPDK环境:[14] x86_64-native-linuxapp-gcc
----------------------------------------------------------
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-thunderx-linuxapp-gcc
[6] arm64-xgene1-linuxapp-gcc
[7] arm-armv7a-linuxapp-gcc
[8] i686-native-linuxapp-gcc
[9] i686-native-linuxapp-icc
[10] ppc_64-power8-linuxapp-gcc
[11] x86_64-native-bsdapp-clang
[12] x86_64-native-bsdapp-gcc
[13] x86_64-native-linuxapp-clang
[14] x86_64-native-linuxapp-gcc
[15] x86_64-native-linuxapp-icc
[16] x86_x32-native-linuxapp-gcc
  • 在step2中选取合适的用户空间I/O模块:[17] Insert IGB UIO module

运行任何DPDK的应用都需要在内核加载合适的用户空间I/O模块(UIO module)

----------------------------------------------------------
Step 2: Setup linuxapp environment
----------------------------------------------------------
[17] Insert IGB UIO module
[18] Insert VFIO module
[19] Insert KNI module
[20] Setup hugepage mappings for non-NUMA systems
[21] Setup hugepage mappings for NUMA systems
[22] Display current Ethernet/Crypto device settings
[23] Bind Ethernet/Crypto device to IGB UIO module
[24] Bind Ethernet/Crypto device to VFIO module
[25] Setup VFIO permissions
  • 点选[22] Display current Ethernet/Crypto device settings 会显示机子的网卡情况
Network devices using DPDK-compatible driver
============================================
0000:01:00.0 'Ethernet Controller 10-Gigabit X540-AT2 1528' drv=igb_uio unused=ixgbe,vfio-pci Network devices using kernel driver
===================================
0000:01:00.1 'Ethernet Controller 10-Gigabit X540-AT2 1528' if=enp1s0f1 drv=ixgbe unused=igb_uio,vfio-pci *Active* Other Network devices
=====================
0000:03:00.0 'AR8151 v2.0 Gigabit Ethernet 1083' unused=atl1c,igb_uio,vfio-pci

目前的情况是第一张网卡绑定了DPDK,第二张是使用 Linux Kernel 的网卡,第三张还没有进行绑定。现在我们要绑定第三张网卡到DPDK。

  • 选择[23] Bind Ethernet/Crypto device to IGB UIO module,输入对应的PCI号(0000:后的):
Enter PCI address of device to bind to IGB UIO driver: 03:00.0
OK

再次查看网卡情况,可以看到网卡绑定成功:

Option: 22

Network devices using DPDK-compatible driver
============================================
0000:01:00.0 'Ethernet Controller 10-Gigabit X540-AT2 1528' drv=igb_uio unused=ixgbe,vfio-pci
0000:03:00.0 'AR8151 v2.0 Gigabit Ethernet 1083' drv=igb_uio unused=atl1c,vfio-pci Network devices using kernel driver
===================================
0000:01:00.1 'Ethernet Controller 10-Gigabit X540-AT2 1528' if=enp1s0f1 drv=ixgbe unused=igb_uio,vfio-pci *Active*

最新文章

  1. Windows服务器上使用bat定时执行php
  2. ubuntu下deb包的安装方法
  3. 湘潭1247 Pair-Pair(树状数组)
  4. Codeforces Round #163 (Div. 2)
  5. linux中断申请之request_threaded_irq
  6. 前端js,css文件合并三种方式,bat命令
  7. c sharp学习 问题记录
  8. JSON 语法规则详解
  9. mysql查询重复
  10. spring事务传播属性与隔离级别
  11. Myeclipse添加struts2支持后取消操作
  12. oracle decode函数的用法
  13. PowerBI分析Exchange服務器IIS運行日誌
  14. 2018 蓝桥杯省赛 B 组模拟赛(五)
  15. Hibernate+maven+eclipse 实现自动建表
  16. Python手写模拟单向链表对象,栈对象和树
  17. Lucene 基础知识
  18. pager-taglib分页注意事项
  19. 基于Netty的RPC简易实现
  20. Hibernate学习第4天--HQL——QBC查询详解,抓取策略优化。

热门文章

  1. 微信公众号发送消息模板(java)
  2. 1.Variables-变量(Dart中文文档)
  3. 20145234黄斐《Java程序设计》第十周
  4. mfc 带参数的构造函数
  5. python基础学习1-json,pickle的序列化和反序列化
  6. 【转载】基于MFC的ActiveX控件开发(3)
  7. 1433: [ZJOI2009]假期的宿舍
  8. 3235: [Ahoi2013]好方的蛇
  9. Spring 单元测试 RequestContextHolder.getRequestAttributes()).getRequest(); 为空的原因
  10. Object C学习笔记10-静态方法和静态属性