0
点赞
收藏
分享

微信扫一扫

DPDK官方信息查看

醉倾城1 2022-12-13 阅读 161


目录

  • ​​总览​​
  • ​​dpdk doc手册​​
  • ​​API 手册​​
  • ​​guides 手册​​
  • ​​Getting Started Guide for Linux​​
  • ​​Programmer’s Guide​​
  • ​​HowTo Guides​​
  • ​​DPDK Tools User Guides​​
  • ​​Testpmd Application User Guide​​
  • ​​Network Interface Controller Drivers​​
  • ​​Release Notes​​
  • ​​FAQ​​
  • ​​dpdk支持的硬件​​
  • ​​dpdk 源码下载​​

总览

DPDK官方信息查看_User

dpdk doc手册

  • dpdk doc文档、手册

https://www.dpdk.org/  ---> DPDK Core --->Document

各个版本的手册:

DPDK官方信息查看_dpdk_02

API 手册

  • API 手册
    介绍了当前版本的DPDK的 模块,源码(example例子的源码,各个文件分布,头文件、函数的源码等);

guides 手册

如上所示, 比较重要的几个方面是:

Getting Started Guide for Linux

参见:​​dpdk 21.11 Getting Started Guide for Linux​​ 主要分为:

  • 依赖
    系统参数、驱动
  • 编译
    如何编译 dpdk
  • 启动参数
    eal 启动参数解释
  • 其他功能点
    比如: rte_kni, 孤立 cpu, 性能调优点

Programmer’s Guide

详细介绍 DPDK 中的各个功能模块、lib库等。
比如: eal参数、各个组件/lib库(比如:rcu、ring、eal库,mempool, mbuf, rte_flow等等)/工具的原理、使用;

HowTo Guides

功能:
展示多个特性是如何测试的「包含:client怎么发包,测试程序怎么配置,怎么查看功能生效」以及 提供的一些 debug调试、故障排除/抓包/问题定位的建议。

参见:​​HowTo Guides​​

比如:测试 rte_flow
testpmd 配置 rte_flow;
client: 使用 scapy 发送包;
testpmd: 查看输出

DPDK Tools User Guides

dpdk 工具:比如

  • dpdk-devbind
    网卡和驱动的绑定、解绑定、查看;
    参见:​​​dpdk-devbind Application​​
  • dpdk-pmdinfo Application
    展示 一个 pmd(dpdk程序)的硬件支持情况。
    参见:​​​dpdk-pmdinfo Application​​

范例: #./dpdk-pmdinfo -t /opt/xxx/bin/dpvs 简单举支持的几个网卡驱动,如下所示:

# 查看两个接口(port_0,port_1)的接口统计;

