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