DPDK:testpmd 收发包为0

DPDK:testpmd 收发包为0

[20210726_01:45:57]testpmd> start
[20210726_01:45:57]  io packet forwarding - CRC stripping disabled - packets/burst=32
[20210726_01:45:57]  nb forwarding cores=1 - nb forwarding ports=0
[20210726_01:45:57]  RX queues=1 - RX desc=128 - RX free threshold=0
[20210726_01:45:57]  RX threshold registers: pthresh=0 hthresh=0 wthresh=0
[20210726_01:45:57]  TX queues=1 - TX desc=512 - TX free threshold=0
[20210726_01:45:57]  TX threshold registers: pthresh=0 hthresh=0 wthresh=0
[20210726_01:45:57]  TX RS bit threshold=0 - TXQ flags=0x0
[20210726_01:46:23]testpmd> stop
[20210726_01:46:23]Telling cores to stop...
[20210726_01:46:23]Waiting for lcores to finish...
[20210726_01:46:23]
[20210726_01:46:23]  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
[20210726_01:46:23]  RX-packets: 0              RX-dropped: 0             RX-total: 0
[20210726_01:46:23]  TX-packets: 0              TX-dropped: 0             TX-total: 0
[20210726_01:46:23]  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

原因是可以在前面初始化log找到:

[20210726_01:42:36]EAL: PCI device 0000:02:01.0 on NUMA socket -1
[20210726_01:42:36]EAL:   probe driver: 8086:100f rte_em_pmd
[20210726_01:42:36]EAL:   Not managed by a supported kernel driver, skipped
[20210726_01:42:36]EAL: PCI device 0000:02:04.0 on NUMA socket -1
[20210726_01:42:36]EAL:   probe driver: 8086:100f rte_em_pmd
[20210726_01:42:36]EAL:   Not managed by a supported kernel driver, skipped
[20210726_01:42:36]EAL: PCI device 0000:02:05.0 on NUMA socket -1
[20210726_01:42:36]EAL:   probe driver: 8086:100f rte_em_pmd
[20210726_01:42:36]EAL:   Not managed by a supported kernel driver, skipped
[20210726_01:42:36]EAL: No probed ethernet devices

没有可用设备,当然不会有收发包。网卡在配置时失败了,没有bind到igb_uio上。日志上可以看到uio网卡在Other network devices里面。

[20210726_01:35:15]Option: 22
[20210726_01:35:15]
[20210726_01:35:15]
[20210726_01:35:15]Network devices using DPDK-compatible driver
[20210726_01:35:15]============================================
[20210726_01:35:15]<none>
[20210726_01:35:15]
[20210726_01:35:15]Network devices using kernel driver
[20210726_01:35:15]===================================
[20210726_01:35:15]0000:02:01.0 '82545EM Gigabit Ethernet Controller (Copper)' if=ens33 drv=e1000 unused=igb_uio *Active*
[20210726_01:35:15]
[20210726_01:35:15]Other network devices
[20210726_01:35:15]=====================
[20210726_01:35:15]0000:02:04.0 '82545EM Gigabit Ethernet Controller (Copper)' unused=e1000,igb_uio
[20210726_01:35:15]0000:02:05.0 '82545EM Gigabit Ethernet Controller (Copper)' unused=e1000,igb_uio

将这两个网卡重新bind igb_uio。

[20210726_01:33:47]Option: 22
[20210726_01:33:47]
[20210726_01:33:47]
[20210726_01:33:47]Network devices using DPDK-compatible driver
[20210726_01:33:47]============================================
[20210726_01:33:47]0000:02:04.0 '82545EM Gigabit Ethernet Controller (Copper)' drv=igb_uio unused=e1000
[20210726_01:33:47]0000:02:05.0 '82545EM Gigabit Ethernet Controller (Copper)' drv=igb_uio unused=e1000

然后再用testpmd测试。初始化日志可以看到,只有PCI device 0000:02:01.0因为没bind igb_uio所以才打印Not managed by a supported kernel driver, skipped。已经bind的两块网卡,多了很多信息。

