From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 4AC46B767 for ; Fri, 20 Feb 2015 18:41:10 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 20 Feb 2015 09:41:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,616,1418112000"; d="scan'208";a="688472290" Received: from dwdohert-dpdk-fedora-20.ir.intel.com ([163.33.213.98]) by orsmga002.jf.intel.com with ESMTP; 20 Feb 2015 09:41:08 -0800 Message-ID: <54E77270.102@intel.com> Date: Fri, 20 Feb 2015 17:44:16 +0000 From: Declan Doherty User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Bruce Richardson , dev@dpdk.org References: <1424365731-32228-1-git-send-email-danny.zhou@intel.com> <1424451557-27419-1-git-send-email-bruce.richardson@intel.com> In-Reply-To: <1424451557-27419-1-git-send-email-bruce.richardson@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 0/3] enable uio_pci_generic support 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, 20 Feb 2015 17:41:10 -0000 On 20/02/15 16:59, Bruce Richardson wrote: > v3 changes > - made processing of uio devices identical, irrespective of igb_uio or uio_pci_generic > - removed storage of kernel driver name from dev node as now unneeded. > > v2 changes: > - Change variable name of kernel driver with precise comment > - Fix a union definition error in v1 patchset > - Move redefined macro IORESOURCE_MEM to rte_pci.h with comment > > Linux kernel provides UIO as well as VFIO mechanism to support writing user > space device driver. Comparing to UIO which is available since 2.6.32 kernel, > the VFIO is introduced into kernel since version 3.6.0 with better interrupt > and memory protection (build on top of Intel VT-d technology) supports. > Basically, UIO and VFIO do two common things below: > 1) Map PCIe device's I/O memory space to user space driver > 2) Support device interrupt notification mechanism that notifies user space > driver/application when a device interrupt triggers. > > To run an DPDK application and make use of VFIO, two in_kernel modules > vfio and vfio-pci module must be loaded. To use UIO, a DPDK kernel > module igb_uio, which was there since DPDK is invented, must be loaded to > attach to in_kernel uio module. As an solution to deprecate igb_uio, > this patch serials leverage the uio_pci_generic in_kernel module to support > DPDK user space PMD in a generic fashion (similar to how VFIO works), to > remove user space DPDK dependency on GPL code igb_uio in kernel. > > Example to bind Network Ports to uio_pci_generic: > modprobe uio > modprobe uio_pci_generic > /* to bind device 08:00.0, to the uio_pci_generic driver */ > ./tools/dpdk_nic_bind.py -b uio_pci_generic 08:00.0 > > Note: this patch set does not remove igb_uio support due to igb_uio supports > creating maximum number of SR-IOV VFs (Virtual Functions) by using max_vfs > kernel parameter on older kernels (kernel 3.7.x and below). > Specifically, igb_uio explicitly calls pci_enable_sriov() to create VFs, while > it is not invoked in either uio or uio_pci_generic kernel modules. On kernel 3.8.x > and above, user can use the standard sysfs to enable VFs. For examples: > > #echo $num_vf_enabled > /sys/class/net/$dev/device/sriov_numvfs // enable VFs > #echo 0 > /sys/class/net/$dev/device/sriov_numvfs // disable VFs > > > Zhou Danny (3): > eal: enable uio_pci_generic support > eal: add interrupt enable/disable routines for uio_pci_generic > tools: enable binding NIC device to uio_pci_generic > > lib/librte_eal/common/include/rte_pci.h | 3 + > lib/librte_eal/linuxapp/eal/eal_interrupts.c | 68 +++++++-- > lib/librte_eal/linuxapp/eal/eal_pci.c | 4 +- > lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 167 ++++++++++----------- > .../linuxapp/eal/include/exec-env/rte_interrupts.h | 8 +- > tools/dpdk_nic_bind.py | 2 +- > 6 files changed, 144 insertions(+), 108 deletions(-) > Series Acked-by: Declan Doherty