From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by dpdk.org (Postfix) with ESMTP id 2C72F2BC3 for ; Fri, 3 Jun 2016 21:12:24 +0200 (CEST) Received: by mail-lf0-f66.google.com with SMTP id k192so234779lfb.1 for ; Fri, 03 Jun 2016 12:12:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=sj50Asb/anPmBhcG4/t0pRL3Uh98tfhecMea2oQ7dKo=; b=JGIk18bdip9qIIv5o3g3lGS6kJ4DT080OS+JJxd6spMtOWjdSbNV5/tzxPTHAUhu9s WdYyU/XBlbnP8DANtYA6aKA3hd+de5UmbNJIVktKnH95NXmIyQEbPB8FCYbUfGbZmXY7 v2fXLWMG4KMzXDx/Z4ndJUBvwEYemUzBvvuGdkamTQ+irrQuL8cF3yauH5sp/Id+G5x9 knN0xW+88sI7LX9QZ89uxk0SDcKkbxxk/SzJCpVWwWaROPr9qFPa/3crAq3zOddavYYS mnvAaC6ZVQzMTluiCMLjmcCKAfImiAqVxF1QZx2/gerHL0kRne3bXVyxPdxkSNnS8COi lt2Q== 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:mime-version :content-transfer-encoding; bh=sj50Asb/anPmBhcG4/t0pRL3Uh98tfhecMea2oQ7dKo=; b=MY+xWwxHNPgYuQzeQ1IWJP+g7uRm+7SsHBsZV7cOmCyDlmKT8spaVhEd+ZpKvpU81x u6IxbRHCOHaqXP/9oSuS/B9ArGvkqHLbEiR1LRTMG8IoReajK6o0O3MMWr6sK9R14Hhl PeASF7dm+TJ32yupP8coxZfOGQZcwUo/wbhvDQ9HCUmq1kZ+qdJKEg0/d/8gAgzpiQf+ PEc3k8Xh7RK6lBsWBBgwpKdWnRn1K7voqG9KfFnkNA+3QbrsRy3g7gMsNlA3QLU+BkVz NA8h43oVWFyUQDCDi6vMwaUzZGnACnHAR6tig+Z0i41leOv/CvxjhJnXWsVeEH/c+IkL cLdg== X-Gm-Message-State: ALyK8tIDgNneOn7fyTWvumn5FTU0lNUo3Xin1flgbIb5wKmRbIhhYm10XZV7MVS/5Lm51w== X-Received: by 10.25.214.156 with SMTP id p28mr1198939lfi.95.1464981143764; Fri, 03 Jun 2016 12:12:23 -0700 (PDT) Received: from asus ([176.212.118.158]) by smtp.gmail.com with ESMTPSA id f64sm670664lfe.24.2016.06.03.12.12.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jun 2016 12:12:23 -0700 (PDT) Date: Sat, 4 Jun 2016 02:12:19 +0700 From: Ruslan Osmanov To: dev@dpdk.org Message-ID: <20160604021219.397afd60@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: [dpdk-dev] Fw: Using KNI with virtio-net-pci X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2016 19:12:24 -0000 Hi, I had posted the following to the users mailing list a couple of days ago, but there was no answer. My question contains references to the DPDK source code, so I probably will not break the rules by sending a copy to the dev mailing list. Begin forwarded message: Date: Thu, 2 Jun 2016 10:43:23 +0700 From: Ruslan Osmanov To: users@dpdk.org Subject: Using KNI with virtio-net-pci 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 -- Ruslan Osmanov