DPDK 19.08安装-ubuntu 18.04

DPDK 安装指导

Ubuntu18.04篇

Content

Version History

Content

1. 概述

1.1 介绍

1.2 简介

2.DPDK安装

2.1 软件版本

2.2 系统环境准备

2.3 编译安装DPDK

5.FAQ

1.概述

此文档介绍DPDK在ubuntu上的安装步骤和FAQ

1.1 介绍

待补充

1.2 简介

待补充

2.DPDK安装

2.1 软件版本

DPDK:dpdk-19.08.2

ubuntu版本:18.04

linux内核:5.4.0-150-generic

2.2 系统环境准备

依赖工具安装

sudo apt install build-essential

#编译程序必须的软件包,如果想在Ubuntu中编译c/c++程序,只需要安装该软件包

sudo apt-get install libnuma-dev

配置大页内存,开启immon功能

sudo vim /etc/default/grub

在GRUB_CMDLINE_LINUX末尾追加:

GRUB_CMDLINE_LINUX="find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US hugepages=512 intel_iommu=on iommu=pt"

重新生成引导配置

sudo grub-mkconfig -o /boot/grub/grub.cfg

重启并验证

cat /proc/meminfo |grep -i HugePages

dmesg | grep DMAR

2.3 编译安装DPDK 

设置环境变量

cd dpdk-stable-19.08.2

export RTE_SDK=`pwd`  

export RTE_TARGET=x86_64-native-linuxapp-gcc

===============================================================================

运行dpdk-setup.sh 编译

sunny@ubuntu:~/dpdk-stable-19.08.2$ cd usertools/

sunny@ubuntu:~/dpdk-stable-19.08.2/usertools$ ./dpdk-setup.sh

===============================================================================

Option: 编译选项选择36

[36] x86_64-native-linuxapp-gcc

Option: 36

回显:

===============================================================================

加载驱动,选择43

[43] Insert IGB UIO module

Option: 43

回显:

#Unloading any existing DPDK UIO module

#Loading uio module

#Loading DPDK UIO module

===============================================================================

配置大页内存46

[46] Setup hugepage mappings for non-NUMA systems

Option: 46

回显:

#Removing currently reserved hugepages

#Unmounting /mnt/huge and removing directory

Number of pages: 512

#Reserving hugepages

#Creating /mnt/huge and mounting as hugetlbfs

===============================================================================

查看网卡状态48,“0000:03:00.0”即网卡PCI地址,后续配置用”03:00.0”就可以

[48] Display current Ethernet/Baseband/Crypto device settings

Option: 48

回显:

#Network devices using DPDK-compatible driver

============================================

#0000:03:00.0 'VMXNET3 Ethernet Controller 07b0' drv=igb_uio unused=vmxnet3,vfio-pci

#Network devices using kernel driver

===================================

#0000:02:01.0 '82545EM Gigabit Ethernet Controller (Copper) 100f' if=ens33 drv=e1000 unused=igb_uio,vfio-pci *Active*

#No 'Baseband' devices detected

===============================================================================

绑定网卡49

需要先将网卡down:

---------------------------------sunny@ubuntu:~/dpdk-stable-19.08.2/usertools$ ifconfig ens160 down

[49] Bind Ethernet/Baseband/Crypto device to IGB UIO module

Option: 49

回显:

Enter PCI address of device to bind to IGB UIO driver: 03:00.0

OK

===============================================================================

运行测试程序53

[53] Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd)

Option: 53

#  Enter hex bitmask of cores to execute testpmd app on

#  Example: to execute app on cores 0 to 7, enter 0xff

bitmask: 7

#Launching app

#EAL: Detected 4 lcore(s)

#EAL: Detected 1 NUMA nodes

。。。。。。。。。。。。。。。

#Configuring Port 0 (socket 0)

#Port 0: 00:0C:29:71:E5:57

#Checking link statuses...

#Done

在命令行启动网卡

testpmd> start

io packet forwarding - ports=1 - cores=1 - streams=1 - NUMA support enabled, MP allocation mode: native

Logical Core 1 (socket 0) forwards packets on 1 streams:

  RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00

  io packet forwarding packets/burst=32

  nb forwarding cores=1 - nb forwarding ports=1

  port 0: RX queue number: 1 Tx queue number: 1

    Rx offloads=0x0 Tx offloads=0x0

    RX queue: 0

      RX desc=0 - RX free threshold=0

      RX threshold registers: pthresh=0 hthresh=0  wthresh=0

      RX Offloads=0x0

    TX queue: 0

      TX desc=0 - TX free threshold=0

      TX threshold registers: pthresh=0 hthresh=0  wthresh=0

      TX offloads=0x0 - TX RS bit threshold=0

