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 A41C6A0032; Wed, 16 Mar 2022 14:46:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE7744118F; Wed, 16 Mar 2022 14:46:17 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 8897141158; Wed, 16 Mar 2022 14:46:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647438373; x=1678974373; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3YHzXpMZ9jD6DfBX+P1IcyBU8wxnvL0LoCGbgefYMLI=; b=jOrqfWFPeYC1N56cqmPl/5Z9wqKOl7ghggDoS8C+9fZSddJDb/lW1hIU ruEz427d//OOapCZArUubj159TAKLDYNbXLLI15h1KdzrpTuZ81wvWvrl VIHj+Zhspsz7WN+iLpz36CoLhslohZgkChKkrJJxtOtRKFjESAyKb5jJ/ itYhCbuyXc9vIZzowUxf6KSGq4bTkT/RJzuyA/dOboj/Ax120XmtJkPsi yUllny3jXhhSBIXXlD/k9Ce5LYaOHsShTgoHMxncQ6VzwPnyHZaBAQLOI SMfyQQ7Jf23+uMpHN/c801NKzk9Zv0Dy79mNO/OXggxjnmBCk1THFM7zO g==; X-IronPort-AV: E=McAfee;i="6200,9189,10286"; a="256780595" X-IronPort-AV: E=Sophos;i="5.90,186,1643702400"; d="scan'208";a="256780595" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2022 06:46:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,186,1643702400"; d="scan'208";a="714606525" Received: from silpixa00399126.ir.intel.com ([10.237.223.34]) by orsmga005.jf.intel.com with ESMTP; 16 Mar 2022 06:46:10 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org Subject: [PATCH v2 8/9] doc: consolidate all VFIO content on GSG driver page Date: Wed, 16 Mar 2022 13:45:50 +0000 Message-Id: <20220316134551.1099599-9-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220316134551.1099599-1-bruce.richardson@intel.com> References: <20220302172217.472279-1-bruce.richardson@intel.com> <20220316134551.1099599-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Rather than having separate sections for VFIO and VFIO no-iommu mode, as well as a separate section further down the document on troubleshooting VFIO, we can consolidate all these as subsections into a primary VFIO section. This section starts with the basics of VFIO use, then covers no-iommu mode, before moving on to the more advanced topics such as creating VFs and ending with the troubleshooting subsection. Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- doc/guides/linux_gsg/linux_drivers.rst | 116 ++++++++++++------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst index 6ff8586940..8320db44d9 100644 --- a/doc/guides/linux_gsg/linux_drivers.rst +++ b/doc/guides/linux_gsg/linux_drivers.rst @@ -135,6 +135,38 @@ For proper operation of VFIO when running DPDK applications as a non-privileged For more information, please refer to :ref:`Running_Without_Root_Privileges`. +.. _vfio_noiommu: + +VFIO no-IOMMU mode +~~~~~~~~~~~~~~~~~~ + +If there is no IOMMU available on the system, VFIO can still be used, +but it has to be loaded with an additional module parameter: + +.. code-block:: console + + modprobe vfio enable_unsafe_noiommu_mode=1 + +Alternatively, one can also enable this option in an already loaded kernel module: + +.. code-block:: console + + echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode + +After that, VFIO can be used with hardware devices as usual. + +.. note:: + + It may be required to unload all VFIO related-modules before probing + the module again with ``enable_unsafe_noiommu_mode=1`` parameter. + +.. warning:: + + Since no-IOMMU mode forgoes IOMMU protection, it is inherently unsafe. + That said, 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 Memory Mapping Limits ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -218,65 +250,8 @@ The token will be used for all PF and VF ports within the application. Linux versions earlier than version 5.7 do not support the creation of virtual functions within the VFIO framework. -.. _vfio_noiommu: - -VFIO no-IOMMU mode ------------------- - -If there is no IOMMU available on the system, VFIO can still be used, -but it has to be loaded with an additional module parameter: - -.. code-block:: console - - modprobe vfio enable_unsafe_noiommu_mode=1 - -Alternatively, one can also enable this option in an already loaded kernel module: - -.. code-block:: console - - echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode - -After that, VFIO can be used with hardware devices as usual. - -.. note:: - - It may be required to unload all VFIO related-modules before probing - the module again with ``enable_unsafe_noiommu_mode=1`` parameter. - -.. warning:: - - Since no-IOMMU mode forgoes IOMMU protection, it is inherently unsafe. - That said, 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. - -.. _bifurcated_driver: - -Bifurcated Driver ------------------ - -PMDs which use the bifurcated driver co-exists with the device kernel driver. -On such model the NIC is controlled by the kernel, while the data -path is performed by the PMD directly on top of the device. - -Such model has the following benefits: - - - It is secure and robust, as the memory management and isolation - is done by the kernel. - - It enables the user to use legacy linux tools such as ``ethtool`` or - ``ifconfig`` while running DPDK application on the same network ports. - - It enables the DPDK application to filter only part of the traffic, - while the rest will be directed and handled by the kernel driver. - The flow bifurcation is performed by the NIC hardware. - As an example, using :ref:`flow_isolated_mode` allows to choose - strictly what is received in DPDK. - -More about the bifurcated driver can be found in -`Mellanox Bifurcated DPDK PMD -`__. - Troubleshooting VFIO --------------------- +~~~~~~~~~~~~~~~~~~~~ In certain situations, using ``dpdk-devbind.py`` script to bind a device to VFIO driver may fail. @@ -321,6 +296,31 @@ 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. +.. _bifurcated_driver: + +Bifurcated Driver +----------------- + +PMDs which use the bifurcated driver co-exists with the device kernel driver. +On such model the NIC is controlled by the kernel, while the data +path is performed by the PMD directly on top of the device. + +Such model has the following benefits: + + - It is secure and robust, as the memory management and isolation + is done by the kernel. + - It enables the user to use legacy linux tools such as ``ethtool`` or + ``ifconfig`` while running DPDK application on the same network ports. + - It enables the DPDK application to filter only part of the traffic, + while the rest will be directed and handled by the kernel driver. + The flow bifurcation is performed by the NIC hardware. + As an example, using :ref:`flow_isolated_mode` allows to choose + strictly what is received in DPDK. + +More about the bifurcated driver can be found in +`Mellanox Bifurcated DPDK PMD +`__. + .. _uio: UIO -- 2.32.0