From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0537042982 for ; Wed, 19 Apr 2023 03:47:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 700D040A79; Wed, 19 Apr 2023 03:47:25 +0200 (CEST) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id 5F6144021F for ; Wed, 19 Apr 2023 03:47:24 +0200 (CEST) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1a6862e47b1so22758115ad.0 for ; Tue, 18 Apr 2023 18:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1681868843; x=1684460843; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=PLUzSzHNtqmStl2731Wa1Xpe+99T/5E0b/XMkQ49qXI=; b=0WZ2NrVYhvQ0pBt8dtUphfC+vjAtMUmdGpkTd5I2r0eGZkcGBCoDp8yWlE0lfjX4Nb a6fDBDodzyh1dYIyuLsR2rwkn35JiTL+kXSRoVYasNpD21B+H31I5X4DO1NWMRcTZu7j zFYmnD5iDcqnlGXo3RwaPl381ClxnPWTSVhc8q3iBLHwi63gsTaPuciBE1QVJMVRDXn1 Y9raBKQn3CyUQhesGGC/FzPfjCcrnXCaph5Abafp4EmfJi8hP2QHLJCIjIvAr11+38Yj VcPXVcJkenOnJmEjR1te023hUJAcLIwjHnd2fPM+SEEA4vzPuJ4mr5AiyUyc6+r0e6g8 PbOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681868843; x=1684460843; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PLUzSzHNtqmStl2731Wa1Xpe+99T/5E0b/XMkQ49qXI=; b=c2CxvB8NCr7W85RGLuvVoiMXCLVb6zvoI8ahEnluN0mMtw4+OVvCT5+5DMZcSACVsf Y0MDFzCS9US4ISC8px5PqTfqFAltliFjhPu8HQkW6JeohvbT9++V4bif1jPx0mkN551h Up0n4O6TT31tjnpUJAJlXY8sfRhcz/MKQULGSoILpvvhV0eabajSRmPjX/Pa3wTSYS8S G0z7NMzbXY213yUDAciNG1Mg8IODO+Z/3FHuRfPJYcXAA4Hyv1iveFnfFy8hcocr+1rF amMAAMI7KGElMNduBgKCvL6ErmZGphnmQkX+S/gEPg0TA67gVRFXuEcyda6kfTFS108H Bibg== X-Gm-Message-State: AAQBX9f8X3T+BcSXvdXjkrweB6NxT+yvqFcuiXeN/SpbH706UNrumRf7 kM4/OjvClUlivq4bkAdhwW2sNQ== X-Google-Smtp-Source: AKy350a0zYH1wvaF4jaJREH4pV+IJvXeOiQpfmKJs6+pF0/xn57Mlzb4Qo6PB5IcGOo6eMZRg8unmg== X-Received: by 2002:a17:902:ce92:b0:1a8:1867:1f7c with SMTP id f18-20020a170902ce9200b001a818671f7cmr1292319plg.40.1681868843313; Tue, 18 Apr 2023 18:47:23 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id x13-20020a170902a38d00b001a64011899asm10149834pla.25.2023.04.18.18.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Apr 2023 18:47:21 -0700 (PDT) Date: Tue, 18 Apr 2023 18:47:19 -0700 From: Stephen Hemminger To: Verghis Koshi Cc: users@dpdk.org Subject: Re: Issues with basicfwd Message-ID: <20230418184719.4a6a1d01@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Tue, 18 Apr 2023 17:14:21 -0700 Verghis Koshi wrote: > It appears that the vdev_device_list is empty - isn't this where the > probe function for VFIO lives? >=20 > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, vbus->name vdev > vdev_probe, file ../drivers/bus/vdev/vdev.c, PROBE, &vdev_device_list > 0x56337bb30d30 > vdev_probe, file ../drivers/bus/vdev/vdev.c, dev is (nil) >=20 > This is how I call basicfwd, am I missing something? >=20 > sudo examples/dpdk-skeleton -l 1 -n 4 >=20 > Thanks,. >=20 > Verghis >=20 >=20 >=20 >=20 > m >=20 > On Tue, Apr 18, 2023 at 10:11=E2=80=AFAM Verghis Koshi = wrote: >=20 > > I'm having trouble running the basicfwd example and would appreciate > > any help. > > I'm running Linux Mint 21.1 inside VirtualBox, and I've created two > > NICs: > > > > verghis@verghis-VirtualBox:~/dpdk-stable-22.11.1/build$ > > ../usertools/dpdk-devbind.py --status > > > > Network devices using DPDK-compatible driver > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > 0000:00:03.0 '79c970 [PCnet32 LANCE] 2000' drv=3Dvfio-pci unused=3Dpcne= t32 > > > > Network devices using kernel driver > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > 0000:00:08.0 '82540EM Gigabit Ethernet Controller 100e' if=3Denp0s8 > > drv=3De1000 unused=3Dvfio-pci *Active* > > > > The first is bound to vfio-pci, to be used by basicfwd, and the sec= ond > > uses the normal e1000 driver. > > But when I run the code, it doesn't seem to see the VFIO driver at > > all; further, it seems to think that 00:08.0 > > is using a non-kernel driver - why? > > Here's the debug output; it should pick up the single VFIO port. I > > don't care about the 'even number of ports', that's > > easy to fix. > > My apologies if I'm overlooking something simple. > > > > verghis@verghis-VirtualBox:~/dpdk-stable-22.11.1/build$ sudo > > examples/dpdk-skeleton -l 1 -n 4 > > EAL: Detected CPU lcores: 2 > > EAL: Detected NUMA nodes: 1 > > EAL: Detected static linkage of DPDK > > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket > > EAL: Selected IOVA mode 'VA' > > EAL: VFIO support initialized > > rte_vfio_enable, file ../lib/eal/linux/eal_vfio.c, VFIO support initial= ized > > 0: examples/dpdk-skeleton (rte_dump_stack+0x42) [55bed7d42d62] > > 1: examples/dpdk-skeleton (55bed6cbb000+0x23b39f) [55bed6ef639f] > > 2: examples/dpdk-skeleton (55bed6cbb000+0x239211) [55bed6ef4211] > > 3: examples/dpdk-skeleton (main+0xf) [55bed70ac51f] > > 4: /lib/x86_64-linux-gnu/libc.so.6 (7fbde5fb2000+0x29d90) [7fbde5fdbd90] > > 5: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0x80) [7fbde5fdbe= 40] > > 6: examples/dpdk-skeleton (_start+0x25) [55bed7b86055] > > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, bus->name auxil= iary > > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, bus->name dpaa_= bus > > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, bus->name fslmc > > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, bus->name ifpga > > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, bus->name pci > > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:01.1 > > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:02.0 > > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:03.0 > > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:04.0 > > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:05.0 > > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:06.0 > > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:07.0 > > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:08.0 > > rte_pci_map_device, file ../drivers/bus/pci/linux/pci.c, > > rte_pci_device->name 0000:00:08.0, dev->kdrv 0 > > pci_probe, file ../drivers/bus/pci/pci_common.c, dev->name 0000:00:0d.0 > > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, bus->name vmbus > > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, bus->name dsa > > rte_bus_probe, file ../lib/eal/common/eal_common_bus.c, vbus->name vdev > > vdev_probe, file ../drivers/bus/vdev/vdev.c, PROBE, &vdev_device_list > > 0x55bed8764d30 > > vdev_probe, file ../drivers/bus/vdev/vdev.c, dev is (nil) > > TELEMETRY: No legacy callbacks, legacy socket not created > > main, file ../examples/skeleton/basicfwd.c, nb_ports 0 > > EAL: Error - exiting with code: 1 > > Cause: Error: number of ports must be even > > > > Verghis > > =20 You need to create two virtual nic's and bind them to VFIO which will remove from the kernel driver. Not familiar with VirtualBox config. Is the virtual NIC in Virtual Box is not the same as virtio. If it depends on the proprietary kernel driver, then you are unlikely to get DPDK to work in virtual box environment.