| 1 |
.TH DEVLINK\-DEV 8 "14 Mar 2016" "iproute2" "Linux" |
| 2 |
.SH NAME |
| 3 |
devlink-dev \- devlink device configuration |
| 4 |
.SH SYNOPSIS |
| 5 |
.sp |
| 6 |
.ad l |
| 7 |
.in +8 |
| 8 |
.ti -8 |
| 9 |
.B devlink |
| 10 |
.RI "[ " OPTIONS " ]" |
| 11 |
.B dev |
| 12 |
.RI " { " COMMAND " | " |
| 13 |
.BR help " }" |
| 14 |
.sp |
| 15 |
|
| 16 |
.ti -8 |
| 17 |
.IR OPTIONS " := { " |
| 18 |
\fB\-V\fR[\fIersion\fR] | |
| 19 |
\fB\-n\fR[\fIno-nice-names\fR] } |
| 20 |
|
| 21 |
.ti -8 |
| 22 |
.B devlink dev show |
| 23 |
.RI "[ " DEV " ]" |
| 24 |
|
| 25 |
.ti -8 |
| 26 |
.B devlink dev help |
| 27 |
|
| 28 |
.ti -8 |
| 29 |
.B devlink dev eswitch set |
| 30 |
.I DEV |
| 31 |
[ |
| 32 |
.BR mode " { " legacy " | " switchdev " } " |
| 33 |
] [ |
| 34 |
.BR inline-mode " { " none " | " link " | " network " | " transport " } " |
| 35 |
] [ |
| 36 |
.BR encap-mode " { " none " | " basic " } " |
| 37 |
] |
| 38 |
|
| 39 |
.ti -8 |
| 40 |
.B devlink dev eswitch show |
| 41 |
.I DEV |
| 42 |
|
| 43 |
.ti -8 |
| 44 |
.B devlink dev param set |
| 45 |
.I DEV |
| 46 |
.B name |
| 47 |
.I PARAMETER |
| 48 |
[ |
| 49 |
.B value |
| 50 |
.I VALUE |
| 51 |
| |
| 52 |
.B default |
| 53 |
] |
| 54 |
.BR cmode " { " runtime " | " driverinit " | " permanent " } " |
| 55 |
|
| 56 |
.ti -8 |
| 57 |
.B devlink dev param show |
| 58 |
[ |
| 59 |
.I DEV |
| 60 |
.B name |
| 61 |
.I PARAMETER |
| 62 |
] |
| 63 |
|
| 64 |
.ti -8 |
| 65 |
.B devlink dev reload |
| 66 |
.I DEV |
| 67 |
[ |
| 68 |
.B netns |
| 69 |
.RI "{ " PID " | " NAME " | " ID " }" |
| 70 |
] [ |
| 71 |
.BR action " { " driver_reinit " | " fw_activate " }" |
| 72 |
] [ |
| 73 |
.B limit no_reset |
| 74 |
] |
| 75 |
|
| 76 |
.ti -8 |
| 77 |
.B devlink dev info |
| 78 |
[ |
| 79 |
.I DEV |
| 80 |
] |
| 81 |
|
| 82 |
.ti -8 |
| 83 |
.B devlink dev flash |
| 84 |
.I DEV |
| 85 |
.B file |
| 86 |
.I PATH |
| 87 |
[ |
| 88 |
.B target |
| 89 |
.I ID |
| 90 |
] |
| 91 |
|
| 92 |
.ti -8 |
| 93 |
.B devlink dev selftests show |
| 94 |
[ |
| 95 |
.I DEV |
| 96 |
] |
| 97 |
|
| 98 |
.ti -8 |
| 99 |
.B devlink dev selftests run |
| 100 |
.I DEV |
| 101 |
[ |
| 102 |
.B id |
| 103 |
.I ID... |
| 104 |
] |
| 105 |
|
| 106 |
.SH "DESCRIPTION" |
| 107 |
.SS devlink dev show - display devlink device attributes |
| 108 |
|
| 109 |
.PP |
| 110 |
.I "DEV" |
| 111 |
- specifies the devlink device to show. |
| 112 |
If this argument is omitted all devices are listed. |
| 113 |
|
| 114 |
.in +4 |
| 115 |
Format is: |
| 116 |
.in +2 |
| 117 |
BUS_NAME/BUS_ADDRESS |
| 118 |
|
| 119 |
.SS devlink dev eswitch show - display devlink device eswitch attributes |
| 120 |
.SS devlink dev eswitch set - sets devlink device eswitch attributes |
| 121 |
|
| 122 |
.TP |
| 123 |
.BR mode " { " legacy " | " switchdev " } " |
| 124 |
Set eswitch mode |
| 125 |
|
| 126 |
.I legacy |
| 127 |
- Legacy SRIOV |
| 128 |
|
| 129 |
.I switchdev |
| 130 |
- SRIOV switchdev offloads |
| 131 |
|
| 132 |
.TP |
| 133 |
.BR inline-mode " { " none " | " link " | " network " | " transport " } " |
| 134 |
Some hardware devices need the VF driver to put part of the packet headers on the TX descriptor so the e-switch can do proper matching and steering. |
| 135 |
|
| 136 |
.I none |
| 137 |
- None |
| 138 |
|
| 139 |
.I link |
| 140 |
- L2 mode |
| 141 |
|
| 142 |
.I network |
| 143 |
- L3 mode |
| 144 |
|
| 145 |
.I transport |
| 146 |
- L4 mode |
| 147 |
|
| 148 |
.TP |
| 149 |
.BR encap-mode " { " none " | " basic " } " |
| 150 |
Set eswitch encapsulation support |
| 151 |
|
| 152 |
.I none |
| 153 |
- Disable encapsulation support |
| 154 |
|
| 155 |
.I basic |
| 156 |
- Enable encapsulation support |
| 157 |
|
| 158 |
.SS devlink dev param set - set new value to devlink device configuration parameter |
| 159 |
|
| 160 |
.TP |
| 161 |
.BI name " PARAMETER" |
| 162 |
Specify parameter name to set. |
| 163 |
|
| 164 |
.TP |
| 165 |
.BI value " VALUE" |
| 166 |
New value to set. Mutually exclusive with |
| 167 |
.BR default . |
| 168 |
|
| 169 |
.TP |
| 170 |
.B default |
| 171 |
Restore parameter to its default value. Mutually exclusive with |
| 172 |
.BR value . |
| 173 |
|
| 174 |
.TP |
| 175 |
.BR cmode " { " runtime " | " driverinit " | " permanent " } " |
| 176 |
Configuration mode in which the new value is set. |
| 177 |
|
| 178 |
.I runtime |
| 179 |
- Set new value while driver is running. This configuration mode doesn't require any reset to apply the new value. |
| 180 |
|
| 181 |
.I driverinit |
| 182 |
- Set new value which will be applied during driver initialization. This configuration mode requires restarting the driver by devlink reload command to apply the new value. |
| 183 |
|
| 184 |
.I permanent |
| 185 |
- New value is written to device's non-volatile memory. This configuration mode requires hard reset to apply the new value. |
| 186 |
|
| 187 |
.SS devlink dev param show - display devlink device supported configuration parameters attributes |
| 188 |
|
| 189 |
.TP |
| 190 |
.B name |
| 191 |
.I PARAMETER |
| 192 |
Specify parameter name to show. |
| 193 |
If this argument is omitted all parameters supported by devlink devices are listed. |
| 194 |
When the kernel provides a default value for a parameter, it will be automatically displayed |
| 195 |
in the output alongside the current value. |
| 196 |
|
| 197 |
.SS devlink dev reload - perform hot reload of the driver. |
| 198 |
|
| 199 |
.PP |
| 200 |
.I "DEV" |
| 201 |
- Specifies the devlink device to reload. |
| 202 |
|
| 203 |
.B netns |
| 204 |
.RI { " PID " | " NAME " | " ID " } |
| 205 |
- Specifies the network namespace to reload into, either by pid, name or id. |
| 206 |
|
| 207 |
.BR action " { " driver_reinit " | " fw_activate " }" |
| 208 |
- Specifies the reload action required. |
| 209 |
If this argument is omitted |
| 210 |
.I driver_reinit |
| 211 |
action will be used. |
| 212 |
Note that even though user asks for a specific action, the driver implementation |
| 213 |
might require to perform another action alongside with it. For example, some |
| 214 |
drivers do not support driver reinitialization being performed without fw |
| 215 |
activation. Therefore, the devlink reload command returns the list of actions |
| 216 |
which were actually performed. |
| 217 |
|
| 218 |
.I driver_reinit |
| 219 |
- Driver entities re-initialization, applying devlink-param and |
| 220 |
devlink-resource values. |
| 221 |
|
| 222 |
.I fw_activate |
| 223 |
- Activates new firmware if such image is stored and pending activation. If no |
| 224 |
limitation specified this action may involve firmware reset. If no new image |
| 225 |
pending this action will reload current firmware image. |
| 226 |
|
| 227 |
.B limit no_reset |
| 228 |
- Specifies limitation on reload action. |
| 229 |
If this argument is omitted limit is unspecified and the reload action is not |
| 230 |
limited. In such case driver implementation may include reset or downtime as |
| 231 |
needed to perform the actions. |
| 232 |
|
| 233 |
.I no_reset |
| 234 |
- No reset allowed, no down time allowed, no link flap and no configuration is |
| 235 |
lost. |
| 236 |
|
| 237 |
.SS devlink dev info - display device information. |
| 238 |
Display device information provided by the driver. This command can be used |
| 239 |
to query versions of the hardware components or device components which |
| 240 |
can't be updated ( |
| 241 |
.I fixed |
| 242 |
) as well as device firmware which can be updated. For firmware components |
| 243 |
.I running |
| 244 |
displays the versions of firmware currently loaded into the device, while |
| 245 |
.I stored |
| 246 |
reports the versions in device's flash. |
| 247 |
.I Running |
| 248 |
and |
| 249 |
.I stored |
| 250 |
versions may differ after flash has been updated, but before reboot. |
| 251 |
|
| 252 |
.PP |
| 253 |
.I "DEV" |
| 254 |
- specifies the devlink device to show. |
| 255 |
If this argument is omitted all devices are listed. |
| 256 |
|
| 257 |
.SS devlink dev flash - write device's non-volatile memory. |
| 258 |
|
| 259 |
.PP |
| 260 |
.I "DEV" |
| 261 |
- specifies the devlink device to write to. |
| 262 |
|
| 263 |
.B file |
| 264 |
.I PATH |
| 265 |
- Path to the file which will be written into device's flash. The path needs |
| 266 |
to be relative to one of the directories searched by the kernel firmware loader, |
| 267 |
such as /lib/firmware. |
| 268 |
|
| 269 |
.B component |
| 270 |
.I NAME |
| 271 |
- If device stores multiple firmware images in non-volatile memory, this |
| 272 |
parameter may be used to indicate which firmware image should be written. |
| 273 |
The value of |
| 274 |
.I NAME |
| 275 |
should match the component names from |
| 276 |
.B "devlink dev info" |
| 277 |
and may be driver-dependent. |
| 278 |
|
| 279 |
.SS devlink dev selftests show - shows supported selftests on devlink device. |
| 280 |
|
| 281 |
.PP |
| 282 |
.I "DEV" |
| 283 |
- specifies the devlink device. |
| 284 |
If this argument is omitted all selftests for devlink devices are listed. |
| 285 |
|
| 286 |
.SS devlink dev selftests run - runs selftests on devlink device. |
| 287 |
|
| 288 |
.PP |
| 289 |
.I "DEV" |
| 290 |
- specifies the devlink device to execute selftests. |
| 291 |
|
| 292 |
.B id |
| 293 |
.I ID... |
| 294 |
- The value of |
| 295 |
.I ID(s) |
| 296 |
should match the selftests shown in |
| 297 |
.B "devlink dev selftests show" |
| 298 |
to execute selftests on the devlink device. |
| 299 |
If this argument is omitted all selftests supported by devlink devices are executed. |
| 300 |
|
| 301 |
.SH "EXAMPLES" |
| 302 |
.PP |
| 303 |
devlink dev show |
| 304 |
.RS 4 |
| 305 |
Shows the state of all devlink devices on the system. |
| 306 |
.RE |
| 307 |
.PP |
| 308 |
devlink dev show pci/0000:01:00.0 |
| 309 |
.RS 4 |
| 310 |
Shows the state of specified devlink device. |
| 311 |
.RE |
| 312 |
.PP |
| 313 |
devlink dev eswitch show pci/0000:01:00.0 |
| 314 |
.RS 4 |
| 315 |
Shows the eswitch mode of specified devlink device. |
| 316 |
.RE |
| 317 |
.PP |
| 318 |
devlink dev eswitch set pci/0000:01:00.0 mode switchdev |
| 319 |
.RS 4 |
| 320 |
Sets the eswitch mode of specified devlink device to switchdev. |
| 321 |
.RE |
| 322 |
.PP |
| 323 |
devlink dev param show pci/0000:01:00.0 name max_macs |
| 324 |
.RS 4 |
| 325 |
Shows the parameter max_macs attributes. If a default value exists, it will be displayed alongside the current value. |
| 326 |
.RE |
| 327 |
.PP |
| 328 |
devlink dev param set pci/0000:01:00.0 name internal_error_reset value true cmode runtime |
| 329 |
.RS 4 |
| 330 |
Sets the parameter internal_error_reset of specified devlink device to true. |
| 331 |
.RE |
| 332 |
.PP |
| 333 |
devlink dev param set pci/0000:01:00.0 name internal_error_reset default cmode runtime |
| 334 |
.RS 4 |
| 335 |
Restores the parameter internal_error_reset of specified devlink device to its default value. |
| 336 |
.RE |
| 337 |
.PP |
| 338 |
devlink dev reload pci/0000:01:00.0 |
| 339 |
.RS 4 |
| 340 |
Performs hot reload of specified devlink device. |
| 341 |
.RE |
| 342 |
.PP |
| 343 |
devlink dev flash pci/0000:01:00.0 file firmware.bin |
| 344 |
.RS 4 |
| 345 |
Flashes the specified devlink device with provided firmware file name. If the driver supports it, user gets updates about the flash status. For example: |
| 346 |
.br |
| 347 |
Preparing to flash |
| 348 |
.br |
| 349 |
Flashing 100% |
| 350 |
.br |
| 351 |
Flashing done |
| 352 |
.RE |
| 353 |
.PP |
| 354 |
devlink dev selftests show pci/0000:01:00.0 |
| 355 |
.RS 4 |
| 356 |
Shows the supported selftests by the devlink device. |
| 357 |
.RE |
| 358 |
.PP |
| 359 |
devlink dev selftests run pci/0000:01:00.0 id flash |
| 360 |
.RS 4 |
| 361 |
Perform a flash test on the devlink device. |
| 362 |
.RE |
| 363 |
|
| 364 |
.SH SEE ALSO |
| 365 |
.BR devlink (8), |
| 366 |
.BR devlink-port (8), |
| 367 |
.BR devlink-sb (8), |
| 368 |
.BR devlink-monitor (8), |
| 369 |
.br |
| 370 |
|
| 371 |
.SH AUTHOR |
| 372 |
Jiri Pirko <[email protected]> |