# ./dpdk-proc-info -- -p 3 --xstats
EAL: No legacy callbacks, legacy socket not created
###### NIC extended statistics for port 0 #########
####################################################
rx_good_packets: 6864393
tx_good_packets: 17946209
rx_good_bytes: 434439746
tx_good_bytes: 1130778820
rx_missed_errors: 0
rx_errors: 0
tx_errors: 0
rx_mbuf_allocation_errors: 0
rx_q0_packets: 6864393
rx_q0_bytes: 434439746
rx_q0_errors: 0
rx_q1_packets: 0
rx_q1_bytes: 0
rx_q1_errors: 0
rx_q2_packets: 0
rx_q2_bytes: 0
rx_q2_errors: 0
rx_q3_packets: 0
rx_q3_bytes: 0
rx_q3_errors: 0
rx_q4_packets: 0
rx_q4_bytes: 0
rx_q4_errors: 0
rx_q5_packets: 0
rx_q5_bytes: 0
rx_q5_errors: 0
rx_q6_packets: 0
rx_q6_bytes: 0
rx_q6_errors: 0
rx_q7_packets: 0
rx_q7_bytes: 0
rx_q7_errors: 0
tx_q0_packets: 17946209
tx_q0_bytes: 1130778774
tx_q1_packets: 0
tx_q1_bytes: 0
tx_q2_packets: 0
tx_q2_bytes: 0
tx_q3_packets: 0
tx_q3_bytes: 0
tx_q4_packets: 0
tx_q4_bytes: 0
tx_q5_packets: 0
tx_q5_bytes: 0
tx_q6_packets: 0
tx_q6_bytes: 0
tx_q7_packets: 0
tx_q7_bytes: 0
tx_q8_packets: 0
tx_q8_bytes: 0
rx_crc_errors: 0
rx_illegal_byte_errors: 0
rx_error_bytes: 0
mac_local_errors: 0
mac_remote_errors: 0
rx_length_errors: 0
tx_xon_packets: 0
rx_xon_packets: 0
tx_xoff_packets: 0
rx_xoff_packets: 0
rx_size_64_packets: 3656912
rx_size_65_to_127_packets: 3207481
rx_size_128_to_255_packets: 0
rx_size_256_to_511_packets: 0
rx_size_512_to_1023_packets: 0
rx_size_1024_to_max_packets: 0
rx_broadcast_packets: 12
rx_multicast_packets: 0
rx_fragment_errors: 0
rx_undersize_errors: 0
rx_oversize_errors: 0
rx_jabber_errors: 0
rx_management_packets: 0
rx_management_dropped: 0
tx_management_packets: 0
rx_total_packets: 6889743
rx_total_bytes: 444098096
tx_total_packets: 17946209
tx_size_64_packets: 9349529
tx_size_65_to_127_packets: 8596680
tx_size_128_to_255_packets: 0
tx_size_256_to_511_packets: 0
tx_size_512_to_1023_packets: 0
tx_size_1024_to_max_packets: 0
tx_multicast_packets: 8
tx_broadcast_packets: 22
rx_mac_short_packet_dropped: 0
rx_l3_l4_xsum_error: 0
flow_director_added_filters: 192
flow_director_removed_filters: 0
flow_director_filter_add_errors: 0
flow_director_filter_remove_errors: 0
flow_director_matched_filters: 21
flow_director_missed_filters: 6856018
rx_fcoe_crc_errors: 0
rx_fcoe_dropped: 0
rx_fcoe_mbuf_allocation_errors: 0
rx_fcoe_packets: 0
tx_fcoe_packets: 0
rx_fcoe_bytes: 0
tx_fcoe_bytes: 0
rx_fcoe_no_direct_data_placement: 0
rx_fcoe_no_direct_data_placement_ext_buff: 0
tx_flow_control_xon_packets: 0
rx_flow_control_xon_packets: 0
tx_flow_control_xoff_packets: 0
rx_flow_control_xoff_packets: 0
rx_total_missed_packets: 0
out_pkts_untagged: 17946209
out_pkts_encrypted: 0
out_pkts_protected: 0
out_octets_encrypted: 0
out_octets_protected: 0
in_pkts_untagged: 0
in_pkts_badtag: 0
in_pkts_nosci: 0
in_pkts_unknownsci: 0
in_octets_decrypted: 0
in_octets_validated: 0
in_pkts_unchecked: 0
in_pkts_delayed: 0
in_pkts_late: 0
in_pkts_ok: 0
in_pkts_invalid: 0
in_pkts_notvalid: 0
in_pkts_unusedsa: 0
in_pkts_notusingsa: 0
rx_priority0_mbuf_allocation_errors: 0
rx_priority1_mbuf_allocation_errors: 0
rx_priority2_mbuf_allocation_errors: 0
rx_priority3_mbuf_allocation_errors: 0
rx_priority4_mbuf_allocation_errors: 0
rx_priority5_mbuf_allocation_errors: 0
rx_priority6_mbuf_allocation_errors: 0
rx_priority7_mbuf_allocation_errors: 0
rx_priority0_dropped: 0
rx_priority1_dropped: 0
rx_priority2_dropped: 0
rx_priority3_dropped: 0
rx_priority4_dropped: 0
rx_priority5_dropped: 0
rx_priority6_dropped: 0
rx_priority7_dropped: 0
rx_priority0_xon_packets: 0
rx_priority1_xon_packets: 0
rx_priority2_xon_packets: 0
rx_priority3_xon_packets: 0
rx_priority4_xon_packets: 0
rx_priority5_xon_packets: 0
rx_priority6_xon_packets: 0
rx_priority7_xon_packets: 0
rx_priority0_xoff_packets: 0
rx_priority1_xoff_packets: 0
rx_priority2_xoff_packets: 0
rx_priority3_xoff_packets: 0
rx_priority4_xoff_packets: 0
rx_priority5_xoff_packets: 0
rx_priority6_xoff_packets: 0
rx_priority7_xoff_packets: 0
tx_priority0_xon_packets: 0
tx_priority1_xon_packets: 0
tx_priority2_xon_packets: 0
tx_priority3_xon_packets: 0
tx_priority4_xon_packets: 0
tx_priority5_xon_packets: 0
tx_priority6_xon_packets: 0
tx_priority7_xon_packets: 0
tx_priority0_xoff_packets: 0
tx_priority1_xoff_packets: 0
tx_priority2_xoff_packets: 0
tx_priority3_xoff_packets: 0
tx_priority4_xoff_packets: 0
tx_priority5_xoff_packets: 0
tx_priority6_xoff_packets: 0
tx_priority7_xoff_packets: 0
tx_priority0_xon_to_xoff_packets: 0
tx_priority1_xon_to_xoff_packets: 0
tx_priority2_xon_to_xoff_packets: 0
tx_priority3_xon_to_xoff_packets: 0
tx_priority4_xon_to_xoff_packets: 0
tx_priority5_xon_to_xoff_packets: 0
tx_priority6_xon_to_xoff_packets: 0
tx_priority7_xon_to_xoff_packets: 0
####################################################
###### NIC extended statistics for port 1 #########
####################################################
rx_good_packets: 357928
tx_good_packets: 358509
rx_good_bytes: 33951354
tx_good_bytes: 32986232
rx_missed_errors: 0
rx_errors: 0
tx_errors: 0
rx_mbuf_allocation_errors: 0
rx_q0_packets: 357928
rx_q0_bytes: 33951354
rx_q0_errors: 0
rx_q1_packets: 0
rx_q1_bytes: 0
rx_q1_errors: 0
rx_q2_packets: 0
rx_q2_bytes: 0
rx_q2_errors: 0
rx_q3_packets: 0
rx_q3_bytes: 0
rx_q3_errors: 0
rx_q4_packets: 0
rx_q4_bytes: 0
rx_q4_errors: 0
rx_q5_packets: 0
rx_q5_bytes: 0
rx_q5_errors: 0
rx_q6_packets: 0
rx_q6_bytes: 0
rx_q6_errors: 0
rx_q7_packets: 0
rx_q7_bytes: 0
rx_q7_errors: 0
tx_q0_packets: 358509
tx_q0_bytes: 32986008
tx_q1_packets: 0
tx_q1_bytes: 0
tx_q2_packets: 0
tx_q2_bytes: 0
tx_q3_packets: 0
tx_q3_bytes: 0
tx_q4_packets: 0
tx_q4_bytes: 0
tx_q5_packets: 0
tx_q5_bytes: 0
tx_q6_packets: 0
tx_q6_bytes: 0
tx_q7_packets: 0
tx_q7_bytes: 0
tx_q8_packets: 0
tx_q8_bytes: 0
rx_crc_errors: 0
rx_illegal_byte_errors: 0
rx_error_bytes: 0
mac_local_errors: 0
mac_remote_errors: 0
rx_length_errors: 0
tx_xon_packets: 0
rx_xon_packets: 0
tx_xoff_packets: 0
rx_xoff_packets: 0
rx_size_64_packets: 31
rx_size_65_to_127_packets: 357883
rx_size_128_to_255_packets: 13
rx_size_256_to_511_packets: 1
rx_size_512_to_1023_packets: 0
rx_size_1024_to_max_packets: 0
rx_broadcast_packets: 1
rx_multicast_packets: 1
rx_fragment_errors: 0
rx_undersize_errors: 0
rx_oversize_errors: 0
rx_jabber_errors: 0
rx_management_packets: 0
rx_management_dropped: 0
tx_management_packets: 0
rx_total_packets: 383279
rx_total_bytes: 43635140
tx_total_packets: 358509
tx_size_64_packets: 24
tx_size_65_to_127_packets: 358476
tx_size_128_to_255_packets: 9
tx_size_256_to_511_packets: 0
tx_size_512_to_1023_packets: 0
tx_size_1024_to_max_packets: 0
tx_multicast_packets: 46
tx_broadcast_packets: 8
rx_mac_short_packet_dropped: 0
rx_l3_l4_xsum_error: 0
flow_director_added_filters: 0
flow_director_removed_filters: 0
flow_director_filter_add_errors: 0
flow_director_filter_remove_errors: 0
flow_director_matched_filters: 0
flow_director_missed_filters: 357279
rx_fcoe_crc_errors: 0
rx_fcoe_dropped: 0
rx_fcoe_mbuf_allocation_errors: 0
rx_fcoe_packets: 0
tx_fcoe_packets: 0
rx_fcoe_bytes: 0
tx_fcoe_bytes: 0
rx_fcoe_no_direct_data_placement: 0
rx_fcoe_no_direct_data_placement_ext_buff: 0
tx_flow_control_xon_packets: 0
rx_flow_control_xon_packets: 0
tx_flow_control_xoff_packets: 0
rx_flow_control_xoff_packets: 0
rx_total_missed_packets: 0
out_pkts_untagged: 358509
out_pkts_encrypted: 0
out_pkts_protected: 0
out_octets_encrypted: 0
out_octets_protected: 0
in_pkts_untagged: 0
in_pkts_badtag: 0
in_pkts_nosci: 0
in_pkts_unknownsci: 0
in_octets_decrypted: 0
in_octets_validated: 0
in_pkts_unchecked: 0
in_pkts_delayed: 0
in_pkts_late: 0
in_pkts_ok: 0
in_pkts_invalid: 0
in_pkts_notvalid: 0
in_pkts_unusedsa: 0
in_pkts_notusingsa: 0
rx_priority0_mbuf_allocation_errors: 0
rx_priority1_mbuf_allocation_errors: 0
rx_priority2_mbuf_allocation_errors: 0
rx_priority3_mbuf_allocation_errors: 0
rx_priority4_mbuf_allocation_errors: 0
rx_priority5_mbuf_allocation_errors: 0
rx_priority6_mbuf_allocation_errors: 0
rx_priority7_mbuf_allocation_errors: 0
rx_priority0_dropped: 0
rx_priority1_dropped: 0
rx_priority2_dropped: 0
rx_priority3_dropped: 0
rx_priority4_dropped: 0
rx_priority5_dropped: 0
rx_priority6_dropped: 0
rx_priority7_dropped: 0
rx_priority0_xon_packets: 0
rx_priority1_xon_packets: 0
rx_priority2_xon_packets: 0
rx_priority3_xon_packets: 0
rx_priority4_xon_packets: 0
rx_priority5_xon_packets: 0
rx_priority6_xon_packets: 0
rx_priority7_xon_packets: 0
rx_priority0_xoff_packets: 0
rx_priority1_xoff_packets: 0
rx_priority2_xoff_packets: 0
rx_priority3_xoff_packets: 0
rx_priority4_xoff_packets: 0
rx_priority5_xoff_packets: 0
rx_priority6_xoff_packets: 0
rx_priority7_xoff_packets: 0
tx_priority0_xon_packets: 0
tx_priority1_xon_packets: 0
tx_priority2_xon_packets: 0
tx_priority3_xon_packets: 0
tx_priority4_xon_packets: 0
tx_priority5_xon_packets: 0
tx_priority6_xon_packets: 0
tx_priority7_xon_packets: 0
tx_priority0_xoff_packets: 0
tx_priority1_xoff_packets: 0
tx_priority2_xoff_packets: 0
tx_priority3_xoff_packets: 0
tx_priority4_xoff_packets: 0
tx_priority5_xoff_packets: 0
tx_priority6_xoff_packets: 0
tx_priority7_xoff_packets: 0
tx_priority0_xon_to_xoff_packets: 0
tx_priority1_xon_to_xoff_packets: 0
tx_priority2_xon_to_xoff_packets: 0
tx_priority3_xon_to_xoff_packets: 0
tx_priority4_xon_to_xoff_packets: 0
tx_priority5_xon_to_xoff_packets: 0
tx_priority6_xon_to_xoff_packets: 0
tx_priority7_xon_to_xoff_packets: 0
####################################################

