You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Avleo U200平台DPDK TestPMD收包为0问题排查求助

在Avleo U200平台上DPDK TestPMD环回测试RX数据包为0的排查请求

我在Avleo U200平台测试DPDK TestPMD应用,执行如下命令绑定驱动并启动TestPMD:

dpdk-20.11]$ sudo ./usertools/dpdk-devbind.py -b vfio-pci 08:00.0 08:00.1

dpdk-20.11]$ sudo ./build/app/dpdk-testpmd -l 1-3 -n 4 -a 0000:08:00.0 -a 0000:08:00.1 -- --burst=256 -i --nb-cores=1  --forward-mode=io --rxd=2048 --txd=2048 --mbcache=512 --mbuf-size=4096 

执行后输出如下:

EAL: Detected 12 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: No available hugepages reported in hugepages-2048kB
EAL: Debug dataplane logs available - lower performance
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL:   using IOMMU type 1 (Type 1)
EAL: Probe PCI driver: net_qdma (10ee:903f) device: 0000:08:00.0 (socket 0)
Device Type: Soft IP
IP Type: EQDMA Soft IP
Vivado Release: vivado 2020.2
PMD: qdma_get_hw_version(): QDMA RTL VERSION : RTL Base

PMD: qdma_get_hw_version(): QDMA DEVICE TYPE : Soft IP

PMD: qdma_get_hw_version(): QDMA VIVADO RELEASE ID : vivado 2020.2

PMD: qdma_identify_bars(): QDMA config bar idx :0

PMD: qdma_identify_bars(): QDMA AXI Master Lite bar idx :2

PMD: qdma_identify_bars(): QDMA AXI Bridge Master bar idx :-1

PMD: qdma_eth_dev_init(): QDMA device driver probe:
PMD: qdma_device_attributes_get(): qmax = 512, mm 1, st 1.

PMD: qdma_eth_dev_init(): PCI max bus number : 0x8
PMD: qdma_eth_dev_init(): PF function ID: 0
PMD: QDMA PMD VERSION: 2020.2.1
qdma_dev_entry_create: Created the dev entry successfully
EAL: Probe PCI driver: net_qdma (10ee:913f) device: 0000:08:00.1 (socket 0)
Device Type: Soft IP
IP Type: EQDMA Soft IP
Vivado Release: vivado 2020.2
PMD: qdma_get_hw_version(): QDMA RTL VERSION : RTL Base

PMD: qdma_get_hw_version(): QDMA DEVICE TYPE : Soft IP

PMD: qdma_get_hw_version(): QDMA VIVADO RELEASE ID : vivado 2020.2

PMD: qdma_identify_bars(): QDMA config bar idx :0

PMD: qdma_identify_bars(): QDMA AXI Master Lite bar idx :2

PMD: qdma_identify_bars(): QDMA AXI Bridge Master bar idx :-1

PMD: qdma_eth_dev_init(): QDMA device driver probe:
PMD: qdma_device_attributes_get(): qmax = 512, mm 1, st 1.

PMD: qdma_eth_dev_init(): PCI max bus number : 0x8
PMD: qdma_eth_dev_init(): PF function ID: 1
qdma_dev_entry_create: Created the dev entry successfully
EAL: No legacy callbacks, legacy socket not created
Interactive-mode selected
Set io packet forwarding mode
testpmd: create a new mbuf pool <mb_pool_0>: n=180224, size=4096, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
Configuring Port 0 (socket 0)
PMD: qdma_dev_configure(): Configure the qdma engines

PMD: qdma_dev_configure(): Bus: 0x0, PF-0(DEVFN) queue_base: 0

PMD: qdma_dev_tx_queue_setup(): Configuring Tx queue id:0 with 2048 desc

PMD: qdma_dev_tx_queue_setup(): Tx ring phys addr: 0x1515C6000, Tx Ring virt addr: 0x1515C6000
PMD: qdma_dev_rx_queue_setup(): Configuring Rx queue id:0

PMD: qdma_dev_start(): qdma-dev-start: Starting

PMD: qdma_dev_link_update(): Link update done

