From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by dpdk.org (Postfix) with ESMTP id 5D63B2C13 for ; Thu, 2 Jun 2016 05:43:29 +0200 (CEST) Received: by mail-lf0-f67.google.com with SMTP id h68so3810991lfh.3 for ; Wed, 01 Jun 2016 20:43:29 -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=MzeqaFfRl9cpP4ooRoZ5o5VYlFqg3ogxX37LMC05YP4=; b=FaPFH4xjEI/3r18aZilShjYWFhVc8CY6tG5zyze26RkP3kTto6pz2mhAlfrLjRviwh 1lE/65zbZiQfWtkUVFWbmY/2Y8lbBldtGYi3PZePUGABVL9FPEh6ehHnsXyNfzzP+jA6 BMyypoOzqiANrEcsw31fBOp2V1npLEKQJ6lC4rK5Mj618QQEaizbj5ZV5TqoEMGeEK2j rg/+FfSdFDF/LpOHvnyEn3ahjRuai0azOVLAqAwQeewf8w/Q9wBFWKKXepb1dfckf0XT f+B53yCNn8Zc1UFUXh9Hrm5zomBSvbjilcNPxiOB3Gkmw133AmUxWlbkOlb9FGwkphkU xVww== 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=MzeqaFfRl9cpP4ooRoZ5o5VYlFqg3ogxX37LMC05YP4=; b=as0ohtB0AQNR3tj6csgX4riChOQB+2VnCj8yESn/ZS86Gx1zwdcHENRoocfo2Idxjn JQmkYqvtWc5j40lsN3K0UmqPyIelS02323yZ2G14FU8J0vNwJQr/6Gl2H0WPBGgAqQPP YESS+rT9FBB/vwjHdiOS4L+2lu3WcuX/vAZOx1LwSS2v2iW2ZERxAdxsS3OWUg38uuC9 +y1EulFmD7XJ35OuiuFSjXlJKDn3cyiM0YgX77auCaPjRGikpauQLiGAU020ikYGfZPU nwvcUWV/6zshPzaul1/Li+Z3yijmcz9/u1MPuLEuxkkNGIZJKPuBqgMeAZnmtmhr2PDr 5I9g== X-Gm-Message-State: ALyK8tJx3ZBF3zjNIHZwHQGL6BWjvl4zTGDRJ7M/kR7LAVttcZ3SoSrGwR3hf4TR5I64Mg== X-Received: by 10.25.20.211 with SMTP id 80mr3256441lfu.15.1464839009017; Wed, 01 Jun 2016 20:43:29 -0700 (PDT) Received: from asus ([176.212.118.158]) by smtp.gmail.com with ESMTPSA id 201sm5944368lfa.44.2016.06.01.20.43.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jun 2016 20:43:28 -0700 (PDT) Date: Thu, 2 Jun 2016 10:43:23 +0700 From: Ruslan Osmanov To: users@dpdk.org Message-ID: <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: [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: Thu, 02 Jun 2016 03:43:29 -0000 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