# 查看 traffic manage(tm) 流量关联相关的端口配置:
# ./dpdk-proc-info -- --show-tm
EAL: No legacy callbacks, legacy socket not created
========== show - TM PMD ==========
- Generic for port (0)
-- driver name net_ixgbe
-- max vf (0)
-- max tx queues (64)
-- number of tx queues (9)
- MAX: nodes (137) levels (3) children (128)
- identical nodes: non leaf (1) leaf (1)
- Shaper MAX:
-- total (137)
-- private (137) private dual (0)
-- shared (0) shared dual (0)
- mark support:
-- vlan dei: GREEN (0) YELLOW (0) RED (0)
-- ip ecn tcp: GREEN (0) YELLOW (0) RED (0)
-- ip ecn sctp: GREEN (0) YELLOW (0) RED (0)
-- ip dscp: GREEN (0) YELLOW (0) RED (0)
- mask stats (0x0) dynamic update (0x0)
- sched MAX:
-- total (1)
-- sp levels (1)
-- wfq children per group (0)
-- wfq groups (0)
-- wfq weight (1)
- CMAN support:
-- WRED mode: pkt (0) byte (0)
-- head drop (0)
-- MAX WRED CONTEXT: total (0) private (0) shared (0)
- Level 0
-- node MAX: 1 non leaf 1 leaf 0
-- indetical: non leaf 1 leaf 1
- Level 1
-- node MAX: 8 non leaf 8 leaf 0
-- indetical: non leaf 1 leaf 1
- Level 2
-- node MAX: 128 non leaf 0 leaf 128
-- indetical: non leaf 1 leaf 1
- Generic for port (1)
-- driver name net_ixgbe
-- max vf (0)
-- max tx queues (64)
-- number of tx queues (9)
- MAX: nodes (137) levels (3) children (128)
- identical nodes: non leaf (1) leaf (1)
- Shaper MAX:
-- total (137)
-- private (137) private dual (0)
-- shared (0) shared dual (0)
- mark support:
-- vlan dei: GREEN (0) YELLOW (0) RED (0)
-- ip ecn tcp: GREEN (0) YELLOW (0) RED (0)
-- ip ecn sctp: GREEN (0) YELLOW (0) RED (0)
-- ip dscp: GREEN (0) YELLOW (0) RED (0)
- mask stats (0x0) dynamic update (0x0)
- sched MAX:
-- total (1)
-- sp levels (1)
-- wfq children per group (0)
-- wfq groups (0)
-- wfq weight (1)
- CMAN support:
-- WRED mode: pkt (0) byte (0)
-- head drop (0)
-- MAX WRED CONTEXT: total (0) private (0) shared (0)
- Level 0
-- node MAX: 1 non leaf 1 leaf 0
-- indetical: non leaf 1 leaf 1
- Level 1
-- node MAX: 8 non leaf 8 leaf 0
-- indetical: non leaf 1 leaf 1
- Level 2
-- node MAX: 128 non leaf 0 leaf 128
-- indetical: non leaf 1 leaf 1

