On Thu, 31 Oct 2024 17:57:04 +0800
cuyu tang <m...@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.
 

Reply via email to