1 .. SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
2 .. include:: <isonum.txt>
8 :Copyright: |copy| 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20 The devlink info reports the running and stored firmware versions on device.
21 It also prints the device PSID which represents the HCA board type ID.
23 User command example::
25 $ devlink dev info pci/0000:00:06.0
39 flow_steering_mode: Device flow steering mode
40 ---------------------------------------------
41 The flow steering mode parameter controls the flow steering mode of the driver.
42 Two modes are supported:
44 1. 'dmfs' - Device managed flow steering.
45 2. 'smfs' - Software/Driver managed flow steering.
47 In DMFS mode, the HW steering entities are created and managed through the
49 In SMFS mode, the HW steering entities are created and managed though by
50 the driver directly into hardware without firmware intervention.
52 SMFS mode is faster and provides better rule insertion rate compared to default DMFS mode.
54 User command examples:
56 - Set SMFS flow steering mode::
58 $ devlink dev param set pci/0000:06:00.0 name flow_steering_mode value "smfs" cmode runtime
60 - Read device flow steering mode::
62 $ devlink dev param show pci/0000:06:00.0 name flow_steering_mode
64 name flow_steering_mode type driver-specific
66 cmode runtime value smfs
68 enable_roce: RoCE enablement state
69 ----------------------------------
70 If the device supports RoCE disablement, RoCE enablement state controls device
71 support for RoCE capability. Otherwise, the control occurs in the driver stack.
72 When RoCE is disabled at the driver level, only raw ethernet QPs are supported.
74 To change RoCE enablement state, a user must change the driverinit cmode value
75 and run devlink reload.
77 User command examples:
81 $ devlink dev param set pci/0000:06:00.0 name enable_roce value false cmode driverinit
82 $ devlink dev reload pci/0000:06:00.0
84 - Read RoCE enablement state::
86 $ devlink dev param show pci/0000:06:00.0 name enable_roce
88 name enable_roce type generic
90 cmode driverinit value true
92 esw_port_metadata: Eswitch port metadata state
93 ----------------------------------------------
94 When applicable, disabling eswitch metadata can increase packet rate
95 up to 20% depending on the use case and packet sizes.
97 Eswitch port metadata state controls whether to internally tag packets with
98 metadata. Metadata tagging must be enabled for multi-port RoCE, failover
99 between representors and stacked devices.
100 By default metadata is enabled on the supported devices in E-switch.
101 Metadata is applicable only for E-switch in switchdev mode and
102 users may disable it when NONE of the below use cases will be in use:
104 1. HCA is in Dual/multi-port RoCE mode.
105 2. VF/SF representor bonding (Usually used for Live migration)
108 When metadata is disabled, the above use cases will fail to initialize if
109 users try to enable them.
111 - Show eswitch port metadata::
113 $ devlink dev param show pci/0000:06:00.0 name esw_port_metadata
115 name esw_port_metadata type driver-specific
117 cmode runtime value true
119 - Disable eswitch port metadata::
121 $ devlink dev param set pci/0000:06:00.0 name esw_port_metadata value false cmode runtime
123 - Change eswitch mode to switchdev mode where after choosing the metadata value::
125 $ devlink dev eswitch set pci/0000:06:00.0 mode switchdev
127 hairpin_num_queues: Number of hairpin queues
128 --------------------------------------------
129 We refer to a TC NIC rule that involves forwarding as "hairpin".
131 Hairpin queues are mlx5 hardware specific implementation for hardware
132 forwarding of such packets.
134 - Show the number of hairpin queues::
136 $ devlink dev param show pci/0000:06:00.0 name hairpin_num_queues
138 name hairpin_num_queues type driver-specific
140 cmode driverinit value 2
142 - Change the number of hairpin queues::
144 $ devlink dev param set pci/0000:06:00.0 name hairpin_num_queues value 4 cmode driverinit
146 hairpin_queue_size: Size of the hairpin queues
147 ----------------------------------------------
148 Control the size of the hairpin queues.
150 - Show the size of the hairpin queues::
152 $ devlink dev param show pci/0000:06:00.0 name hairpin_queue_size
154 name hairpin_queue_size type driver-specific
156 cmode driverinit value 1024
158 - Change the size (in packets) of the hairpin queues::
160 $ devlink dev param set pci/0000:06:00.0 name hairpin_queue_size value 512 cmode driverinit
167 The tx reporter is responsible for reporting and recovering of the following two error scenarios:
170 Report on kernel tx timeout detection.
171 Recover by searching lost interrupts.
172 - tx error completion
173 Report on error tx completion.
174 Recover by flushing the tx queue and reset it.
176 tx reporter also support on demand diagnose callback, on which it provides
177 real time information of its send queues status.
179 User commands examples:
181 - Diagnose send queues status::
183 $ devlink health diagnose pci/0000:82:00.0 reporter tx
186 This command has valid output only when interface is up, otherwise the command has empty output.
188 - Show number of tx errors indicated, number of recover flows ended successfully,
189 is autorecover enabled and graceful period from last recover::
191 $ devlink health show pci/0000:82:00.0 reporter tx
195 The rx reporter is responsible for reporting and recovering of the following two error scenarios:
197 - rx queues' initialization (population) timeout
198 Population of rx queues' descriptors on ring initialization is done
199 in napi context via triggering an irq. In case of a failure to get
200 the minimum amount of descriptors, a timeout would occur, and
201 descriptors could be recovered by polling the EQ (Event Queue).
202 - rx completions with errors (reported by HW on interrupt context)
203 Report on rx completion error.
204 Recover (if needed) by flushing the related queue and reset it.
206 rx reporter also supports on demand diagnose callback, on which it
207 provides real time information of its receive queues' status.
209 - Diagnose rx queues' status and corresponding completion queue::
211 $ devlink health diagnose pci/0000:82:00.0 reporter rx
213 NOTE: This command has valid output only when interface is up. Otherwise, the command has empty output.
215 - Show number of rx errors indicated, number of recover flows ended successfully,
216 is autorecover enabled, and graceful period from last recover::
218 $ devlink health show pci/0000:82:00.0 reporter rx
222 The fw reporter implements `diagnose` and `dump` callbacks.
223 It follows symptoms of fw error such as fw syndrome by triggering
224 fw core dump and storing it into the dump buffer.
225 The fw reporter diagnose command can be triggered any time by the user to check
228 User commands examples:
230 - Check fw heath status::
232 $ devlink health diagnose pci/0000:82:00.0 reporter fw
234 - Read FW core dump if already stored or trigger new one::
236 $ devlink health dump show pci/0000:82:00.0 reporter fw
239 This command can run only on the PF which has fw tracer ownership,
240 running it on other PF or any VF will return "Operation not permitted".
244 The fw fatal reporter implements `dump` and `recover` callbacks.
245 It follows fatal errors indications by CR-space dump and recover flow.
246 The CR-space dump uses vsc interface which is valid even if the FW command
247 interface is not functional, which is the case in most FW fatal errors.
248 The recover function runs recover flow which reloads the driver and triggers fw
250 On firmware error, the health buffer is dumped into the dmesg. The log
251 level is derived from the error's severity (given in health buffer).
253 User commands examples:
255 - Run fw recover flow manually::
257 $ devlink health recover pci/0000:82:00.0 reporter fw_fatal
259 - Read FW CR-space dump if already stored or trigger new one::
261 $ devlink health dump show pci/0000:82:00.1 reporter fw_fatal
264 This command can run only on PF.
268 The vnic reporter implements only the `diagnose` callback.
269 It is responsible for querying the vnic diagnostic counters from fw and displaying
272 Description of the vnic counters:
274 - total_q_under_processor_handle
275 number of queues in an error state due to
276 an async error or errored command.
277 - send_queue_priority_update_flow
278 number of QP/SQ priority/SL update events.
280 number of times CQ entered an error state due to an overflow.
282 number of times an EQ mapped to async events was overrun.
283 comp_eq_overrun number of times an EQ mapped to completion events was
285 - quota_exceeded_command
286 number of commands issued and failed due to quota exceeded.
288 number of commands issued and failed dues to any reason other than quota
290 - nic_receive_steering_discard
291 number of packets that completed RX flow
292 steering but were discarded due to a mismatch in flow table.
294 User commands examples:
296 - Diagnose PF/VF vnic counters::
298 $ devlink health diagnose pci/0000:82:00.1 reporter vnic
300 - Diagnose representor vnic counters (performed by supplying devlink port of the
301 representor, which can be obtained via devlink port command)::
303 $ devlink health diagnose pci/0000:82:00.1/65537 reporter vnic
306 This command can run over all interfaces such as PF/VF and representor ports.