Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant capture packets using dpdk-pdump #10

Open
vaniaprkl opened this issue Oct 10, 2023 · 4 comments
Open

Cant capture packets using dpdk-pdump #10

vaniaprkl opened this issue Oct 10, 2023 · 4 comments

Comments

@vaniaprkl
Copy link

vaniaprkl commented Oct 10, 2023

Hi,

We are running into an issue trying to capture packets with dpdk-pdump.

testpmd was run as the primary process using the following command below:

.../build/app/dpdk-testpmd -c 0xf0 -n 4 -- -i --port-topology=chained --forward-mode=rxonly
EAL: Detected 72 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
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:04:00.0 (socket 0)
PMD: QDMA PMD VERSION: 2020.2.1
EAL: No legacy callbacks, legacy socket not created
Interactive-mode selected
Set rxonly packet forwarding mode
testpmd: create a new mbuf pool <mb_pool_0>: n=171456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
Configuring Port 0 (socket 0)
Port 0: 15:16:17:18:19:1A
Checking link statuses...
Done
Error during enabling promiscuous mode for port 0: Operation not supported - ignore
testpmd> port stop all
Stopping ports...
Checking link statuses...
Done
testpmd> port start all
Port 0: 15:16:17:18:19:1A
Checking link statuses...
Done
testpmd> quit

Stopping port 0...
Stopping ports...
Done

Stopping port 1...
Stopping ports...
Done

Shutting down port 0...
Closing ports...
Port 0 is closed
Done

Shutting down port 1...
Closing ports...
Port 1 is closed
Done

Bye...
.../build/app# 

Packets were being transmitted to this port at all times. The corresponding pdump was started against the same device and its output shows it is indeed chained to testpmd. Closing testpmd stops pdump window as well.

.../build/app/dpdk-pdump -- --pdump 'port=0,queue=*,rx-dev=/tmp/test-capture-1004.pcap'
EAL: Detected 72 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_279378_2cfa511064dd9
EAL: Selected IOVA mode 'VA'
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:04:00.0 (socket 0)
EAL: No legacy callbacks, legacy socket not created
Port 1 MAC: 02 70 63 61 70 00
 core (0), capture for (1) tuples
 - port 0 device ((null)) queue 65535
Primary process is no longer active, exiting...
EAL: failed to send to (/var/run/dpdk/rte/mp_socket) due to No such file or directory
EAL: Fail to send request /var/run/dpdk/rte/mp_socket:mp_pdump
pdump_prepare_client_request(): client request for pdump enable/disable failed
EAL: Cannot find plugged device ()
##### PDUMP DEBUG STATS #####
 -packets dequeued:			0
 -packets transmitted to vdev:		0
 -packets freed:			0
...:/home/vcr/Desktop#

What is the problem here? Any suggestions?

@cneely-amd
Copy link
Collaborator

Hi @vaniaprkl ,

I know that a few people have used dpdk-testpmd okay, but I'm not aware of anyone using dpdk-pdump. The port of the AMD-Xilinx DPDK QDMA drivers to OpenNIC was contributed by someone in the community. Getting that to work might require some additional changes.

--Chris

@cneely-amd
Copy link
Collaborator

Hi @vaniaprkl ,

I chatted with someone who did use a combination of dpdk-testpmd + dpdk-pdump recently to test. They used testpmd in --interactive mode. They said dpdk-testpmd showed two ports forwarding packets back and forth. They tried start tx_first 10 and they could see packets passed via the FPGA by running show port stats all and also checking the FPGA packet counters.
They also tried dpdk-pdump -l 9-13 -n 9 -- --pdump 'port=0,queue=*,rx-dev=/tmp/port0.pcap' --pdump 'port=1,queue=*,rx-dev=/tmp/port1.pcap' to add capture ports to both sides of the chain. They said waiting a few seconds and hitting ctrl-c showed millions of packets captured (verified via capinfos /tmp/port0.pcp). This is a different test, but the above description should hopefully help give an example of a successful test.

Best regards,
--Chris

@cneely-amd
Copy link
Collaborator

One other note is that testpmd might be expecting packets with a matching destination MAC+IP, but we don't know that for certain.

@attdone
Copy link

attdone commented Nov 23, 2023

Hi Team,
I am facing similar issue, can I know how you have tested dpdk-pdump further?
While testing DPDK TestPMD with Loopback setup, the tx packets are counted under show port stats all, but the rx packets are 0. I was using below command to test testpmd.

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

Please let me know what changes to be done so that the RX packets are also gets incremented.?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants