目录

  • 信息查看
    • 网卡型号查看
    • 其他信息查看
  • DDP
    • DDP 介绍
      • 背景
      • DDP的出现
    • DDP 的原理
    • DDP的需求
      • intel E800系列和E700系列对比
    • DDP 分类
      • 区别
      • 查看
      • comms DDP 下载
      • OS-default DDP支持的协议以及包类型
      • 指定网卡加载加载指定版本的DDP
    • 版本选择
    • 安装DDP
    • DDP 支持的FDIR以及RSS
      • FDIR
      • RSS
    • E810系列网卡特性
  • DPDK ICE PMD介绍
    • safe mode
    • rte_flow pipeline mode
  • 启动DPVS
  • 注意事项
    • DPDK版本选择
  • 参考文档

信息查看

网卡型号查看

lspci |grep -i eth
lspci -vvv | grep -i PCI-ID -A 50 | grep -i "produce name"
Note:
lspci 可能只可以得到 device-id, lspci -vvv 可以得到 设备id和设备型号的


159b 是 设备ID,对应的就是 E810-XXV. 8086代表的是intel
参见:Intel® Ethernet E800 Series devices:

其他信息查看

# dmesg -T |grep -i ddp
# lsmod |grep -i ice
# modinfo ice
# find / -type d -name ddp

DDP

DDP 介绍

背景

通过网卡的多队列和RSS将网包根据一些关键字段散列(hash)到不同的队列已成为一种主流的在x86平台开发信通以及云计算领域产品的方式。
在整体产品架构规划中,不同的网卡队列(Rx/Tx Queues)往往对应/绑定着不同的CPU核(Worker),以利用资源隔离的方式提高性能。
传统的RSS,往往是依据header的五元组来做散列。通常,网卡可以识别出的报文类型包括ipv4-tcp|ipv4-udp|ipv4-other|ipv6-tcp|l2-payload等等,然后根据能识别出的类型进行关键字段的提取。
但现在如此简单的识别能力已经不能满足业务的需求。在复杂的协议和隧道通讯场景下,往往还需要识别隧道内层header甚至私有字段才能实现业务能力的最优化。
所以对RSS/Fdir来说,首先需要能“识别”出特定的协议报文,才能找到关键的字段进行散列操作。

DDP的出现

在网卡出厂的时候,是可以预置一些协议类型的,但还是最好能有自定义的动态调整的能力。DDP(Dynamic Device Personalization) ,就是上面说的定制化的技能——动态地赋予网卡识别新协议的能力。
具有这种能力之后,就可以把任意协议的网包按用户意愿提取出关键字段(Key),然后散列到网卡各个Rx队列里。比如VxLAN协议中的内层DIP等等。

下图是一个赋予网卡GTP-U协议(好吧,我并不知道这是什么…)识别能力,并可以依据TEID字段的值进行RSS计算的示例:

总得来说就是,可以把这部分classification的活儿offload到硬件上,减轻后续CPU处理/分发时的压力,同时均衡一下负载,提升整体性能。

DDP 的原理

参考:
Intel® Ethernet Controller E810 Dynamic Device Personalization (DDP) for Telecommunications Technology Guide.
Intel® Ethernet 800 Series Telecommunication (Comms) Dynamic Device Personalization (DDP) Package.

DDP的需求

Intel 700系列网卡以上
固件版本6.01以上
一个由Intel官方出品的特定协议识别的binary package file(需要到官网下载)
DPDK提供的配置接口

intel E800系列和E700系列对比

DDP 分类

区别

ddp 有 OS default DDP 和 comms DDP

查看

如何查看使用的是OS default DDP 还是 comms DDP。
通过dmesg 的日志,如下所示:

comms DDP 下载

配置手册的地址:
https://www.intel.la/content/www/xl/es/products/details/ethernet/800-controllers/e810-controllers/docs.html?s=AtoZ&p=2DPDK 20.11 配置手册:
https://cdrdv2.intel.com/v1/dl/getContent/633514?explicitVersion=truecomms ddp下载地址:
https://downloadcenter.intel.com/download/29889/Intel-Ethernet-800-Series-
Telecommunication-Comms-Dynamic-Device-Personalization-DDP-Package

