From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) by dpdk.org (Postfix) with ESMTP id 0B95C5A6F for ; Sun, 5 Jun 2016 10:15:40 +0200 (CEST) Received: by mail-lf0-f50.google.com with SMTP id s64so77668023lfe.0 for ; Sun, 05 Jun 2016 01:15:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=nwToC8TtqNwVVnRToGmCRuqSS71D0m3GWLdnL9Gw5Sw=; b=yVnG+MMqGvQNZoBSl952JnJgzglytV4mypOQtgOOm2fAv7Fs6R7LvGy1r73krGtb6n A62yk7muY1jRJcjkTOsVsMRHZzlKPfDZ+Zf+IDV20EmrPy0IH9u+oaev/XjSgEShlzbq OwJX1+ZweMEa4z0gWreLXhFeBwTCaF3uAz3DTF2BY1g1txVrDgwcRKJun2l1gdTl2Yb6 9AH/AxW7vHioK7DMhVn+99sCFtUgrOOyZSaUrVXoS/UB4QuTA0p/5e7+FHO8SELJ7BaW ca/OwkqPATGb078x0pHZufhAQoosL1JP88Evcj/9D24PUgL8aILZ17kViJZkLmk2Oy+0 LpqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nwToC8TtqNwVVnRToGmCRuqSS71D0m3GWLdnL9Gw5Sw=; b=ggCybVW4eCjsDf/DvXQpL9c6Lkzv07BBixyfkp68MSr79aR4f6nsCEUGu2VvHX6A7s VZq1D+0AeDxJHtstlff07ACYIxGAe0jcQFED11f31F3+6gIj0czLvA5prGUjErWEVLVU lWrNEHr9rjfb69wdtX0tpUoAeHZo8NKSSQzBD7X+mRnKEKs7D8SBcWN3rM9P2TcGnNRV pDALGe8oAGLInevaHP7AFAn2zL1Z/1jO6u5MtC2iWY0neF9zKRc3QCcLTItNxSiXI4CG Y7qahtwerhQMRieRagrW2GBqF9N4URQtNrPDLhIknPFXhGXUZiXePWmJ3bvqUVxsac1o DRow== X-Gm-Message-State: ALyK8tKU3X/fgA88b3yXBTJkDN57O83mxtkOzuiM1yn7RwwQsB0SUjYcfX4VYoi8BY/9lA== X-Received: by 10.25.17.211 with SMTP id 80mr3294605lfr.154.1465114539460; Sun, 05 Jun 2016 01:15:39 -0700 (PDT) Received: from asus ([176.212.118.158]) by smtp.gmail.com with ESMTPSA id 201sm1251299lfa.44.2016.06.05.01.15.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Jun 2016 01:15:39 -0700 (PDT) Date: Sun, 5 Jun 2016 15:15:34 +0700 From: Ruslan Osmanov To: users@dpdk.org Message-ID: <20160605151534.60bb9d5f@asus> In-Reply-To: <20160602104323.63253670@asus> References: <20160602104323.63253670@asus> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-users] Using KNI with virtio-net-pci X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jun 2016 08:15:40 -0000 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 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