Port 0: 15:16:17:18:19:1A
Configuring Port 1 (socket 0)
PMD: qdma_dev_configure(): Configure the qdma engines

PMD: qdma_dev_configure(): Bus: 0x0, PF-1(DEVFN) queue_base: 1

PMD: qdma_dev_tx_queue_setup(): Configuring Tx queue id:0 with 2048 desc

PMD: qdma_dev_tx_queue_setup(): Tx ring phys addr: 0x1515A7000, Tx Ring virt addr: 0x1515A7000
PMD: qdma_dev_rx_queue_setup(): Configuring Rx queue id:0

PMD: qdma_dev_start(): qdma-dev-start: Starting

PMD: qdma_dev_link_update(): Link update done

Port 1: 15:16:17:18:19:1A
Checking link statuses...
PMD: qdma_dev_link_update(): Link update done

PMD: qdma_dev_link_update(): Link update done

Done
Error during enabling promiscuous mode for port 0: Operation not supported - ignore
Error during enabling promiscuous mode for port 1: Operation not supported - ignore
testpmd> start tx_first
io packet forwarding - ports=2 - cores=1 - streams=2 - NUMA support enabled, MP allocation mode: native
Logical Core 2 (socket 0) forwards packets on 2 streams:
  RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01
  RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00

  io packet forwarding packets/burst=256
  nb forwarding cores=1 - nb forwarding ports=2
  port 0: RX queue number: 1 Tx queue number: 1
    Rx offloads=0x0 Tx offloads=0x0
    RX queue: 0
      RX desc=2048 - RX free threshold=0
      RX threshold registers: pthresh=0 hthresh=0  wthresh=2
      RX Offloads=0x0
    TX queue: 0
      TX desc=2048 - TX free threshold=0
      TX threshold registers: pthresh=0 hthresh=0  wthresh=0
      TX offloads=0x0 - TX RS bit threshold=0
  port 1: RX queue number: 1 Tx queue number: 1
    Rx offloads=0x0 Tx offloads=0x0
    RX queue: 0
      RX desc=2048 - RX free threshold=0
      RX threshold registers: pthresh=0 hthresh=0  wthresh=2
      RX Offloads=0x0
    TX queue: 0
      TX desc=2048 - 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: 0              RX-dropped: 0             RX-total: 0
  TX-packets: 256            TX-dropped: 0             TX-total: 256
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 0              RX-dropped: 0             RX-total: 0
  TX-packets: 256            TX-dropped: 0             TX-total: 256
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 0              RX-dropped: 0             RX-total: 0
  TX-packets: 512            TX-dropped: 0             TX-total: 512
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Done.

执行dpdk-devbind.py绑定vfio-pci驱动后,接口在ip link中消失,但dpdk-devbind.py --status可正常查看。采用环回配置测试,结果显示TX数据包可正常发送,但RX数据包始终为0,求协助排查问题。

排查建议

  • 确认硬件环回配置:检查U200板卡上的物理环回跳线是否正确连接;如果是软环回,确认FPGA比特流中是否已配置QDMA的环回功能。
  • 验证QDMA PMD环回支持:确认DPDK 20.11版本的net_qdma驱动是否支持环回模式,是否需要添加额外启动参数启用环回。
  • 检查端口状态:在TestPMD交互模式下执行show port info all,确认端口链路状态为up,且环回模式已正确配置。
  • 调整RX队列参数:尝试修改RX阈值参数(pthresh/hthresh/wthresh),或者降低RX描述符数量,看是否能触发RX数据包接收。
  • 关闭调试日志:当前日志显示启用了调试数据平面日志,可能影响功能,尝试关闭调试编译选项重新编译DPDK后再测试。
  • 验证VFIO配置:确认IOMMU已正确启用,绑定vfio-pci后设备无资源冲突,可通过dmesg查看相关日志。
  • 切换转发模式:尝试使用TestPMD内置的软件环回模式(--forward-mode=loopback)或macswap模式测试,排除硬件环回的问题。

内容的提问来源于stack exchange,提问作者attdone

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.06 03:13:12