DPDK patches and discussions
 help / color / mirror / Atom feed
* Testing dpdk application using openNIC driver
@ 2025-02-04 13:42 Nafiah Siddiqha
  2025-02-04 13:54 ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: Nafiah Siddiqha @ 2025-02-04 13:42 UTC (permalink / raw)
  To: david.marchand, Luca.Vizzarro, dev, andremue, longli; +Cc: Ayshathul Thuhara

[-- Attachment #1: Type: text/plain, Size: 761 bytes --]

Hi,
I'm testing pktgen application using OpenNIC driver, but I face device cannot parse issue ,
What do I need to pass in my vdev parameter for it to run

Below are the logs of the error I'm facing
$sudo ./usr/local/bin/pktgen --vdev 'eth_af_packet0,iface=enp1s0f0' --vdev 'eth_af_packet1,iface=enp1s0f1'   -l 2-10 -n 4  -- -m [3:4].0 -m [6:7].1
Copyright(c) <2010-2021>, Intel Corporation. All rights reserved. Powered by DPDK
EAL: Detected 12 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: failed to parse device "eth_af_packet0"
EAL: Unable to parse device 'eth_af_packet0,iface=enp1s0f0'


I have tried passing eth_pcap, net_pcap and net_af_packet as well but there's no progress in the output.

Thanks in advance
Best Regards
Nafiah Siddiqha


[-- Attachment #2: Type: text/html, Size: 2057 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Testing dpdk application using openNIC driver
  2025-02-04 13:42 Testing dpdk application using openNIC driver Nafiah Siddiqha
@ 2025-02-04 13:54 ` David Marchand
       [not found]   ` <PN2P287MB222391396CB4C9B5325FCD80D3F72@PN2P287MB2223.INDP287.PROD.OUTLOOK.COM>
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2025-02-04 13:54 UTC (permalink / raw)
  To: Nafiah Siddiqha, Wiles, Keith
  Cc: Luca.Vizzarro, dev, andremue, longli, Ayshathul Thuhara

Hello,

Adding pktgen maintainer in the loop.

On Tue, Feb 4, 2025 at 2:42 PM Nafiah Siddiqha
<nafiah.siddiqha@iwave-global.com> wrote:
>
> Hi,
> I'm testing pktgen application using OpenNIC driver, but I face device cannot parse issue ,
> What do I need to pass in my vdev parameter for it to run
>
> Below are the logs of the error I'm facing
> $sudo ./usr/local/bin/pktgen --vdev 'eth_af_packet0,iface=enp1s0f0' --vdev 'eth_af_packet1,iface=enp1s0f1'   -l 2-10 -n 4  -- -m [3:4].0 -m [6:7].1
> Copyright(c) <2010-2021>, Intel Corporation. All rights reserved. Powered by DPDK
> EAL: Detected 12 lcore(s)
> EAL: Detected 1 NUMA nodes
> EAL: failed to parse device "eth_af_packet0"
> EAL: Unable to parse device 'eth_af_packet0,iface=enp1s0f0'
>
>
> I have tried passing eth_pcap, net_pcap and net_af_packet as well but there's no progress in the output.

Some ideas:
The first would be to make sure that the net/af_packet driver is
indeed built into DPDK.
And next one is to make sure that this driver is loaded by pktgen.

The simpler is to check this with testpmd first, and once it works,
look into pktgen (if necessary).

Check if the compiled dpdk (that this pktgen binary is linked to) is
happy with those EAL options (the options between the binary name and
the first -- in the cmdline options).
$ sudo /path/to/dpdk/build/app/dpdk-testpmd --vdev
'eth_af_packet0,iface=enp1s0f0' --vdev 'eth_af_packet1,iface=enp1s0f1'
  -l 2-10 -n 4  --

If this does not work, look for librte_net_af_packet.so in your dpdk
build directory.
$ find /path/to/dpdk/build/ -name librte_net_af_packet.so

And then pass this directory in the EAL options:
$ sudo /path/to/dpdk/build/app/dpdk-testpmd -d
/path/to/dpdk/build/drivers/ --vdev 'eth_af_packet0,iface=enp1s0f0'
--vdev 'eth_af_packet1,iface=enp1s0f1'   -l 2-10 -n 4  --


-- 
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Testing dpdk application using openNIC driver
       [not found]   ` <PN2P287MB222391396CB4C9B5325FCD80D3F72@PN2P287MB2223.INDP287.PROD.OUTLOOK.COM>
@ 2025-02-05  7:49     ` David Marchand
  0 siblings, 0 replies; 3+ messages in thread
From: David Marchand @ 2025-02-05  7:49 UTC (permalink / raw)
  To: Nafiah Siddiqha, Wiles, Keith
  Cc: Luca Vizzarro, Andre Muezerie, dev, Ayshathul Thuhara, Long Li

Hello,

Please don't go private, as I tend to just ignore such mail.
Re-adding ml and others.

And don't top post.

On Wed, Feb 5, 2025 at 8:06 AM Nafiah Siddiqha
<nafiah.siddiqha@iwave-global.com> wrote:
>
> Hi,
> I'm able to run testpmd with the given set of instructions you had mentioned and tried it with pktgen fir which I'm facing mbuff issue,

If you apply the same commandline options, testpmd and pktgen should
have the same behavior.
Unless testpmd and pktgen are not linked the same way to your DPDK
installation/build directory.


> I have increased my  hugepages besides its throwing the same error while I can run the pktgen application with vfio-pci driver.
> I'm looking forward on testing pktgen application with openNIC driver.

openNIC seems an out of tree driver from AMD/Xilinx.
The DPDK upstream developers don't know much about this.
You will need to contact the authors if you face issues with this driver.

Some comment below, as the problem still seems a generic DPDK issue.

>
> Below are the logs,
>
> sudo ./usr/local/bin/pktgen -l 1-8 -n 4  --vdev="net_pcap0,iface=enp1s0f0" --vdev="net_pcap1,iface=enp1s0f1" -d librte_net_pcap.so -- -m [2:3].0 -m [5:8].1
>
> Copyright(c) <2010-2021>, Intel Corporation. All rights reserved. Powered by DPDK
> EAL: Detected 12 lcore(s)
> EAL: Detected 1 NUMA nodes
> EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
> EAL: Selected IOVA mode 'VA'
> EAL: 4 hugepages of size 1073741824 reserved, but no mounted hugetlbfs found for that size
> EAL: Probing VFIO support...
> EAL: VFIO support initialized
> EAL: No legacy callbacks, legacy socket not created
>
> *** Copyright(c) <2010-2021>, Intel Corporation. All rights reserved.
> *** Pktgen  created by: Keith Wiles -- >>> Powered by DPDK <<<
>
>  Port: Name         IfIndex Alias        NUMA  PCI
>     0: net_pcap        4    eth_pcap      -1
>     1: net_pcap        5    eth_pcap      -1
>
> Initialize Port 0 -- TxQ 1, RxQ 1
> MBUF: error setting mempool handler
> !PANIC!: Cannot create mbuf pool (Default RX  0:0) port 0, queue 0, nb_mbufs 4096, socket_id 0: Invalid argument
> PANIC in pktgen_mbuf_pool_create():
> Cannot create mbuf pool (Default RX  0:0) port 0, queue 0, nb_mbufs 4096, socket_id 0: Invalid argument

I guess no mempool driver is loaded, so pktgen can't create a mempool.

Rather than pass only one driver in the command line, you'd better
pass the directory where all the compiled DPDK drivers are.
That will be much easier than having to cherry pick every driver you need.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-05  7:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-04 13:42 Testing dpdk application using openNIC driver Nafiah Siddiqha
2025-02-04 13:54 ` David Marchand
     [not found]   ` <PN2P287MB222391396CB4C9B5325FCD80D3F72@PN2P287MB2223.INDP287.PROD.OUTLOOK.COM>
2025-02-05  7:49     ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).