* [dpdk-users] Using KNI with virtio-net-pci
@ 2016-06-02 3:43 Ruslan Osmanov
2016-06-05 8:15 ` Ruslan Osmanov
2016-06-27 19:48 ` Ferruh Yigit
0 siblings, 2 replies; 4+ messages in thread
From: Ruslan Osmanov @ 2016-06-02 3:43 UTC (permalink / raw)
To: users
Hi,
I'm going to develop a DPDK application on a laptop, but the laptop's
hardware is not supported by DPDK. Furtunately, DPDK supports
paravirtualized devices(http://www.dpdk.org/doc/nics) including
virtio-net.
So I'm trying to configure a QEMU guest for running the Kernel NIC
Interface(KNI) on a virtio-net-pci device. The problem is that the KNI
sample application doesn't accept the virtio-pci driver.
QEMU command:
eth_device=virtio-net-pci
exec qemu-system-x86_64 -enable-kvm \
-cpu host -smp 2 \
-vga std \
-mem-prealloc -mem-path /dev/hugepages \
-drive file=GentooVM.img,if=virtio \
-netdev user,id=vmnic,hostname=gentoo \
-device $eth_device,netdev=vmnic \
-m 1024M \
-monitor stdio \
-name "Gentoo VM"
Running the KNI sample application in the guest:
sudo ./examples/kni/build/app/kni -c 0x3 -n 4 -- \
-P -p 0x1 --config="(0,0,1)"
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 0 on socket 0
EAL: Support maximum 128 logical core(s) by configuration.
EAL: Detected 2 lcore(s)
EAL: Probing VFIO support...
EAL: IOMMU type 1 (Type 1) is supported
EAL: IOMMU type 8 (No-IOMMU) is not supported
EAL: VFIO support initialized
EAL: Setting up physically contiguous memory...
...
EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using
unreliable clock cycles !
EAL: Master lcore 0 is ready (tid=657d58c0;cpuset=[0])
PMD: rte_igbvf_pmd_init(): >>
EAL: lcore 1 is ready (tid=305ff700;cpuset=[1])
EAL: PCI device 0000:00:03.0 on NUMA socket -1
EAL: probe driver: 1af4:1000 rte_virtio_pmd
EAL: Not managed by a supported kernel driver(0), skipped
PMD: virtio_read_caps(): failed to map pci device!
PMD: vtpci_init(): trying with legacy virtio pci.
Segmentation fault
$ lspci
...
00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
I've noticed that pci_scan_one() function sets dev->kdrv =
RTE_KDRV_NONE in lib/librte_eal/linuxapp/eal/eal_pci.c, while the
driver is detected as virtio-pci
(from /sys/bus/pci/devices/0000:00:03.0/driver).
Is it even possible to run KNI with virtio-net-pci device?
If it's impossible, then are there other options?
--
Ruslan Osmanov
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-users] Using KNI with virtio-net-pci
2016-06-02 3:43 [dpdk-users] Using KNI with virtio-net-pci Ruslan Osmanov
@ 2016-06-05 8:15 ` Ruslan Osmanov
2016-06-27 19:48 ` Ferruh Yigit
1 sibling, 0 replies; 4+ messages in thread
From: Ruslan Osmanov @ 2016-06-05 8:15 UTC (permalink / raw)
To: users
nobody can answer this simple question? I'm just trying to understand
why the sample KNI application fails.
sudo ./examples/kni/build/app/kni -c 0x3 -- -P -p 0x1 \
--config="(0,1,0)"
EAL: Master lcore 0 is ready (tid=5f4e48c0;cpuset=[0])
PMD: rte_igbvf_pmd_init(): >>
EAL: lcore 1 is ready (tid=2b9ff700;cpuset=[1])
EAL: PCI device 0000:00:03.0 on NUMA socket -1
EAL: probe driver: 8086:100e rte_em_pmd
EAL: Not managed by a supported kernel driver, skipped
EAL: PCI device 0000:00:04.0 on NUMA socket -1
EAL: probe driver: 1af4:1000 rte_virtio_pmd
EAL: Not managed by a supported kernel driver, skipped
PMD: virtio_read_caps(): failed to map pci device!
PMD: vtpci_init(): trying with legacy virtio pci.
Segmentation fault
python2 ./tools/cpu_layout.py
============================================================
Core and Socket Information (as reported by /proc/cpuinfo)
============================================================
cores = [0]
sockets = [0, 1]
Socket 0 Socket 1
-------- --------
Core 0 [0] [1]
Sorry, but the output is not very informative. Please help me to figure
out what's wrong with it.
On Thu, 2 Jun 2016 10:43:23 +0700
Ruslan Osmanov <rrosmanov@gmail.com> wrote:
> Hi,
>
> I'm going to develop a DPDK application on a laptop, but the laptop's
> hardware is not supported by DPDK. Furtunately, DPDK supports
> paravirtualized devices(http://www.dpdk.org/doc/nics) including
> virtio-net.
>
> So I'm trying to configure a QEMU guest for running the Kernel NIC
> Interface(KNI) on a virtio-net-pci device. The problem is that the KNI
> sample application doesn't accept the virtio-pci driver.
>
>
> QEMU command:
>
> eth_device=virtio-net-pci
> exec qemu-system-x86_64 -enable-kvm \
> -cpu host -smp 2 \
> -vga std \
> -mem-prealloc -mem-path /dev/hugepages \
> -drive file=GentooVM.img,if=virtio \
> -netdev user,id=vmnic,hostname=gentoo \
> -device $eth_device,netdev=vmnic \
> -m 1024M \
> -monitor stdio \
> -name "Gentoo VM"
>
> Running the KNI sample application in the guest:
>
> sudo ./examples/kni/build/app/kni -c 0x3 -n 4 -- \
> -P -p 0x1 --config="(0,0,1)"
>
> EAL: Detected lcore 0 as core 0 on socket 0
> EAL: Detected lcore 1 as core 0 on socket 0
> EAL: Support maximum 128 logical core(s) by configuration.
> EAL: Detected 2 lcore(s)
> EAL: Probing VFIO support...
> EAL: IOMMU type 1 (Type 1) is supported
> EAL: IOMMU type 8 (No-IOMMU) is not supported
> EAL: VFIO support initialized
> EAL: Setting up physically contiguous memory...
> ...
> EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using
> unreliable clock cycles !
> EAL: Master lcore 0 is ready (tid=657d58c0;cpuset=[0])
> PMD: rte_igbvf_pmd_init(): >>
> EAL: lcore 1 is ready (tid=305ff700;cpuset=[1])
> EAL: PCI device 0000:00:03.0 on NUMA socket -1
> EAL: probe driver: 1af4:1000 rte_virtio_pmd
> EAL: Not managed by a supported kernel driver(0), skipped
> PMD: virtio_read_caps(): failed to map pci device!
> PMD: vtpci_init(): trying with legacy virtio pci.
> Segmentation fault
>
> $ lspci
> ...
> 00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
>
> I've noticed that pci_scan_one() function sets dev->kdrv =
> RTE_KDRV_NONE in lib/librte_eal/linuxapp/eal/eal_pci.c, while the
> driver is detected as virtio-pci
> (from /sys/bus/pci/devices/0000:00:03.0/driver).
>
> Is it even possible to run KNI with virtio-net-pci device?
>
> If it's impossible, then are there other options?
>
--
Ruslan Osmanov
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-users] Using KNI with virtio-net-pci
2016-06-02 3:43 [dpdk-users] Using KNI with virtio-net-pci Ruslan Osmanov
2016-06-05 8:15 ` Ruslan Osmanov
@ 2016-06-27 19:48 ` Ferruh Yigit
[not found] ` <20160628102457.4aaccbc6@asus>
1 sibling, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2016-06-27 19:48 UTC (permalink / raw)
To: Ruslan Osmanov, users
On 6/2/2016 4:43 AM, Ruslan Osmanov wrote:
> Hi,
>
> I'm going to develop a DPDK application on a laptop, but the laptop's
> hardware is not supported by DPDK. Furtunately, DPDK supports
> paravirtualized devices(http://www.dpdk.org/doc/nics) including
> virtio-net.
>
> So I'm trying to configure a QEMU guest for running the Kernel NIC
> Interface(KNI) on a virtio-net-pci device. The problem is that the KNI
> sample application doesn't accept the virtio-pci driver.
>
>
> QEMU command:
>
> eth_device=virtio-net-pci
> exec qemu-system-x86_64 -enable-kvm \
> -cpu host -smp 2 \
> -vga std \
> -mem-prealloc -mem-path /dev/hugepages \
> -drive file=GentooVM.img,if=virtio \
> -netdev user,id=vmnic,hostname=gentoo \
> -device $eth_device,netdev=vmnic \
> -m 1024M \
> -monitor stdio \
> -name "Gentoo VM"
>
> Running the KNI sample application in the guest:
>
> sudo ./examples/kni/build/app/kni -c 0x3 -n 4 -- \
> -P -p 0x1 --config="(0,0,1)"
>
> EAL: Detected lcore 0 as core 0 on socket 0
> EAL: Detected lcore 1 as core 0 on socket 0
> EAL: Support maximum 128 logical core(s) by configuration.
> EAL: Detected 2 lcore(s)
> EAL: Probing VFIO support...
> EAL: IOMMU type 1 (Type 1) is supported
> EAL: IOMMU type 8 (No-IOMMU) is not supported
> EAL: VFIO support initialized
> EAL: Setting up physically contiguous memory...
> ...
> EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using
> unreliable clock cycles !
> EAL: Master lcore 0 is ready (tid=657d58c0;cpuset=[0])
> PMD: rte_igbvf_pmd_init(): >>
> EAL: lcore 1 is ready (tid=305ff700;cpuset=[1])
> EAL: PCI device 0000:00:03.0 on NUMA socket -1
> EAL: probe driver: 1af4:1000 rte_virtio_pmd
> EAL: Not managed by a supported kernel driver(0), skipped
> PMD: virtio_read_caps(): failed to map pci device!
> PMD: vtpci_init(): trying with legacy virtio pci.
> Segmentation fault
>
> $ lspci
> ...
> 00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
>
> I've noticed that pci_scan_one() function sets dev->kdrv =
> RTE_KDRV_NONE in lib/librte_eal/linuxapp/eal/eal_pci.c, while the
> driver is detected as virtio-pci
> (from /sys/bus/pci/devices/0000:00:03.0/driver).
>
> Is it even possible to run KNI with virtio-net-pci device?
>
> If it's impossible, then are there other options?
>
Hi Ruslan,
I tried with same QEMU command with you and able to run KNI sample
application. I am using dpdk on latest master branch.
A few questions:
> EAL: PCI device 0000:00:03.0 on NUMA socket -1
> EAL: probe driver: 1af4:1000 rte_virtio_pmd
> EAL: Not managed by a supported kernel driver(0), skipped
1)
According above log, device not bind to a supported driver, this looks
like your problem. Can you please send output of:
dpdk_nic_bind.py -s
2)
Can you run testpmd? Or problem is just KNI?
3)
Are you using dpdk16.04?
Regards,
ferruh
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-28 10:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-02 3:43 [dpdk-users] Using KNI with virtio-net-pci Ruslan Osmanov
2016-06-05 8:15 ` Ruslan Osmanov
2016-06-27 19:48 ` Ferruh Yigit
[not found] ` <20160628102457.4aaccbc6@asus>
2016-06-28 10:00 ` Ferruh Yigit
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).