1DEVLINK-DEV(8) Linux DEVLINK-DEV(8)
2
3
4
6 devlink-dev - devlink device configuration
7
9 devlink [ OPTIONS ] dev { COMMAND | help }
10
11
12 OPTIONS := { -V[ersion] | -n[no-nice-names] }
13
14 devlink dev show [ DEV ]
15
16 devlink dev help
17
18 devlink dev eswitch set DEV [ mode { legacy | switchdev } ] [ inline-
19 mode { none | link | network | transport } ] [ encap-mode {
20 none | basic } ]
21
22 devlink dev eswitch show DEV
23
24 devlink dev param set DEV name PARAMETER value VALUE cmode { runtime |
25 driverinit | permanent }
26
27 devlink dev param show [ DEV name PARAMETER ]
28
29 devlink dev reload DEV [ netns { PID | NAME | ID } ] [ action {
30 driver_reinit | fw_activate } ] [ limit no_reset ]
31
32 devlink dev info [ DEV ]
33
34 devlink dev flash DEV file PATH [ target ID ]
35
36 devlink dev selftests show [ DEV ]
37
38 devlink dev selftests run DEV [ id ID... ]
39
40
42 devlink dev show - display devlink device attributes
43 DEV - specifies the devlink device to show. If this argument is omit‐
44 ted all devices are listed.
45
46 Format is:
47 BUS_NAME/BUS_ADDRESS
48
49
50 devlink dev eswitch show - display devlink device eswitch attributes
51 devlink dev eswitch set - sets devlink device eswitch attributes
52 mode { legacy | switchdev }
53 Set eswitch mode
54
55 legacy - Legacy SRIOV
56
57 switchdev - SRIOV switchdev offloads
58
59
60 inline-mode { none | link | network | transport }
61 Some HWs need the VF driver to put part of the packet headers on
62 the TX descriptor so the e-switch can do proper matching and
63 steering.
64
65 none - None
66
67 link - L2 mode
68
69 network - L3 mode
70
71 transport - L4 mode
72
73
74 encap-mode { none | basic }
75 Set eswitch encapsulation support
76
77 none - Disable encapsulation support
78
79 basic - Enable encapsulation support
80
81
82 devlink dev param set - set new value to devlink device configuration pa‐
83 rameter
84 name PARAMETER
85 Specify parameter name to set.
86
87
88 value VALUE
89 New value to set.
90
91
92 cmode { runtime | driverinit | permanent }
93 Configuration mode in which the new value is set.
94
95 runtime - Set new value while driver is running. This configura‐
96 tion mode doesn't require any reset to apply the new value.
97
98 driverinit - Set new value which will be applied during driver
99 initialization. This configuration mode requires restart driver
100 by devlink reload command to apply the new value.
101
102 permanent - New value is written to device's non-volatile mem‐
103 ory. This configuration mode requires hard reset to apply the
104 new value.
105
106
107 devlink dev param show - display devlink device supported configuration pa‐
108 rameters attributes
109 name PARAMETER Specify parameter name to show. If this argument is
110 omitted all parameters supported by devlink devices are listed.
111
112
113 devlink dev reload - perform hot reload of the driver.
114 DEV - Specifies the devlink device to reload.
115
116 netns { PID | NAME | ID } - Specifies the network namespace to reload
117 into, either by pid, name or id.
118
119 action { driver_reinit | fw_activate } - Specifies the reload action
120 required. If this argument is omitted driver_reinit action will be
121 used. Note that even though user asks for a specific action, the
122 driver implementation might require to perform another action alongside
123 with it. For example, some driver do not support driver reinitializa‐
124 tion being performed without fw activation. Therefore, the devlink
125 reload command returns the list of actions which were actrually per‐
126 formed.
127
128 driver_reinit - Driver entities re-initialization, applying devlink-
129 param and devlink-resource values.
130
131 fw_activate - Activates new firmware if such image is stored and pend‐
132 ing activation. If no limitation specified this action may involve
133 firmware reset. If no new image pending this action will reload current
134 firmware image.
135
136 limit no_reset - Specifies limitation on reload action. If this argu‐
137 ment is omitted limit is unspecified and the reload action is not lim‐
138 ited. In such case driver implementation may include reset or downtime
139 as needed to perform the actions.
140
141 no_reset - No reset allowed, no down time allowed, no link flap and no
142 configuration is lost.
143
144
145 devlink dev info - display device information.
146 Display device information provided by the driver. This command can be
147 used to query versions of the hardware components or device components
148 which can't be updated ( fixed ) as well as device firmware which can
149 be updated. For firmware components running displays the versions of
150 firmware currently loaded into the device, while stored reports the
151 versions in device's flash. Running and stored versions may differ af‐
152 ter flash has been updated, but before reboot.
153
154
155 DEV - specifies the devlink device to show. If this argument is omit‐
156 ted all devices are listed.
157
158
159 devlink dev flash - write device's non-volatile memory.
160 DEV - specifies the devlink device to write to.
161
162 file PATH - Path to the file which will be written into device's flash.
163 The path needs to be relative to one of the directories searched by the
164 kernel firmware loader, such as /lib/firmware.
165
166 component NAME - If device stores multiple firmware images in non-
167 volatile memory, this parameter may be used to indicate which firmware
168 image should be written. The value of NAME should match the component
169 names from devlink dev info and may be driver-dependent.
170
171
172 devlink dev selftests show - shows supported selftests on devlink device.
173 DEV - specifies the devlink device. If this argument is omitted all
174 selftests for devlink devices are listed.
175
176
177 devlink dev selftests run - runs selftests on devlink device.
178 DEV - specifies the devlink device to execute selftests.
179
180 id ID... - The value of ID(s) should match the selftests shown in de‐
181 vlink dev selftests show to execute selftests on the devlink device.
182 If this argument is omitted all selftests supported by devlink devices
183 are executed.
184
185
187 devlink dev show
188 Shows the state of all devlink devices on the system.
189
190 devlink dev show pci/0000:01:00.0
191 Shows the state of specified devlink device.
192
193 devlink dev eswitch show pci/0000:01:00.0
194 Shows the eswitch mode of specified devlink device.
195
196 devlink dev eswitch set pci/0000:01:00.0 mode switchdev
197 Sets the eswitch mode of specified devlink device to switchdev.
198
199 devlink dev param show pci/0000:01:00.0 name max_macs
200 Shows the parameter max_macs attributes.
201
202 devlink dev param set pci/0000:01:00.0 name internal_error_reset value
203 true cmode runtime
204 Sets the parameter internal_error_reset of specified devlink device
205 to true.
206
207 devlink dev reload pci/0000:01:00.0
208 Performs hot reload of specified devlink device.
209
210 devlink dev flash pci/0000:01:00.0 file firmware.bin
211 Flashes the specified devlink device with provided firmware file
212 name. If the driver supports it, user gets updates about the flash
213 status. For example:
214 Preparing to flash
215 Flashing 100%
216 Flashing done
217
218 devlink dev selftests show pci/0000:01:00.0
219 Shows the supported selftests by the devlink device.
220
221 devlink dev selftests run pci/0000:01:00.0 id flash
222 Perform a flash test on the devlink device.
223
224
226 devlink(8), devlink-port(8), devlink-sb(8), devlink-monitor(8),
227
228
230 Jiri Pirko <jiri@mellanox.com>
231
232
233
234iproute2 14 Mar 2016 DEVLINK-DEV(8)