From patchwork Wed Nov 18 15:37:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatoly Burakov X-Patchwork-Id: 84326 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 81109A04DD; Wed, 18 Nov 2020 16:37:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 98E644C90; Wed, 18 Nov 2020 16:37:46 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 1BABAC900 for ; Wed, 18 Nov 2020 16:37:43 +0100 (CET) IronPort-SDR: w8L1DDe/b3WHfY+0hM/jGbdcGnYa5x+lyfdda8ktUrlnq+yO9liXWj869ctIneuZwhz5k90mCU 6BRj9yfhqTQw== X-IronPort-AV: E=McAfee;i="6000,8403,9808"; a="171302342" X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="171302342" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Nov 2020 07:37:40 -0800 IronPort-SDR: afgiZ8itUG5STt2/dGYp1motvdMvkzRpL1rSj5Brt24q4npepp9PmBUGS0C5Bhlbs6wjSAegP6 fDtGmTT/LNmA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="325628017" Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.222.52]) by orsmga003.jf.intel.com with ESMTP; 18 Nov 2020 07:37:39 -0800 From: Anatoly Burakov To: dev@dpdk.org Cc: thomas@monjalon.net, john.mcnamara@intel.com Date: Wed, 18 Nov 2020 15:37:35 +0000 Message-Id: <6d1a335178212c2983a8e59b7fcf66001c9b262a.1605713845.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <7d1840b4184bf363e3b9ddaff0683f13b324078a.1605031542.git.anatoly.burakov@intel.com> References: <7d1840b4184bf363e3b9ddaff0683f13b324078a.1605031542.git.anatoly.burakov@intel.com> Subject: [dpdk-dev] [PATCH v2 1/4] doc: move VFIO driver to be first X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Currently, the Linux GSG mentions UIO drivers first. This is not ideal as for the longest time, the recommended way to use DPDK with hardware devices has been to use VFIO driver. This commit simply moves UIO section after VFIO, with minor edits. Signed-off-by: Anatoly Burakov --- doc/guides/linux_gsg/linux_drivers.rst | 86 +++++++++++++------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst index 080b44955a..69ef4ee275 100644 --- a/doc/guides/linux_gsg/linux_drivers.rst +++ b/doc/guides/linux_gsg/linux_drivers.rst @@ -12,51 +12,10 @@ Different PMDs may require different kernel drivers in order to work properly. Depends on the PMD being used, a corresponding kernel driver should be load and bind to the network ports. -UIO ---- - -A small kernel module to set up the device, map device memory to user-space and register interrupts. -In many cases, the standard ``uio_pci_generic`` module included in the Linux kernel -can provide the uio capability. This module can be loaded using the command: - -.. code-block:: console - - sudo modprobe uio_pci_generic - -.. note:: - - ``uio_pci_generic`` module doesn't support the creation of virtual functions. - -As an alternative to the ``uio_pci_generic``, there is the ``igb_uio`` module -which can be found in the repository `dpdk-kmods `_. -It can be loaded as shown below: - -.. code-block:: console - - sudo modprobe uio - sudo insmod igb_uio.ko - -.. note:: - - If UEFI secure boot is enabled, the Linux kernel may disallow the use of - UIO on the system. Therefore, devices for use by DPDK should be bound to the - ``vfio-pci`` kernel module rather than any UIO-based module. - For more details see :ref:`linux_gsg_binding_kernel` below. - -.. note:: - - If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module, - please make sure that the IOMMU is disabled or passthrough. One can add - ``intel_iommu=off`` or ``amd_iommu=off`` or ``intel_iommu=on iommu=pt`` in GRUB - command line on x86_64 systems, or add ``iommu.passthrough=1`` on aarch64 system. - -Since DPDK release 1.7 onward provides VFIO support, use of UIO is optional -for platforms that support using VFIO. - VFIO ---- -A more robust and secure driver in compare to the ``UIO``, relying on IOMMU protection. +VFIO is a robust and secure driver that relies on IOMMU protection. To make use of VFIO, the ``vfio-pci`` module must be loaded: .. code-block:: console @@ -111,7 +70,48 @@ This can be done by using the DPDK setup script (called dpdk-setup.sh and locate .. note:: - VFIO can be used without IOMMU. While this is just as unsafe as using UIO, it does make it possible for the user to keep the degree of device access and programming that VFIO has, in situations where IOMMU is not available. + VFIO can be used without IOMMU. While this is unsafe, it does make it possible for the user to keep the degree of device access and programming that VFIO has, in situations where IOMMU is not available. + +UIO +--- + +In situations where using VFIO is not an option, there are alternative drivers one can use. +In many cases, the standard ``uio_pci_generic`` module included in the Linux kernel +can provide the uio capability. This module can be loaded using the command: + +.. code-block:: console + + sudo modprobe uio_pci_generic + +.. note:: + + ``uio_pci_generic`` module doesn't support the creation of virtual functions. + +As an alternative to the ``uio_pci_generic``, there is the ``igb_uio`` module +which can be found in the repository `dpdk-kmods `_. +It can be loaded as shown below: + +.. code-block:: console + + sudo modprobe uio + sudo insmod igb_uio.ko + +.. note:: + + If UEFI secure boot is enabled, the Linux kernel may disallow the use of + UIO on the system. Therefore, devices for use by DPDK should be bound to the + ``vfio-pci`` kernel module rather than any UIO-based module. + For more details see :ref:`linux_gsg_binding_kernel` below. + +.. note:: + + If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module, + please make sure that the IOMMU is disabled or passthrough. One can add + ``intel_iommu=off`` or ``amd_iommu=off`` or ``intel_iommu=on iommu=pt`` in GRUB + command line on x86_64 systems, or add ``iommu.passthrough=1`` on aarch64 system. + +Since DPDK release 1.7 onward provides VFIO support, use of UIO is optional +for platforms that support using VFIO. .. _bifurcated_driver: