doc: add shared guide for mlx5 drivers
[dpdk.git] / doc / guides / vdpadevs / mlx5.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright 2019 Mellanox Technologies, Ltd
3
4 .. include:: <isonum.txt>
5
6 MLX5 vDPA Driver
7 ================
8
9 The mlx5 vDPA (vhost data path acceleration) driver library
10 (**librte_vdpa_mlx5**) provides support for **Mellanox ConnectX-6**,
11 **Mellanox ConnectX-6 Dx** and **Mellanox BlueField** families of
12 10/25/40/50/100/200 Gb/s adapters as well as their virtual functions (VF) in
13 SR-IOV context.
14
15 .. note::
16
17    This driver is enabled automatically when using "meson" build system which
18    will detect dependencies.
19
20 See :doc:`../../platform/mlx5` guide for design details,
21 and which PMDs can be combined with vDPA PMD.
22
23 Supported NICs
24 --------------
25
26 * Mellanox\ |reg| ConnectX\ |reg|-6 200G MCX654106A-HCAT (2x200G)
27 * Mellanox\ |reg| ConnectX\ |reg|-6 Dx EN 25G MCX621102AN-ADAT (2x25G)
28 * Mellanox\ |reg| ConnectX\ |reg|-6 Dx EN 100G MCX623106AN-CDAT (2x100G)
29 * Mellanox\ |reg| ConnectX\ |reg|-6 Dx EN 200G MCX623105AN-VDAT (1x200G)
30 * Mellanox\ |reg| BlueField SmartNIC 25G MBF1M332A-ASCAT (2x25G)
31
32 Prerequisites
33 -------------
34
35 - Mellanox OFED version: **5.0**
36   See :ref:`mlx5 common prerequisites <mlx5_linux_prerequisites>` for more details.
37
38 Run-time configuration
39 ~~~~~~~~~~~~~~~~~~~~~~
40
41 Driver options
42 ^^^^^^^^^^^^^^
43
44 Please refer to :ref:`mlx5 common options <mlx5_common_driver_options>`
45 for an additional list of options shared with other mlx5 drivers.
46
47 - ``event_mode`` parameter [int]
48
49   - 0, Completion queue scheduling will be managed by a timer thread which
50     automatically adjusts its delays to the coming traffic rate.
51
52   - 1, Completion queue scheduling will be managed by a timer thread with fixed
53     delay time.
54
55   - 2, Completion queue scheduling will be managed by interrupts. Each CQ burst
56     arms the CQ in order to get an interrupt event in the next traffic burst.
57
58   - Default mode is 1.
59
60 - ``event_us`` parameter [int]
61
62   Per mode micro-seconds parameter - relevant only for event mode 0 and 1:
63
64   - 0, A nonzero value to set timer step in micro-seconds. The timer thread
65     dynamic delay change steps according to this value. Default value is 1us.
66
67   - 1, A value to set fixed timer delay in micro-seconds. Default value is 0us.
68
69 - ``no_traffic_time`` parameter [int]
70
71   A nonzero value defines the traffic off time, in polling cycle time units,
72   that moves the driver to no-traffic mode. In this mode the polling is stopped
73   and interrupts are configured to the device in order to notify traffic for the
74   driver. Default value is 16.
75
76 - ``event_core`` parameter [int]
77
78   CPU core number to set polling thread affinity to, default to control plane
79   cpu.
80
81 - ``hw_latency_mode`` parameter [int]
82
83   The completion queue moderation mode:
84
85   - 0, HW default.
86
87   - 1, Latency is counted from the first packet completion report.
88
89   - 2, Latency is counted from the last packet completion.
90
91 - ``hw_max_latency_us`` parameter [int]
92
93   - 1 - 4095, The maximum time in microseconds that packet completion report
94     can be delayed.
95
96   - 0, HW default.
97
98 - ``hw_max_pending_comp`` parameter [int]
99
100   - 1 - 65535, The maximum number of pending packets completions in an HW queue.
101
102   - 0, HW default.
103
104
105 Error handling
106 ^^^^^^^^^^^^^^
107
108 Upon potential hardware errors, mlx5 PMD try to recover, give up if failed 3
109 times in 3 seconds, virtq will be put in disable state. User should check log
110 to get error information, or query vdpa statistics counter to know error type
111 and count report.