From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 80E03A04A4 for ; Wed, 2 Mar 2022 18:24:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79E184275B; Wed, 2 Mar 2022 18:24:24 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 7F83442756; Wed, 2 Mar 2022 18:24:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646241862; x=1677777862; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zkqiqgTW9W5WUn2KcJ0DEdhcSJpz8wrzyTx+Tth8JWI=; b=PhI8ATloMynHZV8NINn6S91NH9zKcmO6VmDsoGBJ2nTP/Iy59nzyOh91 Z0DFHCTu6qDDNt7SRsI6d16wZcignPThQyf6pgAoDJx5XVe0hhA6wmsHk SODbAud+jMX0jrSkj8k9rZEJnLKvKHeGT//ahxTYcTX8LibL2yAmGIlfa H//dw+PbAq/Qz4iWkDVXB08K1mR2Y3nB7jiHVcQ9hlIQAbVLlKkxd8VFB lbB5CfigJNh0UKeVp1TX8BhedxXB7L8lQnm+WLa3dUoOHMSVWdDonVd/1 iFRUXMYtDsJ5YqICSsPS5W3dJyfi80aSRhCbAKGn95WIsTwZGgKJf2bwz Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10274"; a="314177965" X-IronPort-AV: E=Sophos;i="5.90,149,1643702400"; d="scan'208";a="314177965" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2022 09:24:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,149,1643702400"; d="scan'208";a="551348149" Received: from silpixa00399126.ir.intel.com ([10.237.223.34]) by orsmga008.jf.intel.com with ESMTP; 02 Mar 2022 09:24:16 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: stable@dpdk.org, Bruce Richardson Subject: [PATCH 7/9] doc/linux_gsg: move UIO section to the end Date: Wed, 2 Mar 2022 17:22:15 +0000 Message-Id: <20220302172217.472279-8-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220302172217.472279-1-bruce.richardson@intel.com> References: <20220302172217.472279-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org To further de-emphasise UIO over the alternatives, we can move the UIO section of the drivers page to the end of the document, giving more prominence to VFIO and bifurcated drivers. Signed-off-by: Bruce Richardson --- doc/guides/linux_gsg/linux_drivers.rst | 104 ++++++++++++------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst index e29f79e385..b2be442d27 100644 --- a/doc/guides/linux_gsg/linux_drivers.rst +++ b/doc/guides/linux_gsg/linux_drivers.rst @@ -250,58 +250,6 @@ After that, VFIO can be used with hardware devices as usual. to keep the degree of device access and programming that VFIO has, in situations where IOMMU is not available. -.. _uio: - -UIO ---- - -.. warning:: - - Using UIO drivers is inherently unsafe due to this method lacking IOMMU protection, - and can only be done by root user. - -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 be used as a substitute for VFIO. 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:: - - For some devices which lack support for legacy interrupts, e.g. virtual function - (VF) devices, the ``igb_uio`` module may be needed in place of ``uio_pci_generic``. - -.. 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 is in passthrough mode. - 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 systems. - .. _bifurcated_driver: Bifurcated Driver @@ -372,3 +320,55 @@ This can be checked in the boot configuration of your system: If ``CONFIG_VFIO_NOIOMMU`` is not enabled in the kernel configuration, VFIO driver will not support the no-IOMMU mode, and other alternatives (such as UIO drivers) will have to be used. + +.. _uio: + +UIO +--- + +.. warning:: + + Using UIO drivers is inherently unsafe due to this method lacking IOMMU protection, + and can only be done by root user. + +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 be used as a substitute for VFIO. 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:: + + For some devices which lack support for legacy interrupts, e.g. virtual function + (VF) devices, the ``igb_uio`` module may be needed in place of ``uio_pci_generic``. + +.. 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 is in passthrough mode. + 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 systems. -- 2.32.0