OS-default DDP支持的协议以及包类型



指定网卡加载加载指定版本的DDP

如果一个设备上存在多个网卡,需要指定的某个网卡加载指定版本的DDP包,其他的网卡保持不变,继续加载默认的DDP包。

执行步骤,如下所示:

0>更改 /usr/lib/firmware/intel/ice/ddp 下的 ice.pkg 关联的pkg。
比如:之前为:
ice-1.3.4.0.pkg
ice.pkg -> ./ice-1.3.4.0.pkg替换为:
ice-1.3.26.0.pkg
ice.pkg -> ./ice-1.3.26.0.pkg1> 通过 dpdk-devbind 将单卡双口的两个口都给解绑定。
比如:
dpdk-devbind -u 0000:31:00.1
dpdk-devbind -u 0000:31:00.0注:该口不可以作为ssh的登陆口,一旦将接口从ice中解绑定,就会导致ssh断开。
一般情况下,一个服务器上,存在多块卡(每个卡可能2个口,管理口以及业务口);
对于管理口可以不更新ddp,业务口更新ddp,ssh通过管理口ip登陆,然后更新业务卡的ddp固件版本即可。2> 然后在通过 dpdk-devbind -b ice xxx 给绑定到ice驱动上。
比如:
dpdk-devbind -b ice  0000:31:00.1
dpdk-devbind -b ice  0000:31:00.03》dmesg -T | grep -i ddp 查看日志,是否成功加载成功。注:如果单卡双口,只是将其中一个口从ice解绑定,然后在进行绑定,可能依然会 ice 驱动加载指定版本的 ddp失败。
需要将两个口都进行解绑定ice,然后再绑定ice。

版本选择


安装DDP

默认安装 ice kmod 即可主动安装 DDP。


DDP 支持的FDIR以及RSS

FDIR


  • ethtool 设置FDIR
    Intel® Ethernet Flow Director filters are used to direct traffic that matches specified characteristics.They are enabled through the ethtool ntuple interface. To enable or disable the Intel® Ethernet Flow Director and these filters:
ethtool -K <ethX> ntuple <off|on>
Where:
<ethX> = The Ethernet device to program.To display all of the active filters:
# ethtool -u <ethX>To add a new filter:
# ethtool -U <ethX> flow-type <type> src-ip <ip> [m <ip_mask>] dst-ip <ip> [m
<ip_mask>] src-port <port> [m <port_mask>] dst-port <port> [m <port_mask>] action
<queue>
where:
<type> = Can be ip4, tcp4, udp4, sctp4, ip6, tcp6, udp6, or sctp6.
<ip> = The IP address to match on.
<ip_mask> = The IPv4 address to mask on. (Note: These filters use inverted masks.)
<port> = The port number to match on.
<port_mask> = The 16-bit integer for masking. (Note: These filters use inverted masks.)
<queue> = The queue to direct traffic toward. (-1 discards the matched traffic.)To delete a filter:
# ethtool -U <ethX> delete <N>
where:
<N> = The Filter ID displayed when printing all the active filters, and might also have been
specified using “loc <N>” when adding the filter.

RSS

Packets are sent to different cores for interrupt processing, and then subsequently forwarded to cores where the consuming process is running.
RSS aims to spread incoming packets across cores while directing packets from common flows to the same core.

Ethtool RSS Hash Flow:
ethtool -N <ethX> rx-flow-hash <type> <option>
Where:
<ethX> =     The Ethernet device to program.
<type> =     tcp4 — Signifies TCP over IPv4.udp4 — Signifies UDP over IPv4.tcp6 — Signifies TCP over IPv6.udp6 — Signifies UDP over IPv6.
<option> =   s — Hash on the IP source address of the Rx packet.d — Hash on the IP destination address of the Rx packet.f — Hash on bytes 0 and 1 of the Layer 4 header of the Rx packet.To enable RSS Hashing on Source address, Destination address, Source ports and Destination ports:
ethtool -n <ethX> rx-flow-hash udp4

E810系列网卡特性



DPDK ICE PMD介绍

The ice PMD (librte_net_ice) provides poll mode driver support for 10/25/50/100 Gbps Intel® Ethernet 800 Series Network Adapters based on the Intel Ethernet Controller E810 and Intel Ethernet Connection E822/E823.

