From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 1B0CB1F5 for ; Thu, 29 Jan 2015 10:35:01 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 29 Jan 2015 01:31:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="446920239" Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by FMSMGA003.fm.intel.com with ESMTP; 29 Jan 2015 01:21:10 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 29 Jan 2015 17:34:57 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.253]) by shsmsx102.ccr.corp.intel.com ([169.254.2.124]) with mapi id 14.03.0195.001; Thu, 29 Jan 2015 17:34:56 +0800 From: "Qiu, Michael" To: "Zhou, Danny" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 0/3] Enable uio_pci_generic support Thread-Index: AQHQO6YBA0yjFhpxJ0ar7F1IFCXiuw== Date: Thu, 29 Jan 2015 09:34:55 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286CCFD9C@SHSMSX101.ccr.corp.intel.com> References: <1422523699-17181-1-git-send-email-danny.zhou@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 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: Thu, 29 Jan 2015 09:35:02 -0000 On 1/29/2015 5:28 PM, Danny Zhou wrote:=0A= > Linux kernel provides UIO as well as VFIO mechanism to support writing us= er=0A= > space device driver. Comparing to UIO which is available since 2.6.32 ker= nel,=0A= > the VFIO is introduced into kernel since version 3.6.0 with better interr= upt=0A= > and memory protection (build on top of Intel VT-d technology) supports.= =0A= =0A= I would like to say that, VFIO is not only for X86.=0A= =0A= Thanks,=0A= Michael=0A= > Basically, UIO and VFIO do two common things below:=0A= > 1) Map PCIe device's I/O memory space to user space driver=0A= > 2) Support device interrupt notification mechanism that notifies user spa= ce=0A= > driver/application when a device interrupt triggers.=0A= >=0A= > To run an DPDK application and make use of VFIO, two in_kernel modules=0A= > vfio and vfio-pci module must be loaded. To use UIO, a DPDK kernel=0A= > module igb_uio, which was there since DPDK is invented, must be loaded to= =0A= > attach to in_kernel uio module. As an solution to deprecate igb_uio, =0A= > this patch serials leverage the uio_pci_generic in_kernel module to suppo= rt=0A= > DPDK user space PMD in a generic fashion (similar to how VFIO works), to= =0A= > remove user space DPDK dependency on GPL code igb_uio in kernel. =0A= >=0A= > Example to bind Network Ports to uio_pci_generic:=0A= > modprobe uio=0A= > modprobe uio_pci_generic=0A= > /* to bind device 08:00.0, to the uio_pci_generic driver */=0A= > ./tools/dpdk_nic_bind.py -b uio_pci_generic 08:00.0=0A= >=0A= > Note: this patch set does not remove igb_uio support due to igb_uio suppo= rts=0A= > creating maximum number of SR-IOV VFs (Virtual Functions) by using max_vf= s =0A= > kernel parameter on older kernels (kernel 3.7.x and below).=0A= > Specifically, igb_uio explicitly calls pci_enable_sriov() to create VFs, = while=0A= > it is not invoked in either uio or uio_pci_generic kernel modules. On ker= nel 3.8.x=0A= > and above, user can use the standard sysfs to enable VFs. For examples:= =0A= >=0A= > #echo $num_vf_enabled > /sys/class/net/$dev/device/sriov_numvfs //enabl= e VFs=0A= > #echo 0 > /sys/class/net/$dev/device/sriov_numvfs //disab= le VFs=0A= >=0A= > Danny Zhou (3):=0A= > eal: add interrupt enable/disable routines for uio_pci_generic=0A= > eal: enable uio_pci_generic support=0A= > tools: enable binding NIC device to uio_pci_generic=0A= >=0A= > lib/librte_eal/common/include/rte_pci.h | 1 +=0A= > lib/librte_eal/linuxapp/eal/eal_interrupts.c | 68 +++++--=0A= > lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +-=0A= > lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 202 +++++++++++----= ------=0A= > .../linuxapp/eal/include/exec-env/rte_interrupts.h | 10 +-=0A= > tools/dpdk_nic_bind.py | 2 +-=0A= > 6 files changed, 172 insertions(+), 113 deletions(-)=0A= >=0A= =0A=