[20210726_02:23:21]EAL: PCI device 0000:02:01.0 on NUMA socket -1
[20210726_02:23:21]EAL:   probe driver: 8086:100f rte_em_pmd
[20210726_02:23:21]EAL:   Not managed by a supported kernel driver, skipped
[20210726_02:23:21]EAL: PCI device 0000:02:04.0 on NUMA socket -1
[20210726_02:23:21]EAL:   probe driver: 8086:100f rte_em_pmd
[20210726_02:23:21]EAL:   PCI memory mapped at 0x7fefe3800000
[20210726_02:23:21]EAL:   PCI memory mapped at 0x7fefe3820000
[20210726_02:23:21]PMD: eth_em_dev_init(): port_id 0 vendorID=0x8086 deviceID=0x100f
[20210726_02:23:21]EAL: PCI device 0000:02:05.0 on NUMA socket -1
[20210726_02:23:21]EAL:   probe driver: 8086:100f rte_em_pmd
[20210726_02:23:21]EAL:   PCI memory mapped at 0x7fefe3830000
[20210726_02:23:21]EAL:   PCI memory mapped at 0x7fefe3850000
[20210726_02:23:22]PMD: eth_em_dev_init(): port_id 1 vendorID=0x8086 deviceID=0x100f
[20210726_02:23:22]Interactive-mode selected
[20210726_02:23:22]Configuring Port 0 (socket 0)
[20210726_02:23:22]PMD: eth_em_tx_queue_setup(): sw_ring=0x7fefb4dedb00 hw_ring=0x7fefb4defc00 dma_addr=0xaa5efc00
[20210726_02:23:22]PMD: eth_em_rx_queue_setup(): sw_ring=0x7fefb4ddd5c0 hw_ring=0x7fefb4dddac0 dma_addr=0xaa5ddac0
[20210726_02:23:22]PMD: eth_em_start(): <<
[20210726_02:23:22]Port 0: 00:0C:29:6A:FE:B1
[20210726_02:23:22]Configuring Port 1 (socket 0)
[20210726_02:23:22]PMD: eth_em_tx_queue_setup(): sw_ring=0x7fefb4dcb380 hw_ring=0x7fefb4dcd480 dma_addr=0xaa5cd480
[20210726_02:23:22]PMD: eth_em_rx_queue_setup(): sw_ring=0x7fefb4dbae40 hw_ring=0x7fefb4dbb340 dma_addr=0xaa5bb340
[20210726_02:23:22]PMD: eth_em_start(): <<
[20210726_02:23:22]Port 1: 00:0C:29:6A:FE:BB
[20210726_02:23:22]Checking link statuses...
[20210726_02:23:22]Port 0 Link Up - speed 1000 Mbps - full-duplex
[20210726_02:23:22]Port 1 Link Up - speed 1000 Mbps - full-duplex
[20210726_02:23:22]Done

开始打流测试。

[20210726_02:23:42]testpmd> start
[20210726_02:23:42]  io packet forwarding - CRC stripping disabled - packets/burst=32
[20210726_02:23:42]  nb forwarding cores=1 - nb forwarding ports=2
[20210726_02:23:42]  RX queues=1 - RX desc=128 - RX free threshold=0
[20210726_02:23:42]  RX threshold registers: pthresh=0 hthresh=0 wthresh=0
[20210726_02:23:42]  TX queues=1 - TX desc=512 - TX free threshold=0
[20210726_02:23:42]  TX threshold registers: pthresh=0 hthresh=0 wthresh=0
[20210726_02:23:42]  TX RS bit threshold=0 - TXQ flags=0x0
[20210726_02:23:43]testpmd> stop
[20210726_02:23:43]Telling cores to stop...
[20210726_02:23:43]Waiting for lcores to finish...
[20210726_02:23:43]
[20210726_02:23:43]  ---------------------- Forward statistics for port 0  ----------------------
[20210726_02:23:43]  RX-packets: 157723         RX-dropped: 0             RX-total: 157723
[20210726_02:23:43]  TX-packets: 157696         TX-dropped: 0             TX-total: 157696
[20210726_02:23:43]  ----------------------------------------------------------------------------
[20210726_02:23:43]
[20210726_02:23:43]  ---------------------- Forward statistics for port 1  ----------------------
[20210726_02:23:43]  RX-packets: 157721         RX-dropped: 0             RX-total: 157721
[20210726_02:23:43]  TX-packets: 157696         TX-dropped: 0             TX-total: 157696
[20210726_02:23:43]  ----------------------------------------------------------------------------
[20210726_02:23:43]
[20210726_02:23:43]  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
[20210726_02:23:43]  RX-packets: 315444         RX-dropped: 0             RX-total: 315444
[20210726_02:23:43]  TX-packets: 315392         TX-dropped: 0             TX-total: 315392
[20210726_02:23:43]  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[20210726_02:23:43]
[20210726_02:23:43]Done.

有报文计数了。

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值