dpdk

pktgen-dpdk !PANIC!: *** Did not find any ports to use ***


i am trying to start pktgen but it seems it does not see the interfaces i bind since it give me

!PANIC!: *** Did not find any ports to use ***

setup info: i have this issue on ubuntu 20.4 and redhat 8.3

dpdk version= DPDK 20.11.0
ena verison =2.1.0K
pktgen-20.11.3

i launch with those configurations:

pktgen -l 0-3 -n 3 -- -P -m "[1:2].0, [2:3].1"

note: i have 4 cores and 0 is not to be used so i send through core 1 and receive through core 2 for port o and i send through core 2 and receive through core 3 on port 1. is that a wrong configuration?

for the interfaces here is the status of the two interfaces i bind:

Network devices using DPDK-compatible driver
============================================
0000:00:06.0 'Elastic Network Adapter (ENA) ec20' drv=vfio-pci unused=ena
0000:00:07.0 'Elastic Network Adapter (ENA) ec20' drv=vfio-pci unused=ena

Network devices using kernel driver
===================================
0000:00:05.0 'Elastic Network Adapter (ENA) ec20' if=eth0 drv=ena unused=vfio-pci *Active*

No 'Baseband' devices detected
==============================

No 'Crypto' devices detected
============================

No 'Eventdev' devices detected
==============================

No 'Mempool' devices detected
=============================

No 'Compress' devices detected
==============================

No 'Misc (rawdev)' devices detected
===================================

No 'Regex' devices detected
===========================

so i guess i did bind the interface correctly. so what am i missing ?? any help


Solution

  • When using with meson or ninja for building DPDK it generates both static libraries and shared libraries. But pkg-config --cflags --libs libdpdk.pc returns the shared library for linking.

    So when built with shared library mode for any DPDK application, one has

    1. either modify Makefile to enable linking with PMD (librte_pmd_ena.so) explicitly for the constructor to work
    2. or mention the desired library as DPDK argument -d librte_pmd_ena.so

    based on the comment update, it looks like you are using shared library build. Since you are not passing with option -d the PMD constructor does not invoke probe for ENA PMD. So please fix this by passing -d librte_pmd_ena.so in pktgen cmdline.