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 } ]
30
31 devlink dev info [ DEV ]
32
33 devlink dev flash DEV file PATH [ target ID ]
34
35
37 devlink dev show - display devlink device attributes
38 DEV - specifies the devlink device to show. If this argument is omit‐
39 ted all devices are listed.
40
41 Format is:
42 BUS_NAME/BUS_ADDRESS
43
44
45 devlink dev eswitch show - display devlink device eswitch attributes
46 devlink dev eswitch set - sets devlink device eswitch attributes
47 mode { legacy | switchdev }
48 Set eswitch mode
49
50 legacy - Legacy SRIOV
51
52 switchdev - SRIOV switchdev offloads
53
54
55 inline-mode { none | link | network | transport }
56 Some HWs need the VF driver to put part of the packet headers on
57 the TX descriptor so the e-switch can do proper matching and
58 steering.
59
60 none - None
61
62 link - L2 mode
63
64 network - L3 mode
65
66 transport - L4 mode
67
68
69 encap-mode { none | basic }
70 Set eswitch encapsulation support
71
72 none - Disable encapsulation support
73
74 basic - Enable encapsulation support
75
76
77 devlink dev param set - set new value to devlink device configuration
78 parameter
79 name PARAMETER
80 Specify parameter name to set.
81
82
83 value VALUE
84 New value to set.
85
86
87 cmode { runtime | driverinit | permanent }
88 Configuration mode in which the new value is set.
89
90 runtime - Set new value while driver is running. This configura‐
91 tion mode doesn't require any reset to apply the new value.
92
93 driverinit - Set new value which will be applied during driver
94 initialization. This configuration mode requires restart driver
95 by devlink reload command to apply the new value.
96
97 permanent - New value is written to device's non-volatile mem‐
98 ory. This configuration mode requires hard reset to apply the
99 new value.
100
101
102 devlink dev param show - display devlink device supported configuration
103 parameters attributes
104 name PARAMETER Specify parameter name to show. If this argument is
105 omitted all parameters supported by devlink devices are listed.
106
107
108 devlink dev reload - perform hot reload of the driver.
109 DEV - Specifies the devlink device to reload.
110
111 netns { PID | NAME | ID } - Specifies the network namespace to reload
112 into, either by pid, name or id.
113
114
115 devlink dev info - display device information.
116 Display device information provided by the driver. This command can be
117 used to query versions of the hardware components or device components
118 which can't be updated ( fixed ) as well as device firmware which can
119 be updated. For firmware components running displays the versions of
120 firmware currently loaded into the device, while stored reports the
121 versions in device's flash. Running and stored versions may differ
122 after flash has been updated, but before reboot.
123
124
125 DEV - specifies the devlink device to show. If this argument is omit‐
126 ted all devices are listed.
127
128
129 devlink dev flash - write device's non-volatile memory.
130 DEV - specifies the devlink device to write to.
131
132 file PATH - Path to the file which will be written into device's flash.
133 The path needs to be relative to one of the directories searched by the
134 kernel firmware loaded, such as /lib/firmware.
135
136 component NAME - If device stores multiple firmware images in non-
137 volatile memory, this parameter may be used to indicate which firmware
138 image should be written. The value of NAME should match the component
139 names from devlink dev info and may be driver-dependent.
140
141
143 devlink dev show
144 Shows the state of all devlink devices on the system.
145
146 devlink dev show pci/0000:01:00.0
147 Shows the state of specified devlink device.
148
149 devlink dev eswitch show pci/0000:01:00.0
150 Shows the eswitch mode of specified devlink device.
151
152 devlink dev eswitch set pci/0000:01:00.0 mode switchdev
153 Sets the eswitch mode of specified devlink device to switchdev.
154
155 devlink dev param show pci/0000:01:00.0 name max_macs
156 Shows the parameter max_macs attributes.
157
158 devlink dev param set pci/0000:01:00.0 name internal_error_reset value
159 true cmode runtime
160 Sets the parameter internal_error_reset of specified devlink device
161 to true.
162
163 devlink dev reload pci/0000:01:00.0
164 Performs hot reload of specified devlink device.
165
166 devlink dev flash pci/0000:01:00.0 file firmware.bin
167 Flashes the specified devlink device with provided firmware file
168 name. If the driver supports it, user gets updates about the flash
169 status. For example:
170 Preparing to flash
171 Flashing 100%
172 Flashing done
173
174
176 devlink(8), devlink-port(8), devlink-sb(8), devlink-monitor(8),
177
178
180 Jiri Pirko <jiri@mellanox.com>
181
182
183
184iproute2 14 Mar 2016 DEVLINK-DEV(8)