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 CA27AA0032; Wed, 16 Mar 2022 14:46:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 080C441178; Wed, 16 Mar 2022 14:46:16 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id F29D641152; Wed, 16 Mar 2022 14:46:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647438369; x=1678974369; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9rm1Z0cfODzs2d4Rg/+54CeEHueOyU095nFeb+cikL4=; b=P2B9tUdl+trC++3g4Pi7TCZv6anjXX6x9pEh8mongQrk/PXnJAhjYhjP KmV8NgaG464b54F3tGtpeuUbm43vEc5RFmrSHPRTnGoKsflf8uCj1hPyo z3vQ11ml/JFrhffT0PhqPtEgL9QEJ/dK/poMoGHTaPgkaor1E1GB33x9i JJEhMK1aHo+STk5GGd+xIQQMs+JSbcCa9cGgeuVZQUPnlhXe5KhjZYrZa 9kCpz6SP3NSIuAMVYgoR2gs0NiPpYeJmZHCF44G3fTNKklBzs6e5KEwtH 9U2GCT1vWx8yvb8S3Sem9biXTjCrTvjju5nWVK+FFQ19LJaw82MnoONzu Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10286"; a="256780574" X-IronPort-AV: E=Sophos;i="5.90,186,1643702400"; d="scan'208";a="256780574" 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:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,186,1643702400"; d="scan'208";a="714606509" Received: from silpixa00399126.ir.intel.com ([10.237.223.34]) by orsmga005.jf.intel.com with ESMTP; 16 Mar 2022 06:46:07 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org Subject: [PATCH v2 6/9] doc: split GSG VFIO section into subsections Date: Wed, 16 Mar 2022 13:45:48 +0000 Message-Id: <20220316134551.1099599-7-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 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. Cc: stable@dpdk.org 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 bd649db929..f9c24e9456 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