From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 678F7C32A for ; Fri, 5 Feb 2016 17:41:23 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 05 Feb 2016 08:41:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,401,1449561600"; d="scan'208";a="897146635" Received: from smonroyx-mobl.ger.corp.intel.com (HELO [10.237.220.32]) ([10.237.220.32]) by fmsmga001.fm.intel.com with ESMTP; 05 Feb 2016 08:41:21 -0800 From: Sergio Gonzalez Monroy To: Sowmini Varadhan References: Message-ID: <56B4D0B0.8080208@intel.com> Date: Fri, 5 Feb 2016 16:41:20 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: users@dpdk.org Subject: Re: [dpdk-users] VF bound to vfio-pci fails pci_map_device 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: Fri, 05 Feb 2016 16:41:23 -0000 Hi, On 05/02/2016 00:07, Sowmini Varadhan wrote: > I am using dpdk 2.0 on a machine with a Niantic card (3.8.13 kernel), > where I have set up the SR-IOV succesfully > > But when I try to run any of the examples with the sriov-vf bound to > the vfio-pci driver, I run into errors, I think it might have to do > with some DPDK env settings that are in error. > > I get: > > # ./build/build/app/test-pmd/testpmd -c 0xf0 -n 4 > : > EAL: probe driver: 8086:10ed rte_ixgbevf_pmd > EAL: Error - exiting with code: 1 > Cause: Requested device 0000:90:10.0 cannot be used > > Afaict, the error is happening because pci_map_device() is returning > an error, and in my case (dpdk-2.0.0) that is happening because > VFIO_PRESENT is not defined. I don't have that kernel (3.8.13) available to me at the moment, so if you double check that everything is setup properly and you still have issues, could you give full DPDK log and check if you have any DMAR errors in dmesg? > Questions are the following: > > 0. What is the BCP to get sriov/vfio-pci to play nicely with dpdk-2.0.0 http://dpdk.org/doc/guides/linux_gsg/enable_func.html#using-linux-iommu-pass-through-to-run-dpdk-with-intel-vt-d > > 1. what is the correct way to make sure VFIO_PRESENT is defined. > Note thataI already have this: > [root@brm-x52-01 dpdk-2.0.0]# grep VFIO build/.config > CONFIG_RTE_EAL_VFIO=y VFIO_PRESENT should be define if you have CONFIG_RTE_EAL_VFIO=y and Linux kernel version > 3.6. > 2. What else needs to be defined for VFIO to stick. I see that > pci_vfio_is_enabled() checks for vfio_cfg.vfio_enabled, so any other > instructions here? Nothing else that I'm aware of. > 3. My target is a test app that reflects back tcp or udp packets, and > I see that testpmd at least does this for icmp (i.e., for ping). Can > someone share some "BCP" command line to do this with testpmd? Probably the simplest app is an example called skeleton. It simply takes packets from one port to another: http://dpdk.org/doc/guides/sample_app_ug/skeleton.html If you want to know how to run testpmd: http://dpdk.org/doc/guides/testpmd_app_ug/index.html Sergio > --Sowmini