# 显示 mem ring
# ./dpdk-proc-info -- --show-ring | grep arp_ring_c0 -A 30
ring <arp_ring_c0>@0x17f887180
flags=2
size=2048
capacity=2047
ct=0
ch=0
pt=0
ph=0
used=0
avail=2047
ring <arp_ring_c1>@0x17f882ec0
flags=2
size=2048
capacity=2047
ct=0
ch=0
pt=0
ph=0
used=0
avail=2047
ring <arp_ring_c2>@0x1a3ffbd80
flags=2
size=2048
capacity=2047
ct=0
ch=0
pt=0
ph=0
used=0
avail=2047

# ./dpdk-proc-info -- --show-ring=arp_ring_c0
EAL: No legacy callbacks, legacy socket not created
========== show - RING ==========
- Name (arp_ring_c0) on socket (0)
- flags:
-- Single Producer Enqueue (0)
-- Single Consmer Dequeue (2)
- size (2048) mask (0x7ff) capacity (2047)
- count (0) free count (2047)
- full (0) empty (1)

# 展示mempool 信息
# ./dpdk-proc-info -- --show-mempool | grep -i dp_vs_dest_pool_20 -A 20
mempool <dp_vs_dest_pool_20>@0x120026a640
flags=10
socket_id=1
pool=0x120016a440
iova=0xe0026a640
nb_mem_chunks=1
size=131071
populated_size=131071
header_size=64
elt_size=320
trailer_size=64
total_obj_size=448
private_data_size=0
ops_index=5
ops_name: <ring_mp_mc>
avg bytes/object=448.003418
internal cache infos:
cache_size=0
common_pool_count=131028
no statistics available

