1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright 2019 Mellanox Technologies, Ltd
7 The MLX5 vDPA (vhost data path acceleration) driver library
8 (**librte_pmd_mlx5_vdpa**) provides support for **Mellanox ConnectX-6**,
9 **Mellanox ConnectX-6DX** and **Mellanox BlueField** families of
10 10/25/40/50/100/200 Gb/s adapters as well as their virtual functions (VF) in
15 Due to external dependencies, this driver is disabled in default
16 configuration of the "make" build. It can be enabled with
17 ``CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD=y`` or by using "meson" build system which
18 will detect dependencies.
24 For security reasons and robustness, this driver only deals with virtual
25 memory addresses. The way resources allocations are handled by the kernel,
26 combined with hardware specifications that allow to handle virtual memory
27 addresses directly, ensure that DPDK applications cannot access random
28 physical memory (or memory that does not belong to the current process).
30 The PMD can use libibverbs and libmlx5 to access the device firmware
31 or directly the hardware components.
32 There are different levels of objects and bypassing abilities
33 to get the best performances:
35 - Verbs is a complete high-level generic API
36 - Direct Verbs is a device-specific API
37 - DevX allows to access firmware objects
38 - Direct Rules manages flow steering at low-level hardware layer
40 Enabling librte_pmd_mlx5_vdpa causes DPDK applications to be linked against
43 A Mellanox mlx5 PCI device can be probed by either net/mlx5 driver or vdpa/mlx5
44 driver but not in parallel. Hence, the user should decide the driver by the
45 ``class`` parameter in the device argument list.
46 By default, the mlx5 device will be probed by the net/mlx5 driver.
51 * Mellanox(R) ConnectX(R)-6 200G MCX654106A-HCAT (4x200G)
52 * Mellanox(R) ConnectX(R)-6DX EN 100G MCX623106AN-CDAT (2*100G)
53 * Mellanox(R) ConnectX(R)-6DX EN 200G MCX623105AN-VDAT (1*200G)
54 * Mellanox(R) BlueField SmartNIC 25G MBF1M332A-ASCAT (2*25G)
59 - Mellanox OFED version: **4.7**
60 see :doc:`../../nics/mlx5` guide for more Mellanox OFED details.
65 These options can be modified in the ``.config`` file.
67 - ``CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD`` (default **n**)
69 Toggle compilation of librte_pmd_mlx5 itself.
71 - ``CONFIG_RTE_IBVERBS_LINK_DLOPEN`` (default **n**)
73 Build PMD with additional code to make it loadable without hard
74 dependencies on **libibverbs** nor **libmlx5**, which may not be installed
77 In this mode, their presence is still required for it to run properly,
78 however their absence won't prevent a DPDK application from starting (with
79 ``CONFIG_RTE_BUILD_SHARED_LIB`` disabled) and they won't show up as
80 missing with ``ldd(1)``.
82 It works by moving these dependencies to a purpose-built rdma-core "glue"
83 plug-in which must either be installed in a directory whose name is based
84 on ``CONFIG_RTE_EAL_PMD_PATH`` suffixed with ``-glue`` if set, or in a
85 standard location for the dynamic linker (e.g. ``/lib``) if left to the
86 default empty string (``""``).
88 This option has no performance impact.
90 - ``CONFIG_RTE_IBVERBS_LINK_STATIC`` (default **n**)
92 Embed static flavor of the dependencies **libibverbs** and **libmlx5**
93 in the PMD shared library or the executable static binary.
97 For BlueField, target should be set to ``arm64-bluefield-linux-gcc``. This
98 will enable ``CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD`` and set
99 ``RTE_CACHE_LINE_SIZE`` to 64. Default armv8a configuration of make build and
100 meson build set it to 128 then brings performance degradation.
102 Run-time configuration
103 ~~~~~~~~~~~~~~~~~~~~~~
105 - **ethtool** operations on related kernel interfaces also affect the PMD.
107 - ``class`` parameter [string]
109 Select the class of the driver that should probe the device.
110 `vdpa` for the mlx5 vDPA driver.