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:
43 1. 'dmfs' - Device managed flow steering.
44 2. 'smfs' - Software/Driver managed flow steering.
46 In DMFS mode, the HW steering entities are created and managed through the
48 In SMFS mode, the HW steering entities are created and managed though by
49 the driver directly into hardware without firmware intervention.
51 SMFS mode is faster and provides better rule insertion rate compared to default DMFS mode.
53 User command examples:
55 - Set SMFS flow steering mode::
57 $ devlink dev param set pci/0000:06:00.0 name flow_steering_mode value "smfs" cmode runtime
59 - Read device flow steering mode::
61 $ devlink dev param show pci/0000:06:00.0 name flow_steering_mode
63 name flow_steering_mode type driver-specific
65 cmode runtime value smfs
67 enable_roce: RoCE enablement state
68 ----------------------------------
69 If the device supports RoCE disablement, RoCE enablement state controls device
70 support for RoCE capability. Otherwise, the control occurs in the driver stack.
71 When RoCE is disabled at the driver level, only raw ethernet QPs are supported.
73 To change RoCE enablement state, a user must change the driverinit cmode value
74 and run devlink reload.
76 User command examples:
80 $ devlink dev param set pci/0000:06:00.0 name enable_roce value false cmode driverinit
81 $ devlink dev reload pci/0000:06:00.0
83 - Read RoCE enablement state::
85 $ devlink dev param show pci/0000:06:00.0 name enable_roce
87 name enable_roce type generic
89 cmode driverinit value true
91 esw_port_metadata: Eswitch port metadata state
92 ----------------------------------------------
93 When applicable, disabling eswitch metadata can increase packet rate
94 up to 20% depending on the use case and packet sizes.
96 Eswitch port metadata state controls whether to internally tag packets with
97 metadata. Metadata tagging must be enabled for multi-port RoCE, failover
98 between representors and stacked devices.
99 By default metadata is enabled on the supported devices in E-switch.
100 Metadata is applicable only for E-switch in switchdev mode and
101 users may disable it when NONE of the below use cases will be in use:
102 1. HCA is in Dual/multi-port RoCE mode.
103 2. VF/SF representor bonding (Usually used for Live migration)
106 When metadata is disabled, the above use cases will fail to initialize if
107 users try to enable them.
109 - Show eswitch port metadata::
111 $ devlink dev param show pci/0000:06:00.0 name esw_port_metadata
113 name esw_port_metadata type driver-specific
115 cmode runtime value true
117 - Disable eswitch port metadata::
119 $ devlink dev param set pci/0000:06:00.0 name esw_port_metadata value false cmode runtime
121 - Change eswitch mode to switchdev mode where after choosing the metadata value::
123 $ devlink dev eswitch set pci/0000:06:00.0 mode switchdev
125 hairpin_num_queues: Number of hairpin queues
126 --------------------------------------------
127 We refer to a TC NIC rule that involves forwarding as "hairpin".
129 Hairpin queues are mlx5 hardware specific implementation for hardware
130 forwarding of such packets.
132 - Show the number of hairpin queues::
134 $ devlink dev param show pci/0000:06:00.0 name hairpin_num_queues
136 name hairpin_num_queues type driver-specific
138 cmode driverinit value 2
140 - Change the number of hairpin queues::
142 $ devlink dev param set pci/0000:06:00.0 name hairpin_num_queues value 4 cmode driverinit
144 hairpin_queue_size: Size of the hairpin queues
145 ----------------------------------------------
146 Control the size of the hairpin queues.
148 - Show the size of the hairpin queues::
150 $ devlink dev param show pci/0000:06:00.0 name hairpin_queue_size
152 name hairpin_queue_size type driver-specific
154 cmode driverinit value 1024
156 - Change the size (in packets) of the hairpin queues::
158 $ devlink dev param set pci/0000:06:00.0 name hairpin_queue_size value 512 cmode driverinit
165 The tx reporter is responsible for reporting and recovering of the following two error scenarios:
168 Report on kernel tx timeout detection.
169 Recover by searching lost interrupts.
170 - tx error completion
171 Report on error tx completion.
172 Recover by flushing the tx queue and reset it.
174 tx reporter also support on demand diagnose callback, on which it provides
175 real time information of its send queues status.
177 User commands examples:
179 - Diagnose send queues status::
181 $ devlink health diagnose pci/0000:82:00.0 reporter tx
183 NOTE: This command has valid output only when interface is up, otherwise the command has empty output.
185 - Show number of tx errors indicated, number of recover flows ended successfully,
186 is autorecover enabled and graceful period from last recover::
188 $ devlink health show pci/0000:82:00.0 reporter tx
192 The rx reporter is responsible for reporting and recovering of the following two error scenarios:
194 - rx queues' initialization (population) timeout
195 Population of rx queues' descriptors on ring initialization is done
196 in napi context via triggering an irq. In case of a failure to get
197 the minimum amount of descriptors, a timeout would occur, and
198 descriptors could be recovered by polling the EQ (Event Queue).
199 - rx completions with errors (reported by HW on interrupt context)
200 Report on rx completion error.
201 Recover (if needed) by flushing the related queue and reset it.
203 rx reporter also supports on demand diagnose callback, on which it
204 provides real time information of its receive queues' status.
206 - Diagnose rx queues' status and corresponding completion queue::
208 $ devlink health diagnose pci/0000:82:00.0 reporter rx
210 NOTE: This command has valid output only when interface is up. Otherwise, the command has empty output.
212 - Show number of rx errors indicated, number of recover flows ended successfully,
213 is autorecover enabled, and graceful period from last recover::
215 $ devlink health show pci/0000:82:00.0 reporter rx
219 The fw reporter implements `diagnose` and `dump` callbacks.
220 It follows symptoms of fw error such as fw syndrome by triggering
221 fw core dump and storing it into the dump buffer.
222 The fw reporter diagnose command can be triggered any time by the user to check
225 User commands examples:
227 - Check fw heath status::
229 $ devlink health diagnose pci/0000:82:00.0 reporter fw
231 - Read FW core dump if already stored or trigger new one::
233 $ devlink health dump show pci/0000:82:00.0 reporter fw
235 NOTE: This command can run only on the PF which has fw tracer ownership,
236 running it on other PF or any VF will return "Operation not permitted".
240 The fw fatal reporter implements `dump` and `recover` callbacks.
241 It follows fatal errors indications by CR-space dump and recover flow.
242 The CR-space dump uses vsc interface which is valid even if the FW command
243 interface is not functional, which is the case in most FW fatal errors.
244 The recover function runs recover flow which reloads the driver and triggers fw
246 On firmware error, the health buffer is dumped into the dmesg. The log
247 level is derived from the error's severity (given in health buffer).
249 User commands examples:
251 - Run fw recover flow manually::
253 $ devlink health recover pci/0000:82:00.0 reporter fw_fatal
255 - Read FW CR-space dump if already stored or trigger new one::
257 $ devlink health dump show pci/0000:82:00.1 reporter fw_fatal
259 NOTE: This command can run only on PF.
263 The vnic reporter implements only the `diagnose` callback.
264 It is responsible for querying the vnic diagnostic counters from fw and displaying
267 Description of the vnic counters:
268 total_q_under_processor_handle: number of queues in an error state due to
269 an async error or errored command.
270 send_queue_priority_update_flow: number of QP/SQ priority/SL update
272 cq_overrun: number of times CQ entered an error state due to an
274 async_eq_overrun: number of times an EQ mapped to async events was
276 comp_eq_overrun: number of times an EQ mapped to completion events was
278 quota_exceeded_command: number of commands issued and failed due to quota
280 invalid_command: number of commands issued and failed dues to any reason
281 other than quota exceeded.
282 nic_receive_steering_discard: number of packets that completed RX flow
283 steering but were discarded due to a mismatch in flow table.
285 User commands examples:
286 - Diagnose PF/VF vnic counters
287 $ devlink health diagnose pci/0000:82:00.1 reporter vnic
288 - Diagnose representor vnic counters (performed by supplying devlink port of the
289 representor, which can be obtained via devlink port command)
290 $ devlink health diagnose pci/0000:82:00.1/65537 reporter vnic
292 NOTE: This command can run over all interfaces such as PF/VF and representor ports.