safe mode

rte_flow pipeline mode

  • In pipeline mode
    a flow can be set at one specific stage by setting parameter priority.
    Currently, we support two stages: priority = 0 or !0.
  • Flows with priority 0 located at the first pipeline stage which typically be used as a firewall to drop the packet on a blocklist(we called it permission stage). At this stage, flow rules are created for the device’s exact match engine: switch.
  • Flows with priority !0 located at the second stage, typically packets are classified here and be steered to specific queue or queue group (we called it distribution stage), At this stage, flow rules are created for device’s flow director engine.
  • For none-pipeline mode
    priority is ignored, a flow rule can be created as a flow director rule or a switch rule depends on its pattern/action and the resource allocation situation, all flows are virtually at the same pipeline stage.
  • By default, generic flow API is enabled in none-pipeline mode, user can choose to use pipeline mode by setting devargs parameter pipeline-mode-support, for example:
-a 80:00.0,pipeline-mode-support=1

启动DPVS

1> 设置孤立 cpu,设置大页;
2> 安装 rte_kni 以及 igb_uio 内核模块;
3> 解绑定 ice驱动,绑定 igb_uio;
4> 启动 DPVS;

  • Note:
ice_flow_validate  -->ice_flow_process_filter -->ice_flow_valid_attr
中会对 rte_flow的  priority 进行检查;priority 非0的 rte_flow,可能会导致 dpvs 设置 rte_flow失败。解决:
方法一:升级到更高的DPDK版本,比如21.11; 20.11应该是检查不通过的。
方法二:DPVS代码中,rte_flow的  priority 设置为0. 注:设置为0,对于 ice 设备应该是通过的,但是对于 ixgbe/mlx 设备是否有影响未知。

注意事项

DPDK版本选择

DPDK 19.11 及其之后才支持 intel 25G E810-XXV 设备。

  • 其他测试方法:查看某个版本的DPDK是否支持某个网卡
1> ethtool -i xxx
查看 网卡驱动;
2> lspci | grep -i eth
得到网卡的pci-id;
3> lspci -s PCI-ID -x
得到某个pci上的网卡的 vendor-id, device-id;
4> 某个版本的 dpdk工具,查看该版本DPDK支持的网卡、驱动:
比如:./dpdk-pmdinfo.py -t ./dpvs
dpvs 是通过该版本的 dpdk 编译而成。Note:
./dpdk-pmdinfo.py 需要安装 python module elftools
yum install -y  python3-pyelftools python-pyelftools
/bin/python3.6 -m pip install --upgrade pip
pip3 install pyelftools
注:
对于此中,使用dpdk 18.11 编译而成的 dpvs, ./dpdk-pmdinfo.py -t ./dpvs 输出的信息,并没有 net_ice 。说明不支持。

参考文档

http://doc.dpdk.org/guides/nics/ice.html
【dpdk ice pmd】https://www.intel.com/content/www/us/en/search.html?ws=text#q=e810&sort=relevancy&layout=table.
【e810 datasheet】https://decodezp.github.io/2018/12/18/quickwords6-ddp/
【什么是DDP】http://fast.dpdk.org/doc/perf/DPDK_20_11_Intel_NIC_performance_report.pdf
【dpdk intel ice驱动网卡性能测试】https://blog.csdn.net/weixin_37097605/article/details/101514279
【intel 网卡:82599 vs XXV710 】https://blog.csdn.net/Longyu_wlz/article/details/119791696
【ice 100G 网卡 rx_packets 与 rx_bytes 统计问题】https://blog.csdn.net/Longyu_wlz/article/details/119843281
【ice 100G 网卡 rss_hash 配置无效】

