How to use netcat to provide input to DPDK examples?

I'm running the DPDK Skeleton example from here:

Getting this output:

sudo ./dpdk-skeleton -l 1 -n 4

EAL: Detected CPU lcores: 4
EAL: Detected NUMA nodes: 1
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: VFIO support initialized
EAL: Probe PCI driver: net_e1000_igb (8086:1533) device: 0000:05:00.0 (socket -1)
EAL: Probe PCI driver: net_e1000_igb (8086:1533) device: 0000:0a:00.0 (socket -1)
TELEMETRY: No legacy callbacks, legacy socket not created
Port 0 MAC: 98 b7 85 00 5b 87
Port 1 MAC: 6c b3 11 52 a3 29

Core 1 forwarding packets. [Ctrl+C to quit]

How do I generate input frames/packets, so the above example does "something"?

I tried netcat from the same host but it didn't seem to work:

nc localhost 2399

I wasn't sure which port (because the DPDK application doesn't log a port) so I assumed I could use any port.

How/can I use netcat on the same host to provide input to DPDK examples?

I have a second machine (and an Ethernet cable) if that's required.


  • To find the port listened by dpdk-skeleton, run this first :

    ps -ef | grep dpdk-skeleton

    let's say you get PID 6666, then

    sudo netstat -anp | grep "LISTEN.*6666/"


    You can try this single command :

    sudo netstat -anp|grep -P "LISTEN\s+$(pgrep -f dpdk-skeleton)"