DPDK usage discussions
 help / color / mirror / Atom feed
* Pktgen failing in a virtualbox virtual machine
@ 2024-10-31  9:57 cuyu tang
  2024-11-02 16:03 ` Stephen Hemminger
  0 siblings, 1 reply; 6+ messages in thread
From: cuyu tang @ 2024-10-31  9:57 UTC (permalink / raw)
  To: users

I'm having segfault issues when running pktgen in a virtualbox virtual 
machine.

Here's what I run it in and some details about running the commands,

and what I can do to get it to run correctly


pktgen version: git main brunch

# git log
commit cc1d4c606dea3939adf75cc02de0f7cf2b28cf1e (HEAD -> main, tag: 
pktgen-24.07.0, origin/main, origin/HEAD)

dpdk version: dpdk-24.07

[root@localhost dpdk-24.07]# ./usertools/dpdk-devbind.py -s

Network devices using DPDK-compatible driver
============================================
0000:00:09.0 '82540EM Gigabit Ethernet Controller 100e' drv=igb_uio 
unused=e1000,vfio-pci
0000:00:0a.0 '82540EM Gigabit Ethernet Controller 100e' drv=igb_uio 
unused=e1000,vfio-pci

pktgen run command:

gdb --args /root/pktgen-dpdk/usr/local/bin/pktgen -m 1.0

Port DevName          Index NUMA PCI Information   Src MAC           
Promiscuous
Thread 1 "pktgen" received signal SIGSEGV, Segmentation fault.
0x000000000043c38b in dump_device_info () at ../app/pktgen-port-cfg.c:102
102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];

(gdb) bt
#0  0x000000000043c38b in dump_device_info () at 
../app/pktgen-port-cfg.c:102
#1  0x000000000043e3cf in pktgen_config_ports () at 
../app/pktgen-port-cfg.c:325
#2  0x000000000043aa23 in main (argc=1, argv=0x7fffffffe2d8) at 
../app/pktgen-main.c:465

(gdb) n
89                  bus = rte_bus_find_by_device(dev.device);
(gdb)
90              if (bus && !strcmp(rte_bus_name(bus), "pci")) {
(gdb)
94                  vend[0] = device[0] = '\0';
(gdb)
95                  sscanf(rte_dev_bus_info(dev.device), "vendor_id=%4s, 
device_id=%4s", vend, device);
(gdb)
97                  rte_eth_dev_get_name_by_port(i, name);
(gdb)
98                  snprintf(buff, sizeof(buff), "%s:%s/%s", vend, 
device, rte_dev_name(dev.device));
(gdb)
90              if (bus && !strcmp(rte_bus_name(bus), "pci")) {
(gdb)
101             pinfo = l2p_get_port_pinfo(i);
(gdb)
102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];
(gdb)

Thread 1 "pktgen" received signal SIGSEGV, Segmentation fault.
0x000000000043c38b in dump_device_info () at ../app/pktgen-port-cfg.c:102
102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];
(gdb) p pinfo
$3 = (port_info_t *) 0x0
(gdb)




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

* Re: Pktgen failing in a virtualbox virtual machine
  2024-10-31  9:57 Pktgen failing in a virtualbox virtual machine cuyu tang
@ 2024-11-02 16:03 ` Stephen Hemminger
  2024-11-03 15:36   ` Wiles, Keith
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2024-11-02 16:03 UTC (permalink / raw)
  To: cuyu tang; +Cc: users

On Thu, 31 Oct 2024 17:57:04 +0800
cuyu tang <me@expoli.tech> wrote:

> I'm having segfault issues when running pktgen in a virtualbox virtual 
> machine.
> 
> Here's what I run it in and some details about running the commands,
> 
> and what I can do to get it to run correctly
> 
> 
> pktgen version: git main brunch
> 
> # git log
> commit cc1d4c606dea3939adf75cc02de0f7cf2b28cf1e (HEAD -> main, tag: 
> pktgen-24.07.0, origin/main, origin/HEAD)
> 
> dpdk version: dpdk-24.07
> 
> [root@localhost dpdk-24.07]# ./usertools/dpdk-devbind.py -s
> 
> Network devices using DPDK-compatible driver
> ============================================
> 0000:00:09.0 '82540EM Gigabit Ethernet Controller 100e' drv=igb_uio 
> unused=e1000,vfio-pci
> 0000:00:0a.0 '82540EM Gigabit Ethernet Controller 100e' drv=igb_uio 
> unused=e1000,vfio-pci
> 
> pktgen run command:
> 
> gdb --args /root/pktgen-dpdk/usr/local/bin/pktgen -m 1.0
> 
> Port DevName          Index NUMA PCI Information   Src MAC           
> Promiscuous
> Thread 1 "pktgen" received signal SIGSEGV, Segmentation fault.
> 0x000000000043c38b in dump_device_info () at ../app/pktgen-port-cfg.c:102
> 102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];
> 
> (gdb) bt
> #0  0x000000000043c38b in dump_device_info () at 
> ../app/pktgen-port-cfg.c:102
> #1  0x000000000043e3cf in pktgen_config_ports () at 
> ../app/pktgen-port-cfg.c:325
> #2  0x000000000043aa23 in main (argc=1, argv=0x7fffffffe2d8) at 
> ../app/pktgen-main.c:465
> 
> (gdb) n
> 89                  bus = rte_bus_find_by_device(dev.device);
> (gdb)
> 90              if (bus && !strcmp(rte_bus_name(bus), "pci")) {
> (gdb)
> 94                  vend[0] = device[0] = '\0';
> (gdb)
> 95                  sscanf(rte_dev_bus_info(dev.device), "vendor_id=%4s, 
> device_id=%4s", vend, device);
> (gdb)
> 97                  rte_eth_dev_get_name_by_port(i, name);
> (gdb)
> 98                  snprintf(buff, sizeof(buff), "%s:%s/%s", vend, 
> device, rte_dev_name(dev.device));
> (gdb)
> 90              if (bus && !strcmp(rte_bus_name(bus), "pci")) {
> (gdb)
> 101             pinfo = l2p_get_port_pinfo(i);
> (gdb)
> 102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];
> (gdb)
> 
> Thread 1 "pktgen" received signal SIGSEGV, Segmentation fault.
> 0x000000000043c38b in dump_device_info () at ../app/pktgen-port-cfg.c:102
> 102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];
> (gdb) p pinfo
> $3 = (port_info_t *) 0x0
> (gdb)
> 
> 
> 

Pktgen no longer has a maintainer, so it considered abandoned at this point.
What does DPDK startup show? The problem is probably that virtualbox doesn't fully
emulate the Intel NIC and the DPDK PMD doesn't like that.
 

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

* Re: Pktgen failing in a virtualbox virtual machine
  2024-11-02 16:03 ` Stephen Hemminger