DPVS适配Intel E810-XXV系列25G网卡相关推荐

  1. DPDK Rx flexible descriptor在Intel E810网卡中的使用

    什么是Rx flexible descriptor Intel E810系列网卡支持Rx flexible descriptor,这是一种可以通过软件定义格式并配置到网卡硬件中的Rx descript ...

  2. DPDK Rx flexible descriptor 在Intel E810 网卡中的使用

    + 什么是Rx flexible descriptor Intel E810系列网卡支持Rx flexible descriptor,这是一种可以通过软件定义格式并配置到网卡硬件中的Rx descri ...

  3. DPVS适配Mellanox-25G/100G网卡

    目录 安装Mlnx-Ofed Mellanox 25G网卡 信息搜集 下载合适的mlx-ofed 安装MLNX-OFED Mellanox 100G网卡 DPDK适配网卡 查看DPDK官方信息 DPD ...

  4. DPVS适配博通100G网卡

    目录 背景 检查 基本信息查看 处理 dpdk-devbind 性能报告 博通网卡在DPDK中的性能测试报告 问题 rte_flow_validate 失败 rte_flow_crete 时没有区分t ...

  5. Intel万兆网卡,intel万兆双口网卡X540T2 性能解剖

    Intel万兆网卡的型号种类相对来说是比较丰富的,每款型号所拥有的性能也是不一样的,下面就和大家分享Intel万兆网卡中比较受欢迎的一款型号intel万兆双口网卡X540T2. intel万兆双口网卡 ...

  6. 服务器e4系列,Intel Xeon E系列服务器处理器

    一.Intel Xeon E系列CPU 命名规则 首先,Intel E3,E5,E7代表了3个不同档次的至强CPU,这种命名方式类似桌面上的Core i3,i5,i7,分别对应好.更好.最好. 其次, ...

  7. Intel E810 Advanced RSS介绍

    一. Advanced RSS的特性 Legacy的RSS是对普通五元组(src ip, dst ip, src port, dst port, protocol)进行哈希,而且默认情况下是对报文的五 ...

  8. intel realsense D400系列相机介绍(一)

    文章目录 intel realsense D4 2 intel realsense D400介绍 2.3 立体视觉深度技术概述 2.4 摄像机系统框图 2.5 英特尔Intel® RealSense™ ...

  9. 从 dpdk-20.11 移植 intel E810 百 G 网卡 pmd 驱动到 dpdk-16.04 中

    文章目录 前言 移植前的调研工作 dpdk-20.11 ice pmd 驱动源码的组成 移植问题与解决方案记录 16.04 使用 make 编译,20.11 使用 meson 与 ninja 方式编译 ...

最新文章

  1. java 重用性_提高Java代码重用性的三个方法
  2. Linux redhat 9.0 中挂载U盘的方法!
  3. 【今晚8点半】:对话袁家军——成都的多媒体圈
  4. [C++STL]deque容器用法介绍
  5. 编译时检查JPA查询
  6. python实现杨辉三角形博客园_Python实现杨辉三角
  7. 班级的每日作业和任务目标
  8. [Java] 蓝桥杯ALGO-42 算法训练 送分啦
  9. 微积分(一)——二重积分与三重积分笔记
  10. 约束优化方法_2_——Frank-Wolfe方法
  11. Linux Mint 19 Tara Beta 版发布,基于 Ubuntu 18.04
  12. postgresql 10 的并行(parallel)简介
  13. 深大教学区Dr.com,实现校园网自动认证的请求
  14. 任务分配的穷举法、匈牙利法、分支定界法
  15. MT6762 datasheet,MT6762规格书,MT6762芯片参数资料
  16. python学习-06(模块化编程)
  17. Haproxy启动故障:Starting proxy:cannot bind socke
  18. ACL / RBAC/ABAC
  19. java反序列化浅探
  20. 半年招聘筛选了400+份简历,告诉你怎么写容易被撩!

热门文章

  1. 数据结构python版 答案_中国大学慕课答案大全_数据结构与算法Python版章节测试答案...
  2. 【U8+】用友U8同一个账套使用了好多年,需要将以前年度进行分离、删除。
  3. 修改服务器后账套不存在,默认账套不存在
  4. java 微信抽奖_微信随机生成红包金额算法java版
  5. 中科燕园gis外包------北京市人口普查地理信息系统
  6. 发明专利申请过程及案例下载
  7. excel转json对象工具推荐
  8. Android水彩滤镜,Reactor Player水彩效果滤镜
  9. 震旦复印机扫描到服务器文件夹,震旦打印一体机扫描文件上传到win2016共享文件夹,不能上传...
  10. Zynq7000 IO分配