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 B170DA04A4 for ; Wed, 2 Mar 2022 18:24:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8968E42765; Wed, 2 Mar 2022 18:24:23 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 327D442756; Wed, 2 Mar 2022 18:24:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646241861; x=1677777861; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qz1Tj1pQmOzs/CldsKWLIzTXnrmnOIyBk9b50iuj6CU=; b=T82c4Z70A8URBZmo5Gk0Kdk2Eq4teNPociiyVEL7Chue/YKKyCD9Lqst S7M6X2IksLWnOCNoqf8jMeI8V5zUof5HXIYFz5zaf/7zBbPvRTy3IFSRS 3vDFhoo6yQ2aHGqNK3gEa5r8tlkfk4Xih26B2kWd/UKtrlB7yeJKQ1uHk zh45xQ8TtrIvw2HFYLlFv7xxTGHyfnR5Kydy+24vUEeZyax9poBhqR5Sw QCDKEO6xUuo26Qs/2bMz54kK3CAzwNwaXCBoSwJpypOHf/Ytt4Xyi6zsu bEjDROmqxKAmkeu6PmNlqLERlJ2oYzm+WVg3BgEL5PG7uAwY3Y05jIjOZ Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10274"; a="314177962" X-IronPort-AV: E=Sophos;i="5.90,149,1643702400"; d="scan'208";a="314177962" 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:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,149,1643702400"; d="scan'208";a="551348139" Received: from silpixa00399126.ir.intel.com ([10.237.223.34]) by orsmga008.jf.intel.com with ESMTP; 02 Mar 2022 09:24:15 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: stable@dpdk.org, Bruce Richardson Subject: [PATCH 6/9] doc/linux_gsg: split VFIO section into subsections Date: Wed, 2 Mar 2022 17:22:14 +0000 Message-Id: <20220302172217.472279-7-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 The VFIO section of the page about linux drivers was rather long and unstructured. This can be improved by splitting it up into subsections, to cover the specifics of memory limits and creating VFs. When moving the various text notes into the relevant subsections, we can drop the note about kernels earlier than 3.6, since DPDK no longer supports kernels that old. Signed-off-by: Bruce Richardson --- doc/guides/linux_gsg/linux_drivers.rst | 35 ++++++++++++++------------ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst index af7e3c4fbc..e29f79e385 100644 --- a/doc/guides/linux_gsg/linux_drivers.rst +++ b/doc/guides/linux_gsg/linux_drivers.rst @@ -122,6 +122,22 @@ To make use of VFIO, the ``vfio-pci`` module must be loaded: VFIO kernel is usually present by default in all distributions, however please consult your distributions documentation to make sure that is the case. +To make use of full VFIO functionality, +both kernel and BIOS must support and be configured +to use IO virtualization (such as Intel\ |reg| VT-d). + +.. note:: + + In most cases, specifying "iommu=on" as kernel parameter should be enough to + configure the Linux kernel to use IOMMU. + +For proper operation of VFIO when running DPDK applications as a non-privileged user, correct permissions should also be set up. +For more information, please refer to :ref:`Running_Without_Root_Privileges`. + + +VFIO Memory Mapping Limits +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + For DMA mapping of either external memory or hugepages, VFIO interface is used. VFIO does not support partial unmap of once mapped memory. Hence DPDK's memory is mapped in hugepage granularity or system page granularity. Number of DMA @@ -132,6 +148,9 @@ VFIO module parameter ``dma_entry_limit`` with a default value of 64K. When application is out of DMA entries, these limits need to be adjusted to increase the allowed limit. +Creating Virtual Functions using vfio-pci +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Since Linux version 5.7, the ``vfio-pci`` module supports the creation of virtual functions. After the PF is bound to ``vfio-pci`` module, @@ -194,27 +213,11 @@ The token will be used for all PF and VF ports within the application. /app/dpdk-testpmd -l 26-29 -n 4 -a 86:02.0 \ --vfio-vf-token=14d63f20-8445-11ea-8900-1f9ce7d5650d --file-prefix=vf0 -- -i -To make use of full VFIO functionality, -both kernel and BIOS must support and be configured -to use IO virtualization (such as Intel\ |reg| VT-d). - -.. note:: - - Linux versions earlier than version 3.6 do not support VFIO. - .. note:: Linux versions earlier than version 5.7 do not support the creation of virtual functions within the VFIO framework. -.. note:: - - In most cases, specifying "iommu=on" as kernel parameter should be enough to - configure the Linux kernel to use IOMMU. - -For proper operation of VFIO when running DPDK applications as a non-privileged user, correct permissions should also be set up. -For more information, please refer to :ref:`Running_Without_Root_Privileges`. - .. _vfio_noiommu: VFIO no-IOMMU mode -- 2.32.0