<div dir="ltr"><div>Hi Stephen,</div><div>    Thanks for the response.</div><div>    I've tried with two virtual NICs, each bound to VFIO, as you can see below.  <br></div><div><br></div><div>verghis@verghis-VirtualBox:~/dpdk-stable-22.11.1/build$ ../usertools/dpdk-devbind.py --status<br><br>Network devices using DPDK-compatible driver<br>============================================<br>0000:00:08.0 '79c970 [PCnet32 LANCE] 2000' drv=vfio-pci unused=pcnet32<br>0000:00:09.0 '79c970 [PCnet32 LANCE] 2000' drv=vfio-pci unused=pcnet32<br><br>Network devices using kernel driver<br>===================================<br>0000:00:03.0 '82540EM Gigabit Ethernet Controller 100e' if=enp0s3 drv=e1000 unused=vfio-pci *Active*</div><div><br></div><div>    I'm not sure I understand what you mean by 'is the virtual NIC in VirtualBox the same as virtio.  The</div><div>NICs are PCnet32 LANCE, a standard NIC, bound to VFIO.  In Linux Mint 21 VFIO is built into the kernel,</div><div>not a loadable module.</div><div>    And yet the basicfwd code cannot find even 1 VFIO port.  Very weird.  Any ideas?</div><div>    Thanks.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 18, 2023 at 6:47 PM Stephen Hemminger <<a href="mailto:stephen@networkplumber.org">stephen@networkplumber.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 18 Apr 2023 17:14:21 -0700<br>
Verghis Koshi <<a href="mailto:vkoshi@gmail.com" target="_blank">vkoshi@gmail.com</a>> wrote:<br>
<br>
>     It appears that the vdev_device_list is empty - isn't this where the<br>
> probe function for VFIO lives?<br>
> <br>
> rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, vbus->name vdev<br>
> vdev_probe, file ../drivers/bus/vdev/vdev.c, PROBE, &vdev_device_list<br>
> 0x56337bb30d30<br>
> vdev_probe, file ../drivers/bus/vdev/vdev.c, dev is (nil)<br>
> <br>
>     This is how I call basicfwd, am I missing something?<br>
> <br>
> sudo examples/dpdk-skeleton -l 1 -n 4<br>
> <br>
>     Thanks,.<br>
> <br>
> Verghis<br>
> <br>
> <br>
> <br>
> <br>
> m<br>
> <br>
> On Tue, Apr 18, 2023 at 10:11 AM Verghis Koshi <<a href="mailto:vkoshi@gmail.com" target="_blank">vkoshi@gmail.com</a>> wrote:<br>
> <br>
> >     I'm having trouble running the basicfwd example and would appreciate<br>
> > any help.<br>
> >     I'm running Linux Mint 21.1 inside VirtualBox, and I've created two<br>
> > NICs:<br>
> ><br>
> > verghis@verghis-VirtualBox:~/dpdk-stable-22.11.1/build$<br>
> > ../usertools/dpdk-devbind.py --status<br>
> ><br>
> > Network devices using DPDK-compatible driver<br>
> > ============================================<br>
> > 0000:00:03.0 '79c970 [PCnet32 LANCE] 2000' drv=vfio-pci unused=pcnet32<br>
> ><br>
> > Network devices using kernel driver<br>
> > ===================================<br>
> > 0000:00:08.0 '82540EM Gigabit Ethernet Controller 100e' if=enp0s8<br>
> > drv=e1000 unused=vfio-pci *Active*<br>
> ><br>
> >     The first is bound to vfio-pci, to be used by basicfwd, and the second<br>
> > uses the normal e1000 driver.<br>
> >     But when I run the code, it doesn't seem to see the VFIO driver at<br>
> > all; further, it seems to think that 00:08.0<br>
> > is using a non-kernel driver - why?<br>
> >     Here's the debug output; it should pick up the single VFIO port.  I<br>
> > don't care about the 'even number of ports', that's<br>
> > easy to fix.<br>
> >     My apologies if I'm overlooking something simple.<br>
> ><br>
> > verghis@verghis-VirtualBox:~/dpdk-stable-22.11.1/build$ sudo<br>
> > examples/dpdk-skeleton -l 1 -n 4<br>
> > EAL: Detected CPU lcores: 2<br>
> > EAL: Detected NUMA nodes: 1<br>
> > EAL: Detected static linkage of DPDK<br>
> > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket<br>
> > EAL: Selected IOVA mode 'VA'<br>
> > EAL: VFIO support initialized<br>
> > rte_vfio_enable, file ../lib/eal/linux/eal_vfio.c, VFIO support initialized<br>
> > 0: examples/dpdk-skeleton (rte_dump_stack+0x42) [55bed7d42d62]<br>
> > 1: examples/dpdk-skeleton (55bed6cbb000+0x23b39f) [55bed6ef639f]<br>
> > 2: examples/dpdk-skeleton (55bed6cbb000+0x239211) [55bed6ef4211]<br>
> > 3: examples/dpdk-skeleton (main+0xf) [55bed70ac51f]<br>
> > 4: /lib/x86_64-linux-gnu/libc.so.6 (7fbde5fb2000+0x29d90) [7fbde5fdbd90]<br>
> > 5: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0x80) [7fbde5fdbe40]<br>
> > 6: examples/dpdk-skeleton (_start+0x25) [55bed7b86055]<br>
> > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, bus->name auxiliary<br>
> > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, bus->name dpaa_bus<br>
> > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, bus->name fslmc<br>
> > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, bus->name ifpga<br>
> > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, bus->name pci<br>
> > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:01.1<br>
> > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:02.0<br>
> > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:03.0<br>
> > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:04.0<br>
> > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:05.0<br>
> > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:06.0<br>
> > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:07.0<br>
> > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:08.0<br>
> > rte_pci_map_device, file ../drivers/bus/pci/linux/pci.c,<br>
> > rte_pci_device->name 0000:00:08.0, dev->kdrv 0<br>
> > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:0d.0<br>
> > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, bus->name vmbus<br>
> > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, bus->name dsa<br>
> > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, vbus->name vdev<br>
> > vdev_probe, file ../drivers/bus/vdev/vdev.c, PROBE, &vdev_device_list<br>
> > 0x55bed8764d30<br>
> > vdev_probe, file ../drivers/bus/vdev/vdev.c, dev is (nil)<br>
> > TELEMETRY: No legacy callbacks, legacy socket not created<br>
> > main, file ../examples/skeleton/basicfwd.c, nb_ports 0<br>
> > EAL: Error - exiting with code: 1<br>
> >   Cause: Error: number of ports must be even<br>
> ><br>
> > Verghis<br>
> >  <br>
<br>
You need to create two virtual nic's and bind them to VFIO which<br>
will remove from the kernel driver. Not familiar with VirtualBox config.<br>
Is the virtual NIC in Virtual Box is not the same as virtio.<br>
If it depends on the proprietary kernel driver, then<br>
you are unlikely to get DPDK to work in virtual box environment.<br>
</blockquote></div>