testpmd> stop

Telling cores to stop...

Waiting for lcores to finish...

  ---------------------- Forward statistics for port 0  ----------------------

  RX-packets: 335            RX-dropped: 0             RX-total: 335

  TX-packets: 335            TX-dropped: 0             TX-total: 335

  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++

  RX-packets: 335            RX-dropped: 0             RX-total: 335

  TX-packets: 335            TX-dropped: 0             TX-total: 335

  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Done.

===============================================================================

环境搭建完成,60退出

[60] Exit Script

Option: 60

3.FAQ

1、如果编译安装过程中,绑定网卡可能会遇到python执行不了

解决方法:可能的原因是你本地安装的是python3,但是绑定网卡的执行程序调用的是python,可以去usertools目录下,修改dpdk-devbind.py文件,把第一行的python修改为python3

2、参考连接如下:但是要注意第三步的环境变量配置需要修改为 export RTE_TARGET=x86_64-native-linuxapp-gcc

https://blog.csdn.net/qq_18854309/article/details/125034702?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522169406703816800188541549%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=169406703816800188541549&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-2-125034702-null-null.142^v93^chatsearchT3_2&utm_term=dpdk%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA&spm=1018.2226.3001.4187

3、查看网卡的总线信息,先安装工具apt install ethtool

ethtool -i eth0

driver: vmxnet3

version: 1.4.16.0-k-NAPI

firmware-version:

expansion-rom-version:

bus-info: 0000:0b:00.0

supports-statistics: yes

supports-test: no

supports-eeprom-access: no

supports-register-dump: yes

supports-priv-flags: no

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
2. DPDK Release 18.08 2.1. New Features Added support for Hyper-V netvsc PMD. The new netvsc poll mode driver provides native support for networking on Hyper-V. See the Netvsc poll mode driver NIC driver guide for more details on this new driver. Added Flow API support for CXGBE PMD. Flow API support has been added to CXGBE Poll Mode Driver to offload flows to Chelsio T5/T6 NICs. Support added for: Wildcard (LE-TCAM) and Exact (HASH) match filters. Match items: physical ingress port, IPv4, IPv6, TCP and UDP. Action items: queue, drop, count, and physical egress port redirect. Added ixgbe preferred Rx/Tx parameters. Rather than applications providing explicit Rx and Tx parameters such as queue and burst sizes, they can request that the EAL instead uses preferred values provided by the PMD, falling back to defaults within the EAL if the PMD does not provide any. The provision of such tuned values now includes the ixgbe PMD. Added descriptor status check support for fm10k. The rte_eth_rx_descriptor_status and rte_eth_tx_descriptor_status APIs are now supported by fm10K. Updated the enic driver. Add low cycle count Tx handler for no-offload Tx. Add low cycle count Rx handler for non-scattered Rx. Minor performance improvements to scattered Rx handler. Add handlers to add/delete VxLAN port number. Add devarg to specify ingress VLAN rewrite mode. Updated mlx5 driver. Updated the mlx5 driver including the following changes: Added port representors support. Added Flow API support for e-switch rules. Added support for ACTION_PORT_ID, ACTION_DROP, ACTION_OF_POP_VLAN, ACTION_OF_PUSH_VLAN, ACTION_OF_SET_VLAN_VID, ACTION_OF_SET_VLAN_PCP and ITEM_PORT_ID. Added support for 32-bit compilation. Added TSO support for the mlx4 driver. Added TSO support for the mlx4 drivers from MLNX_OFED_4.4 and above. SoftNIC PMD rework. The SoftNIC PMD infrastructure has been restructured to use the Packet Framework, which makes it more flexible, modular and easier to add new functionality in the future. Updated the AESNI MB PMD. The AESNI MB PMD has been updated with additional support for: 3DES for 8, 16 and 24 byte keys. Added a new compression PMD using Intel’s QuickAssist (QAT) device family. Added the new QAT compression driver, for compression and decompression operations in software. See the Intel(R) QuickAssist (QAT) Compression Poll Mode Driver compression driver guide for details on this new driver. Updated the ISA-L PMD. Added support for chained mbufs (input and output).

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值