# ./dpdk-proc-info -- --show-mempool=dp_vs_dest_pool_20
EAL: No legacy callbacks, legacy socket not created
========== show - MEMPOOL ==========
- Name: dp_vs_dest_pool_20 on socket 1
- flags:
-- No spread (n)
-- No cache align (n)
-- SP put (n), SC get (n)
-- Pool created (y)
-- No IOVA config (n)
- Size 131071 Cache 0 element 320
- header 64 trailer 64
- private data size 0
- memezone - socket 1
- Count: avail (131028), in use (43)
- ops_index 5 ops_name ring_mp_mc

#

  • dpdk-dumpcap
    功能:作为备程序,抓取dpdk主程序进入,出去的流量,写入到文件中。
    前提条件:dpdk主程序中存在初始化包抓包框架,已知testpmd初始了该框架,其他的dpdk程序没有初始化。
    区分:和dpdk-pdump 程序区分。
    参见:​​​DPDK packet capture libraries and tools​​
  • DPDK官方信息查看_ci_10


  • DPDK官方信息查看_User_11


Testpmd Application User Guide

testpmd 是dpdk中很重要的一个example app, 可以测试多种场景。

Network Interface Controller Drivers

网卡的特性(speed, link status, LRO, LSO, RSS, Flow control, crc/checksum offload),各个网卡驱动(虚拟设备的驱动,I40e, ixgbe , Mlx5, ice)等等

