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``, the DPDK also includes the igb_uio
module which can be found in the kmod subdirectory referred to above. It can
be loaded as shown below:
..code-block:: console
sudo modprobe uio
sudo insmod kmod/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 ``igb_uio`` or ``uio_pci_generic``.
For more details see :ref:`linux_gsg_binding_kernel` below.
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.
To make use of VFIO, the ``vfio-pci`` module must be loaded:
..code-block:: console
sudo modprobe vfio-pci
Note that in order to use VFIO, your kernel must support it.
VFIO kernel modules have been included in the Linux kernel since version 3.6.0 and are usually present by default,
however please consult your distributions documentation to make sure that is the case.
Also, to use VFIO, both kernel and BIOS must support and be configured to use IO virtualization (such as Intel® VT-d).
..note::
``vfio-pci`` module doesn't support the creation of virtual functions.
For proper operation of VFIO when running DPDK applications as a non-privileged user, correct permissions should also be set up.
This can be done by using the DPDK setup script (called dpdk-setup.sh and located in the usertools directory).
..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.
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.