@ 2024-11-03 15:36   ` Wiles, Keith
  2024-11-03 15:53     ` Stephen Hemminger
  0 siblings, 1 reply; 6+ messages in thread
From: Wiles, Keith @ 2024-11-03 15:36 UTC (permalink / raw)
  To: Stephen Hemminger, cuyu tang; +Cc: users

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

> I'm having segfault issues when running pktgen in a virtualbox virtual
> machine.
>
> Here's what I run it in and some details about running the commands,
>
> and what I can do to get it to run correctly
>
>
> pktgen version: git main brunch
>
> # git log
> commit cc1d4c606dea3939adf75cc02de0f7cf2b28cf1e (HEAD -> main, tag:
> pktgen-24.07.0, origin/main, origin/HEAD)
>
> dpdk version: dpdk-24.07
>
> [root@localhost dpdk-24.07]# ./usertools/dpdk-devbind.py -s
>
> Network devices using DPDK-compatible driver
> ============================================
> 0000:00:09.0 '82540EM Gigabit Ethernet Controller 100e' drv=igb_uio
> unused=e1000,vfio-pci
> 0000:00:0a.0 '82540EM Gigabit Ethernet Controller 100e' drv=igb_uio
> unused=e1000,vfio-pci
>
> pktgen run command:
>
> gdb --args /root/pktgen-dpdk/usr/local/bin/pktgen -m 1.0
>
> Port DevName          Index NUMA PCI Information   Src MAC
> Promiscuous
> Thread 1 "pktgen" received signal SIGSEGV, Segmentation fault.
> 0x000000000043c38b in dump_device_info () at ../app/pktgen-port-cfg.c:102
> 102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];
>
> (gdb) bt
> #0  0x000000000043c38b in dump_device_info () at
> ../app/pktgen-port-cfg.c:102
> #1  0x000000000043e3cf in pktgen_config_ports () at
> ../app/pktgen-port-cfg.c:325
> #2  0x000000000043aa23 in main (argc=1, argv=0x7fffffffe2d8) at
> ../app/pktgen-main.c:465
>
> (gdb) n
> 89                  bus = rte_bus_find_by_device(dev.device);
> (gdb)
> 90              if (bus && !strcmp(rte_bus_name(bus), "pci")) {
> (gdb)
> 94                  vend[0] = device[0] = '\0';
> (gdb)
> 95                  sscanf(rte_dev_bus_info(dev.device), "vendor_id=%4s,
> device_id=%4s", vend, device);
> (gdb)
> 97                  rte_eth_dev_get_name_by_port(i, name);
> (gdb)
> 98                  snprintf(buff, sizeof(buff), "%s:%s/%s", vend,
> device, rte_dev_name(dev.device));
> (gdb)
> 90              if (bus && !strcmp(rte_bus_name(bus), "pci")) {
> (gdb)
> 101             pinfo = l2p_get_port_pinfo(i);
> (gdb)
> 102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];
> (gdb)
>
> Thread 1 "pktgen" received signal SIGSEGV, Segmentation fault.
> 0x000000000043c38b in dump_device_info () at ../app/pktgen-port-cfg.c:102
> 102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];
> (gdb) p pinfo
> $3 = (port_info_t *) 0x0
> (gdb)
>
>
>

Pktgen no longer has a maintainer, so it considered abandoned at this point.
What does DPDK startup show? The problem is probably that virtualbox doesn't fully
emulate the Intel NIC and the DPDK PMD doesn't like that.

Hi Stephen,
(sorry if formatting is bad as MacOS Outlook has some issues with plain text replies)

I still maintain Pktgen, but mostly from GitHub issues @ https://github.com/pktgen/Pktgen-DPDK I do have very limited time, so not always the fastest responses.
DPDK gets a lot of emails and sometimes I miss these emails (need to improve my emails rule filter).
I do update dpdk.org Pktgen repo when I can, but it seemed like most of the requests were coming from GitHub.

This person created an issue at Pktgen GitHub and also posted to this group at the same time. I did respond to his issue and try to work out a solution. I never test using a VM or containers, so it is difficult to help them sometimes.

If you wish you can remove Pktgen from dpdk.org, but if you do please include a link to the GitHub repository.
Thank you.



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

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

* Re: Pktgen failing in a virtualbox virtual machine
  2024-11-03 15:36   ` Wiles, Keith
@ 2024-11-03 15:53     ` Stephen Hemminger
  2024-11-03 16:34       ` Wiles, Keith
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2024-11-03 15:53 UTC (permalink / raw)
  To: Wiles, Keith; +Cc: cuyu tang, users

On Sun, 3 Nov 2024 15:36:51 +0000
"Wiles, Keith" <keith.wiles@intel.com> wrote:

> > I'm having segfault issues when running pktgen in a virtualbox virtual
> > machine.
> >
> > Here's what I run it in and some details about running the commands,
> >
> > and what I can do to get it to run correctly
> >
> >
> > pktgen version: git main brunch
> >
> > # git log
> > commit cc1d4c606dea3939adf75cc02de0f7cf2b28cf1e (HEAD -> main, tag:
> > pktgen-24.07.0, origin/main, origin/HEAD)
> >
> > dpdk version: dpdk-24.07
> >
> > [root@localhost dpdk-24.07]# ./usertools/dpdk-devbind.py -s
> >
> > Network devices using DPDK-compatible driver
> > ============================================
> > 0000:00:09.0 '82540EM Gigabit Ethernet Controller 100e' drv=igb_uio
> > unused=e1000,vfio-pci
> > 0000:00:0a.0 '82540EM Gigabit Ethernet Controller 100e' drv=igb_uio
> > unused=e1000,vfio-pci
> >
> > pktgen run command:
> >
> > gdb --args /root/pktgen-dpdk/usr/local/bin/pktgen -m 1.0
> >
> > Port DevName          Index NUMA PCI Information   Src MAC
> > Promiscuous
> > Thread 1 "pktgen" received signal SIGSEGV, Segmentation fault.
> > 0x000000000043c38b in dump_device_info () at ../app/pktgen-port-cfg.c:102
> > 102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];
> >
> > (gdb) bt
> > #0  0x000000000043c38b in dump_device_info () at
> > ../app/pktgen-port-cfg.c:102
> > #1  0x000000000043e3cf in pktgen_config_ports () at
> > ../app/pktgen-port-cfg.c:325
> > #2  0x000000000043aa23 in main (argc=1, argv=0x7fffffffe2d8) at
> > ../app/pktgen-main.c:465
> >
> > (gdb) n
> > 89                  bus = rte_bus_find_by_device(dev.device);
> > (gdb)
> > 90              if (bus && !strcmp(rte_bus_name(bus), "pci")) {
> > (gdb)
> > 94                  vend[0] = device[0] = '\0';
> > (gdb)
> > 95                  sscanf(rte_dev_bus_info(dev.device), "vendor_id=%4s,
> > device_id=%4s", vend, device);
> > (gdb)
> > 97                  rte_eth_dev_get_name_by_port(i, name);
> > (gdb)
> > 98                  snprintf(buff, sizeof(buff), "%s:%s/%s", vend,
> > device, rte_dev_name(dev.device));
> > (gdb)
> > 90              if (bus && !strcmp(rte_bus_name(bus), "pci")) {
> > (gdb)
> > 101             pinfo = l2p_get_port_pinfo(i);
> > (gdb)
> > 102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];
> > (gdb)
> >
> > Thread 1 "pktgen" received signal SIGSEGV, Segmentation fault.
> > 0x000000000043c38b in dump_device_info () at ../app/pktgen-port-cfg.c:102
> > 102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];
> > (gdb) p pinfo
> > $3 = (port_info_t *) 0x0
> > (gdb)
> >
> >
> >  
> 
> Pktgen no longer has a maintainer, so it considered abandoned at this point.
> What does DPDK startup show? The problem is probably that virtualbox doesn't fully
> emulate the Intel NIC and the DPDK PMD doesn't like that.
> 
> Hi Stephen,
> (sorry if formatting is bad as MacOS Outlook has some issues with plain text replies)
> 
> I still maintain Pktgen, but mostly from GitHub issues @ https://github.com/pktgen/Pktgen-DPDK I do have very limited time, so not always the fastest responses.
> DPDK gets a lot of emails and sometimes I miss these emails (need to improve my emails rule filter).
> I do update dpdk.org Pktgen repo when I can, but it seemed like most of the requests were coming from GitHub.
> 
> This person created an issue at Pktgen GitHub and also posted to this group at the same time. I did respond to his issue and try to work out a solution. I never test using a VM or containers, so it is difficult to help them sometimes.
> 
> If you wish you can remove Pktgen from dpdk.org, but if you do please include a link to the GitHub repository.
> Thank you.
> 
> 

That's great. I assumed (always bad to do) that since there was hardly any activity in dpdk.org repo
that you were off doing other things. Which place do you want to keep as primary repo?

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

* Re: Pktgen failing in a virtualbox virtual machine
  2024-11-03 15:53     ` Stephen Hemminger
@ 2024-11-03 16:34       ` Wiles, Keith
  0 siblings, 0 replies; 6+ messages in thread
From: Wiles, Keith @ 2024-11-03 16:34 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: cuyu tang, users

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


> Pktgen no longer has a maintainer, so it considered abandoned at this point.
> What does DPDK startup show? The problem is probably that virtualbox doesn't fully
> emulate the Intel NIC and the DPDK PMD doesn't like that.
>
> Hi Stephen,
> (sorry if formatting is bad as MacOS Outlook has some issues with plain text replies)
>
> I still maintain Pktgen, but mostly from GitHub issues @ https://github.com/pktgen/Pktgen-DPDK I do have very limited time, so not always the fastest responses.
> DPDK gets a lot of emails and sometimes I miss these emails (need to improve my emails rule filter).
> I do update dpdk.org Pktgen repo when I can, but it seemed like most of the requests were coming from GitHub.
>
> This person created an issue at Pktgen GitHub and also posted to this group at the same time. I did respond to his issue and try to work out a solution. I never test using a VM or containers, so it is difficult to help them sometimes.
>
> If you wish you can remove Pktgen from dpdk.org, but if you do please include a link to the GitHub repository.
> Thank you.
>
>

That's great. I assumed (always bad to do) that since there was hardly any activity in dpdk.org repo
that you were off doing other things. Which place do you want to keep as primary repo?

I would like to keep the primary repo @ https://github.com/pktgen/Pktgen-DPDK and use issues to track questions and requests.


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

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

* Pktgen failing in a virtualbox virtual machine
@ 2024-11-01  1:18 cuyu tang
  0 siblings, 0 replies; 6+ messages in thread
From: cuyu tang @ 2024-11-01  1:18 UTC (permalink / raw)
  To: users

I'm having segfault issues when running pktgen in a virtualbox virtual 
machine.

Here's what I run it in and some details about running the commands,

and what I can do to get it to run correctly


pktgen version: git main brunch

# git log
commit cc1d4c606dea3939adf75cc02de0f7cf2b28cf1e (HEAD -> main, tag: 
pktgen-24.07.0, origin/main, origin/HEAD)

dpdk version: dpdk-24.07

[root@localhost dpdk-24.07]# ./usertools/dpdk-devbind.py -s

Network devices using DPDK-compatible driver
============================================
0000:00:09.0 '82540EM Gigabit Ethernet Controller 100e' drv=igb_uio 
unused=e1000,vfio-pci
0000:00:0a.0 '82540EM Gigabit Ethernet Controller 100e' drv=igb_uio 
unused=e1000,vfio-pci

pktgen run command:

gdb --args /root/pktgen-dpdk/usr/local/bin/pktgen -m 1.0

Port DevName          Index NUMA PCI Information   Src MAC Promiscuous
Thread 1 "pktgen" received signal SIGSEGV, Segmentation fault.
0x000000000043c38b in dump_device_info () at ../app/pktgen-port-cfg.c:102
102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];

(gdb) bt
#0  0x000000000043c38b in dump_device_info () at 
../app/pktgen-port-cfg.c:102
#1  0x000000000043e3cf in pktgen_config_ports () at 
../app/pktgen-port-cfg.c:325
#2  0x000000000043aa23 in main (argc=1, argv=0x7fffffffe2d8) at 
../app/pktgen-main.c:465

(gdb) n
89                  bus = rte_bus_find_by_device(dev.device);
(gdb)
90              if (bus && !strcmp(rte_bus_name(bus), "pci")) {
(gdb)
94                  vend[0] = device[0] = '\0';
(gdb)
95                  sscanf(rte_dev_bus_info(dev.device), "vendor_id=%4s, 
device_id=%4s", vend, device);
(gdb)
97                  rte_eth_dev_get_name_by_port(i, name);
(gdb)
98                  snprintf(buff, sizeof(buff), "%s:%s/%s", vend, 
device, rte_dev_name(dev.device));
(gdb)
90              if (bus && !strcmp(rte_bus_name(bus), "pci")) {
(gdb)
101             pinfo = l2p_get_port_pinfo(i);
(gdb)
102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];
(gdb)

Thread 1 "pktgen" received signal SIGSEGV, Segmentation fault.
0x000000000043c38b in dump_device_info () at ../app/pktgen-port-cfg.c:102
102             pkt   = &pinfo->seq_pkt[SINGLE_PKT];
(gdb) p pinfo
$3 = (port_info_t *) 0x0
(gdb)






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

end of thread, other threads:[~2024-11-03 16:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-31  9:57 Pktgen failing in a virtualbox virtual machine cuyu tang
2024-11-02 16:03 ` Stephen Hemminger
2024-11-03 15:36   ` Wiles, Keith
2024-11-03 15:53     ` Stephen Hemminger
2024-11-03 16:34       ` Wiles, Keith
2024-11-01  1:18 cuyu tang

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).