From: Anatoly Burakov <anatoly.burakov@intel.com> To: dev@dpdk.org Cc: thomas@monjalon.net Subject: [dpdk-dev] [PATCH 1/4] doc: move VFIO driver to be first Date: Tue, 10 Nov 2020 18:09:47 +0000 Message-ID: <7d1840b4184bf363e3b9ddaff0683f13b324078a.1605031542.git.anatoly.burakov@intel.com> (raw) 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 <anatoly.burakov@intel.com> --- 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 <http://git.dpdk.org/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 <http://git.dpdk.org/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: -- 2.17.1
next reply other threads:[~2020-11-10 18:10 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-10 18:09 Anatoly Burakov [this message] 2020-11-10 18:09 ` [dpdk-dev] [PATCH 2/4] doc: reword VFIO and UIO Linux GSG section Anatoly Burakov 2020-11-10 18:09 ` [dpdk-dev] [PATCH 3/4] doc: add VFIO no-IOMMU " Anatoly Burakov 2020-11-10 18:09 ` [dpdk-dev] [PATCH 4/4] doc: add VFIO troubleshooting section Anatoly Burakov 2020-11-18 15:37 ` [dpdk-dev] [PATCH v2 1/4] doc: move VFIO driver to be first Anatoly Burakov 2020-11-18 18:24 ` David Marchand 2020-11-19 11:04 ` Burakov, Anatoly 2020-11-19 11:32 ` [dpdk-dev] [PATCH v3 " Anatoly Burakov 2020-11-23 17:22 ` Ferruh Yigit 2020-11-19 11:32 ` [dpdk-dev] [PATCH v3 2/4] doc: reword VFIO and UIO Linux GSG section Anatoly Burakov 2020-11-19 11:32 ` [dpdk-dev] [PATCH v3 3/4] doc: add VFIO no-IOMMU " Anatoly Burakov 2020-11-27 15:47 ` Bruce Richardson 2020-11-19 11:32 ` [dpdk-dev] [PATCH v3 4/4] doc: add VFIO troubleshooting section Anatoly Burakov 2020-11-27 15:30 ` Thomas Monjalon 2020-11-27 15:57 ` Burakov, Anatoly 2020-11-27 15:49 ` Bruce Richardson 2020-11-27 16:29 ` Kevin Traynor 2020-11-27 17:27 ` Thomas Monjalon 2020-11-18 15:37 ` [dpdk-dev] [PATCH v2 2/4] doc: reword VFIO and UIO Linux GSG section Anatoly Burakov 2020-11-18 15:37 ` [dpdk-dev] [PATCH v2 3/4] doc: add VFIO no-IOMMU " Anatoly Burakov 2020-11-18 15:37 ` [dpdk-dev] [PATCH v2 4/4] doc: add VFIO troubleshooting section Anatoly Burakov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=7d1840b4184bf363e3b9ddaff0683f13b324078a.1605031542.git.anatoly.burakov@intel.com \ --to=anatoly.burakov@intel.com \ --cc=dev@dpdk.org \ --cc=thomas@monjalon.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git