参见:
​​​Network Interface Controller Drivers​​​
​​​dpdk supported nics​​​
​​​各个网卡下的性能报告​​

Release Notes

发布记录,每个版本的new features, bugfixes, known issues, api变更 等;

FAQ

dpdk中的常见的问题;

  • Sample Applications User Guides
    介绍dpdk中自带的多个范例(sample/examples)的编译方式,如何启动,运行等;
  • HowTo Guides
  • DPDK Tools User Guides
    dpdk 的辅助工具使用,比如 dpdk-pdump 抓包, dpdk-devbind 网卡绑定等;
  • Network Interface Controller Drivers
    网卡的特性(speed, link status, mtu、 LRO, LSO, RSS, SR-IOV、FEC、Flow control, crc/checksum offload),各个网卡驱动(虚拟设备的驱动,af_packet pmd, kni pmd, I40e, ixgbe , ice, Mlx5, bnx2x )等等

dpdk支持的硬件

  • dpdk支持的硬件信息

https://www.dpdk.org/  ---> DPDK Core --->

DPDK官方信息查看_dpdk_12

dpdk 源码下载

  • dpdk 源码下载
    推荐方法一;
  • 方法一:
    参见:​​​dpdk官方tar包下载​​ https://www.dpdk.org/ —> DPDK Core —> Download
  • DPDK官方信息查看_sed_13


  • 方法二:
    从github中下载;


举报

相关推荐

0 条评论