* DPDK Non-Supported Hardware Usage Question - Kyle Gagnon GDMS
@ 2022-11-30 13:35 Kyle.Gagnon
2022-12-01 16:50 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Kyle.Gagnon @ 2022-11-30 13:35 UTC (permalink / raw)
To: users; +Cc: Kyle Gagnon
[-- Attachment #1: Type: text/plain, Size: 2501 bytes --]
Hello!
My name is Kyle Gagnon and I work at General Dynamics Mission Systems. We are evaluating DPDK and its use. I am currently trying to get DPDK to work on a Xilinx ZCU102 evaluation board. The problem is that the NIC is an onboard ethernet interface so it does not go through any PCI. I won't be able to use an external NIC card so I have to work with what I have. I understand that I can use the PCAP library PMD. Here is my question if you don't mind helping me out!
I am compiling DPDK through meson and then in a custom application I am writing myself I have to use Makefiles. I need to statically link all of the libraries. So I did that and wrote an extremely basic program that doesn't do much at all. Here it is (I am copying from another computer. This is a C++ application and I am building it for ARM on an x86_64 Ubuntu WSL machine)
DpdkEntry.cpp
#include <iostream>
#include <string>
#include <rte_eal.h>
#include <rte_ethdev.h>
#include <rte_cycles.h>
#include <rte_lcore.h>
#include <rte_mbuf.h>
Int main(int argc, char **argv) {
int returnVal;
std::cout << "Setting up EAL environment\n";
returnVal = rte_eal_init(argc, argv);
if (returnVal < 0) {
rte_exit(EXIT_FAILURE, "Error with initializing EAL\n");
}
rte_eal_cleanup();
return 0;
}
When I run this application through a QEMU emulation of the ZCU102 board I use the following command
dpdk-test -l 0-3 -n 4 -vdev 'net_pcap0,iface=eth0'
I have built librte_net_pcap and linked it in so it is in the application. When I run the above command (using the above source code) I get the following:
EAL: Detected CPU lcores: 4
EALL Detected NUMA nodes: 1
EAL: Detected static linkage of DPDK
EAL: failed to parse device "net_pcap0"
EAL: Unable to parse device 'net_pcap0,iface=eth0'
EAL: Error - exiting with code: 1
Cause: Error with initializing EAL
When I run a testpmd with the same parameters on the same emulated board I am able to use the ethernet port so what am I doing wrong with my custom code? I am going to forward this to my personal email in case I need to follow up with more information (the source code and building is on my personal computer rather than my work computer).
Thank you!
Kyle Gagnon
General Dynamics Mission Systems
150 Rustcraft Rd | Dedham, MA 02026
(781) 410 - 3820 | Kyle.Gagnon@gd-ms.com
[-- Attachment #2: Type: text/html, Size: 6932 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: DPDK Non-Supported Hardware Usage Question - Kyle Gagnon GDMS
2022-11-30 13:35 DPDK Non-Supported Hardware Usage Question - Kyle Gagnon GDMS Kyle.Gagnon
@ 2022-12-01 16:50 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2022-12-01 16:50 UTC (permalink / raw)
To: Kyle.Gagnon; +Cc: users, Kyle Gagnon
On Wed, 30 Nov 2022 13:35:26 +0000
"Kyle.Gagnon@gd-ms.com" <Kyle.Gagnon@gd-ms.com> wrote:
> Hello!
>
> My name is Kyle Gagnon and I work at General Dynamics Mission Systems. We are evaluating DPDK and its use. I am currently trying to get DPDK to work on a Xilinx ZCU102 evaluation board. The problem is that the NIC is an onboard ethernet interface so it does not go through any PCI. I won't be able to use an external NIC card so I have to work with what I have. I understand that I can use the PCAP library PMD. Here is my question if you don't mind helping me out!
That will be really slow and limiting. Why use DPDK if there is no native driver support?
>
> I am compiling DPDK through meson and then in a custom application I am writing myself I have to use Makefiles. I need to statically link all of the libraries. So I did that and wrote an extremely basic program that doesn't do much at all. Here it is (I am copying from another computer. This is a C++ application and I am building it for ARM on an x86_64 Ubuntu WSL machine)
>
> DpdkEntry.cpp
>
> #include <iostream>
> #include <string>
>
> #include <rte_eal.h>
> #include <rte_ethdev.h>
> #include <rte_cycles.h>
> #include <rte_lcore.h>
> #include <rte_mbuf.h>
>
> Int main(int argc, char **argv) {
>
> int returnVal;
>
> std::cout << "Setting up EAL environment\n";
>
> returnVal = rte_eal_init(argc, argv);
> if (returnVal < 0) {
> rte_exit(EXIT_FAILURE, "Error with initializing EAL\n");
> }
>
> rte_eal_cleanup();
>
> return 0;
> }
>
> When I run this application through a QEMU emulation of the ZCU102 board I use the following command
>
> dpdk-test -l 0-3 -n 4 -vdev 'net_pcap0,iface=eth0'
>
> I have built librte_net_pcap and linked it in so it is in the application. When I run the above command (using the above source code) I get the following:
>
> EAL: Detected CPU lcores: 4
> EALL Detected NUMA nodes: 1
> EAL: Detected static linkage of DPDK
> EAL: failed to parse device "net_pcap0"
> EAL: Unable to parse device 'net_pcap0,iface=eth0'
> EAL: Error - exiting with code: 1
> Cause: Error with initializing EAL
>
> When I run a testpmd with the same parameters on the same emulated board I am able to use the ethernet port so what am I doing wrong with my custom code? I am going to forward this to my personal email in case I need to follow up with more information (the source code and building is on my personal computer rather than my work computer).
Try adding printfs inside the pcap poll mode driver.
It may not be getting loaded.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-01 16:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30 13:35 DPDK Non-Supported Hardware Usage Question - Kyle Gagnon GDMS Kyle.Gagnon
2022-12-01 16:50 ` Stephen Hemminger
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).