Merge branch 'ieee802154-for-davem-2019-08-24' of git://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / Documentation / networking / device_drivers / mellanox / mlx5.rst
1 .. SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
2
3 =================================================
4 Mellanox ConnectX(R) mlx5 core VPI Network Driver
5 =================================================
6
7 Copyright (c) 2019, Mellanox Technologies LTD.
8
9 Contents
10 ========
11
12 - `Enabling the driver and kconfig options`_
13 - `Devlink info`_
14 - `Devlink health reporters`_
15
16 Enabling the driver and kconfig options
17 ================================================
18
19 | mlx5 core is modular and most of the major mlx5 core driver features can be selected (compiled in/out)
20 | at build time via kernel Kconfig flags.
21 | Basic features, ethernet net device rx/tx offloads and XDP, are available with the most basic flags
22 | CONFIG_MLX5_CORE=y/m and CONFIG_MLX5_CORE_EN=y.
23 | For the list of advanced features please see below.
24
25 **CONFIG_MLX5_CORE=(y/m/n)** (module mlx5_core.ko)
26
27 |    The driver can be enabled by choosing CONFIG_MLX5_CORE=y/m in kernel config.
28 |    This will provide mlx5 core driver for mlx5 ulps to interface with (mlx5e, mlx5_ib).
29
30
31 **CONFIG_MLX5_CORE_EN=(y/n)**
32
33 |    Choosing this option will allow basic ethernet netdevice support with all of the standard rx/tx offloads.
34 |    mlx5e is the mlx5 ulp driver which provides netdevice kernel interface, when chosen, mlx5e will be
35 |    built-in into mlx5_core.ko.
36
37
38 **CONFIG_MLX5_EN_ARFS=(y/n)**
39
40 |     Enables Hardware-accelerated receive flow steering (arfs) support, and ntuple filtering.
41 |     https://community.mellanox.com/s/article/howto-configure-arfs-on-connectx-4
42
43
44 **CONFIG_MLX5_EN_RXNFC=(y/n)**
45
46 |    Enables ethtool receive network flow classification, which allows user defined
47 |    flow rules to direct traffic into arbitrary rx queue via ethtool set/get_rxnfc API.
48
49
50 **CONFIG_MLX5_CORE_EN_DCB=(y/n)**:
51
52 |    Enables `Data Center Bridging (DCB) Support <https://community.mellanox.com/s/article/howto-auto-config-pfc-and-ets-on-connectx-4-via-lldp-dcbx>`_.
53
54
55 **CONFIG_MLX5_MPFS=(y/n)**
56
57 |    Ethernet Multi-Physical Function Switch (MPFS) support in ConnectX NIC.
58 |    MPFs is required for when `Multi-Host <http://www.mellanox.com/page/multihost>`_ configuration is enabled to allow passing
59 |    user configured unicast MAC addresses to the requesting PF.
60
61
62 **CONFIG_MLX5_ESWITCH=(y/n)**
63
64 |    Ethernet SRIOV E-Switch support in ConnectX NIC. E-Switch provides internal SRIOV packet steering
65 |    and switching for the enabled VFs and PF in two available modes:
66 |           1) `Legacy SRIOV mode (L2 mac vlan steering based) <https://community.mellanox.com/s/article/howto-configure-sr-iov-for-connectx-4-connectx-5-with-kvm--ethernet-x>`_.
67 |           2) `Switchdev mode (eswitch offloads) <https://www.mellanox.com/related-docs/prod_software/ASAP2_Hardware_Offloading_for_vSwitches_User_Manual_v4.4.pdf>`_.
68
69
70 **CONFIG_MLX5_CORE_IPOIB=(y/n)**
71
72 |    IPoIB offloads & acceleration support.
73 |    Requires CONFIG_MLX5_CORE_EN to provide an accelerated interface for the rdma
74 |    IPoIB ulp netdevice.
75
76
77 **CONFIG_MLX5_FPGA=(y/n)**
78
79 |    Build support for the Innova family of network cards by Mellanox Technologies.
80 |    Innova network cards are comprised of a ConnectX chip and an FPGA chip on one board.
81 |    If you select this option, the mlx5_core driver will include the Innova FPGA core and allow
82 |    building sandbox-specific client drivers.
83
84
85 **CONFIG_MLX5_EN_IPSEC=(y/n)**
86
87 |    Enables `IPSec XFRM cryptography-offload accelaration <http://www.mellanox.com/related-docs/prod_software/Mellanox_Innova_IPsec_Ethernet_Adapter_Card_User_Manual.pdf>`_.
88
89 **CONFIG_MLX5_EN_TLS=(y/n)**
90
91 |   TLS cryptography-offload accelaration.
92
93
94 **CONFIG_MLX5_INFINIBAND=(y/n/m)** (module mlx5_ib.ko)
95
96 |   Provides low-level InfiniBand/RDMA and `RoCE <https://community.mellanox.com/s/article/recommended-network-configuration-examples-for-roce-deployment>`_ support.
97
98
99 **External options** ( Choose if the corresponding mlx5 feature is required )
100
101 - CONFIG_PTP_1588_CLOCK: When chosen, mlx5 ptp support will be enabled
102 - CONFIG_VXLAN: When chosen, mlx5 vxaln support will be enabled.
103 - CONFIG_MLXFW: When chosen, mlx5 firmware flashing support will be enabled (via devlink and ethtool).
104
105 Devlink info
106 ============
107
108 The devlink info reports the running and stored firmware versions on device.
109 It also prints the device PSID which represents the HCA board type ID.
110
111 User command example::
112
113    $ devlink dev info pci/0000:00:06.0
114       pci/0000:00:06.0:
115       driver mlx5_core
116       versions:
117          fixed:
118             fw.psid MT_0000000009
119          running:
120             fw.version 16.26.0100
121          stored:
122             fw.version 16.26.0100
123
124 Devlink health reporters
125 ========================
126
127 tx reporter
128 -----------
129 The tx reporter is responsible of two error scenarios:
130
131 - TX timeout
132     Report on kernel tx timeout detection.
133     Recover by searching lost interrupts.
134 - TX error completion
135     Report on error tx completion.
136     Recover by flushing the TX queue and reset it.
137
138 TX reporter also support Diagnose callback, on which it provides
139 real time information of its send queues status.
140
141 User commands examples:
142
143 - Diagnose send queues status::
144
145     $ devlink health diagnose pci/0000:82:00.0 reporter tx
146
147 - Show number of tx errors indicated, number of recover flows ended successfully,
148   is autorecover enabled and graceful period from last recover::
149
150     $ devlink health show pci/0000:82:00.0 reporter tx
151
152 fw reporter
153 -----------
154 The fw reporter implements diagnose and dump callbacks.
155 It follows symptoms of fw error such as fw syndrome by triggering
156 fw core dump and storing it into the dump buffer.
157 The fw reporter diagnose command can be triggered any time by the user to check
158 current fw status.
159
160 User commands examples:
161
162 - Check fw heath status::
163
164     $ devlink health diagnose pci/0000:82:00.0 reporter fw
165
166 - Read FW core dump if already stored or trigger new one::
167
168     $ devlink health dump show pci/0000:82:00.0 reporter fw
169
170 NOTE: This command can run only on the PF which has fw tracer ownership,
171 running it on other PF or any VF will return "Operation not permitted".
172
173 fw fatal reporter
174 -----------------
175 The fw fatal reporter implements dump and recover callbacks.
176 It follows fatal errors indications by CR-space dump and recover flow.
177 The CR-space dump uses vsc interface which is valid even if the FW command
178 interface is not functional, which is the case in most FW fatal errors.
179 The recover function runs recover flow which reloads the driver and triggers fw
180 reset if needed.
181
182 User commands examples:
183
184 - Run fw recover flow manually::
185
186     $ devlink health recover pci/0000:82:00.0 reporter fw_fatal
187
188 - Read FW CR-space dump if already strored or trigger new one::
189
190     $ devlink health dump show pci/0000:82:00.1 reporter fw_fatal
191
192 NOTE: This command can run only on PF.