Nadeem
Nadeem

Reputation: 37

pkt-gen dpdk not sending any packets issue

i am trying to send udp packets from the dpdk machine using pktgen-dpdk to the DUT. but i cannot see any thing sent in the stats and also nothing received on the DUT. here is the configuration i am using :

dpdk verion: DPDK 20.11.0
pkt-gen version: 20.11.3
ena driver version: 2.4.0
os :amazon linux 2 aws ec2 instance

the pkt-gen pkt file is as following:

stop 0
set 0 dst mac 02:EC:BC:CD:C7:D6 # i try both dst mac address for the gateway and for the DUT
set 0 src ip 192.168.2.187/24
set 0 dst ip 192.168.2.197
set 0 sport 22
set 0 dport 22
set 0 type ipv4
set 0 proto tcp
set 0 size 64
start 0

i also tried multiple diffrent protocols and even a simple icmp by enabling icmp for the port and using ping4 but nothing is sent. the port status is as follwoing: port o status

in addition to that when i try to use testpmd to send traffic i get this :

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 11             RX-dropped: 0             RX-total: 11
  TX-packets: 231819494      TX-dropped: 2029505748    TX-total: 2261325242
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 11             RX-dropped: 0             RX-total: 11
  TX-packets: 231819494      TX-dropped: 2029505748    TX-total: 2261325242
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

seems all transmissions are immediately dropped

Upvotes: 1

Views: 1046

Answers (1)

Vipin Varghese
Vipin Varghese

Reputation: 4798

Issue lies in pkt-gen not able identify the DPDK NIC ENA, because it is build in shared library mode. To fix the issue

  1. identify the folder where the ENA PMD is located with find / -name "librte_*.so" | grep ena
  2. set the environment with path with export LD_LIBRARY_PATH=[path to pmd folder]
  3. make sure to run pktgen with arguments -d librte_net_ena.so -l 1-3 -- -P -m "2.0, 3.1"

note: solved the issue via live debug too.

Upvotes: 1

Related Questions