1 .. SPDX-License-Identifier: GPL-2.0
7 This document describes the devlink features implemented by the ``mlx5``
13 .. list-table:: Generic parameters implemented
22 If the device supports RoCE disablement, RoCE enablement state controls
23 device support for RoCE capability. Otherwise, the control occurs in the
24 driver stack. When RoCE is disabled at the driver level, only raw
25 ethernet QPs are supported.
28 - The range is between 64 and 4096.
31 - The range is between 64 and 4096.
34 - The range is between 1 and 2^31. Only power of 2 values are supported.
36 The ``mlx5`` driver also implements the following driver-specific
39 .. list-table:: Driver-specific parameters implemented
46 * - ``flow_steering_mode``
49 - Controls the flow steering mode of the driver
51 * ``dmfs`` Device managed flow steering. In DMFS mode, the HW
52 steering entities are created and managed through firmware.
53 * ``smfs`` Software managed flow steering. In SMFS mode, the HW
54 steering entities are created and manage through the driver without
55 firmware intervention.
57 SMFS mode is faster and provides better rule insertion rate compared to
59 * - ``fdb_large_groups``
62 - Control the number of large groups (size > 1) in the FDB table.
64 * The default value is 15, and the range is between 1 and 1024.
68 - Control MultiPort E-Switch shared fdb mode.
70 An experimental mode where a single E-Switch is used and all the vports
71 and physical ports on the NIC are connected to it.
73 An example is to send traffic from a VF that is created on PF0 to an
74 uplink that is natively associated with the uplink of PF1
76 Note: Future devices, ConnectX-8 and onward, will eventually have this
77 as the default to allow forwarding between all NIC ports in a single
78 E-switch environment and the dual E-switch mode will likely get
82 * - ``esw_port_metadata``
85 - When applicable, disabling eswitch metadata can increase packet rate up
86 to 20% depending on the use case and packet sizes.
88 Eswitch port metadata state controls whether to internally tag packets
89 with metadata. Metadata tagging must be enabled for multi-port RoCE,
90 failover between representors and stacked devices. By default metadata is
91 enabled on the supported devices in E-switch. Metadata is applicable only
92 for E-switch in switchdev mode and users may disable it when NONE of the
93 below use cases will be in use:
94 1. HCA is in Dual/multi-port RoCE mode.
95 2. VF/SF representor bonding (Usually used for Live migration)
98 When metadata is disabled, the above use cases will fail to initialize if
99 users try to enable them.
100 * - ``hairpin_num_queues``
103 - We refer to a TC NIC rule that involves forwarding as "hairpin".
104 Hairpin queues are mlx5 hardware specific implementation for hardware
105 forwarding of such packets.
107 Control the number of hairpin queues.
108 * - ``hairpin_queue_size``
111 - Control the size (in packets) of the hairpin queues.
113 The ``mlx5`` driver supports reloading via ``DEVLINK_CMD_RELOAD``
118 The ``mlx5`` driver reports the following versions
120 .. list-table:: devlink info versions implemented
128 - Used to represent the board id of the device.
131 - Three digit major.minor.subminor firmware version number.
138 The tx reporter is responsible for reporting and recovering of the following three error scenarios:
141 Report on kernel tx timeout detection.
142 Recover by searching lost interrupts.
143 - tx error completion
144 Report on error tx completion.
145 Recover by flushing the tx queue and reset it.
146 - tx PTP port timestamping CQ unhealthy
147 Report too many CQEs never delivered on port ts CQ.
148 Recover by flushing and re-creating all PTP channels.
150 tx reporter also support on demand diagnose callback, on which it provides
151 real time information of its send queues status.
153 User commands examples:
155 - Diagnose send queues status::
157 $ devlink health diagnose pci/0000:82:00.0 reporter tx
160 This command has valid output only when interface is up, otherwise the command has empty output.
162 - Show number of tx errors indicated, number of recover flows ended successfully,
163 is autorecover enabled and graceful period from last recover::
165 $ devlink health show pci/0000:82:00.0 reporter tx
169 The rx reporter is responsible for reporting and recovering of the following two error scenarios:
171 - rx queues' initialization (population) timeout
172 Population of rx queues' descriptors on ring initialization is done
173 in napi context via triggering an irq. In case of a failure to get
174 the minimum amount of descriptors, a timeout would occur, and
175 descriptors could be recovered by polling the EQ (Event Queue).
176 - rx completions with errors (reported by HW on interrupt context)
177 Report on rx completion error.
178 Recover (if needed) by flushing the related queue and reset it.
180 rx reporter also supports on demand diagnose callback, on which it
181 provides real time information of its receive queues' status.
183 - Diagnose rx queues' status and corresponding completion queue::
185 $ devlink health diagnose pci/0000:82:00.0 reporter rx
188 This command has valid output only when interface is up. Otherwise, the command has empty output.
190 - Show number of rx errors indicated, number of recover flows ended successfully,
191 is autorecover enabled, and graceful period from last recover::
193 $ devlink health show pci/0000:82:00.0 reporter rx
197 The fw reporter implements `diagnose` and `dump` callbacks.
198 It follows symptoms of fw error such as fw syndrome by triggering
199 fw core dump and storing it into the dump buffer.
200 The fw reporter diagnose command can be triggered any time by the user to check
203 User commands examples:
205 - Check fw heath status::
207 $ devlink health diagnose pci/0000:82:00.0 reporter fw
209 - Read FW core dump if already stored or trigger new one::
211 $ devlink health dump show pci/0000:82:00.0 reporter fw
214 This command can run only on the PF which has fw tracer ownership,
215 running it on other PF or any VF will return "Operation not permitted".
219 The fw fatal reporter implements `dump` and `recover` callbacks.
220 It follows fatal errors indications by CR-space dump and recover flow.
221 The CR-space dump uses vsc interface which is valid even if the FW command
222 interface is not functional, which is the case in most FW fatal errors.
223 The recover function runs recover flow which reloads the driver and triggers fw
225 On firmware error, the health buffer is dumped into the dmesg. The log
226 level is derived from the error's severity (given in health buffer).
228 User commands examples:
230 - Run fw recover flow manually::
232 $ devlink health recover pci/0000:82:00.0 reporter fw_fatal
234 - Read FW CR-space dump if already stored or trigger new one::
236 $ devlink health dump show pci/0000:82:00.1 reporter fw_fatal
239 This command can run only on PF.
243 The vnic reporter implements only the `diagnose` callback.
244 It is responsible for querying the vnic diagnostic counters from fw and displaying
247 Description of the vnic counters:
249 - total_q_under_processor_handle
250 number of queues in an error state due to
251 an async error or errored command.
252 - send_queue_priority_update_flow
253 number of QP/SQ priority/SL update events.
255 number of times CQ entered an error state due to an overflow.
257 number of times an EQ mapped to async events was overrun.
258 comp_eq_overrun number of times an EQ mapped to completion events was
260 - quota_exceeded_command
261 number of commands issued and failed due to quota exceeded.
263 number of commands issued and failed dues to any reason other than quota
265 - nic_receive_steering_discard
266 number of packets that completed RX flow
267 steering but were discarded due to a mismatch in flow table.
268 - generated_pkt_steering_fail
269 number of packets generated by the VNIC experiencing unexpected steering
270 failure (at any point in steering flow).
271 - handled_pkt_steering_fail
272 number of packets handled by the VNIC experiencing unexpected steering
273 failure (at any point in steering flow owned by the VNIC, including the FDB
274 for the eswitch owner).
276 User commands examples:
278 - Diagnose PF/VF vnic counters::
280 $ devlink health diagnose pci/0000:82:00.1 reporter vnic
282 - Diagnose representor vnic counters (performed by supplying devlink port of the
283 representor, which can be obtained via devlink port command)::
285 $ devlink health diagnose pci/0000:82:00.1/65537 reporter vnic
288 This command can run over all interfaces such as PF/VF and representor ports.