1 .. SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
3 =================================================
4 Mellanox ConnectX(R) mlx5 core VPI Network Driver
5 =================================================
7 Copyright (c) 2019, Mellanox Technologies LTD.
12 - `Enabling the driver and kconfig options`_
14 - `Devlink health reporters`_
16 Enabling the driver and kconfig options
17 ================================================
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.
25 **CONFIG_MLX5_CORE=(y/m/n)** (module mlx5_core.ko)
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).
31 **CONFIG_MLX5_CORE_EN=(y/n)**
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.
38 **CONFIG_MLX5_EN_ARFS=(y/n)**
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
44 **CONFIG_MLX5_EN_RXNFC=(y/n)**
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.
50 **CONFIG_MLX5_CORE_EN_DCB=(y/n)**:
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>`_.
55 **CONFIG_MLX5_MPFS=(y/n)**
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.
62 **CONFIG_MLX5_ESWITCH=(y/n)**
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>`_.
70 **CONFIG_MLX5_CORE_IPOIB=(y/n)**
72 | IPoIB offloads & acceleration support.
73 | Requires CONFIG_MLX5_CORE_EN to provide an accelerated interface for the rdma
74 | IPoIB ulp netdevice.
77 **CONFIG_MLX5_FPGA=(y/n)**
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.
85 **CONFIG_MLX5_EN_IPSEC=(y/n)**
87 | Enables `IPSec XFRM cryptography-offload accelaration <http://www.mellanox.com/related-docs/prod_software/Mellanox_Innova_IPsec_Ethernet_Adapter_Card_User_Manual.pdf>`_.
89 **CONFIG_MLX5_EN_TLS=(y/n)**
91 | TLS cryptography-offload accelaration.
94 **CONFIG_MLX5_INFINIBAND=(y/n/m)** (module mlx5_ib.ko)
96 | Provides low-level InfiniBand/RDMA and `RoCE <https://community.mellanox.com/s/article/recommended-network-configuration-examples-for-roce-deployment>`_ support.
99 **External options** ( Choose if the corresponding mlx5 feature is required )
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).
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.
111 User command example::
113 $ devlink dev info pci/0000:00:06.0
118 fw.psid MT_0000000009
120 fw.version 16.26.0100
122 fw.version 16.26.0100
124 Devlink health reporters
125 ========================
129 The tx reporter is responsible for reporting and recovering of the following two error scenarios:
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.
138 TX reporter also support on demand diagnose callback, on which it provides
139 real time information of its send queues status.
141 User commands examples:
143 - Diagnose send queues status::
145 $ devlink health diagnose pci/0000:82:00.0 reporter tx
147 NOTE: This command has valid output only when interface is up, otherwise the command has empty output.
149 - Show number of tx errors indicated, number of recover flows ended successfully,
150 is autorecover enabled and graceful period from last recover::
152 $ devlink health show pci/0000:82:00.0 reporter tx
156 The rx reporter is responsible for reporting and recovering of the following two error scenarios:
158 - RX queues initialization (population) timeout
159 RX queues descriptors population on ring initialization is done in
160 napi context via triggering an irq, in case of a failure to get
161 the minimum amount of descriptors, a timeout would occur and it
162 could be recoverable by polling the EQ (Event Queue).
163 - RX completions with errors (reported by HW on interrupt context)
164 Report on rx completion error.
165 Recover (if needed) by flushing the related queue and reset it.
167 RX reporter also supports on demand diagnose callback, on which it
168 provides real time information of its receive queues status.
170 - Diagnose rx queues status, and corresponding completion queue::
172 $ devlink health diagnose pci/0000:82:00.0 reporter rx
174 NOTE: This command has valid output only when interface is up, otherwise the command has empty output.
176 - Show number of rx errors indicated, number of recover flows ended successfully,
177 is autorecover enabled and graceful period from last recover::
179 $ devlink health show pci/0000:82:00.0 reporter rx
183 The fw reporter implements diagnose and dump callbacks.
184 It follows symptoms of fw error such as fw syndrome by triggering
185 fw core dump and storing it into the dump buffer.
186 The fw reporter diagnose command can be triggered any time by the user to check
189 User commands examples:
191 - Check fw heath status::
193 $ devlink health diagnose pci/0000:82:00.0 reporter fw
195 - Read FW core dump if already stored or trigger new one::
197 $ devlink health dump show pci/0000:82:00.0 reporter fw
199 NOTE: This command can run only on the PF which has fw tracer ownership,
200 running it on other PF or any VF will return "Operation not permitted".
204 The fw fatal reporter implements dump and recover callbacks.
205 It follows fatal errors indications by CR-space dump and recover flow.
206 The CR-space dump uses vsc interface which is valid even if the FW command
207 interface is not functional, which is the case in most FW fatal errors.
208 The recover function runs recover flow which reloads the driver and triggers fw
211 User commands examples:
213 - Run fw recover flow manually::
215 $ devlink health recover pci/0000:82:00.0 reporter fw_fatal
217 - Read FW CR-space dump if already strored or trigger new one::
219 $ devlink health dump show pci/0000:82:00.1 reporter fw_fatal
221 NOTE: This command can run only on PF.