From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by dpdk.org (Postfix) with ESMTP id 40A6BB7C7 for ; Fri, 20 Feb 2015 23:36:06 +0100 (CET) Received: by wevm14 with SMTP id m14so8054341wev.13 for ; Fri, 20 Feb 2015 14:36:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=awKnosH45oLaltOssnyJ87fO3irvwEgV28UYjnIL5w0=; b=DN15DJE/OfNeOO3Bo5hQwJRn2vO+RtJ4PprMnZRrGcIuV5KynKAnK1Hf7sT0MPq/CW 0uQvrEnP2LCmhZzgzV0BJR3lEBY2e/CYKTFZXmEtO81hFqEqhfOSeqQAibWcEmfgW9VE xhczRUA/t2+hOdiXf9bQxpECI+ocG7jdcAGGAeIhV2KKlEUFGVy8wFlOgoofje+NIwog UTYAcWVjqT1v2w98m7sHLfkzRnEmfWF4drAR7oBmpyV9KDiNQHjec6Sip6krZ5RppAze pfC9e/urLc8ASD6wISmt9YGHcxS+040HpCxT8hwwrQV467u7fPCnPcpXRDc3BiWFU5+L 5G8A== X-Gm-Message-State: ALoCoQk2X4rJho6vUaGmqtSTGiPhWfmRpHTjivImFvckcHhlYgK/O0w2TqpY79TUg/jH8RwQXMXF X-Received: by 10.194.80.40 with SMTP id o8mr98209wjx.34.1424471766128; Fri, 20 Feb 2015 14:36:06 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id hg7sm43989842wjb.44.2015.02.20.14.36.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Feb 2015 14:36:05 -0800 (PST) From: Thomas Monjalon To: Bruce Richardson , danny.zhou@intel.com Date: Fri, 20 Feb 2015 23:35:35 +0100 Message-ID: <2756218.dzv8LREliS@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <54E77270.102@intel.com> References: <1424365731-32228-1-git-send-email-danny.zhou@intel.com> <1424451557-27419-1-git-send-email-bruce.richardson@intel.com> <54E77270.102@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org 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 22:36:06 -0000 > > 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 > > Series Acked-by: Declan Doherty Applied, thanks