1DEVLINK-PORT(8) Linux DEVLINK-PORT(8)
2
3
4
6 devlink-port - devlink port configuration
7
9 devlink [ OPTIONS ] port { COMMAND | help }
10
11
12 OPTIONS := { -V[ersion] | -n[no-nice-names] }
13
14 devlink port set DEV/PORT_INDEX [ type { eth | ib | auto } ]
15
16 devlink port split DEV/PORT_INDEX count COUNT
17
18 devlink port unsplit DEV/PORT_INDEX
19
20 devlink port show [ DEV/PORT_INDEX ]
21
22 devlink port health { show | recover | diagnose | dump | set }
23
24 devlink port add { DEV | DEV/PORT_INDEX } [ flavour FLAVOUR ] [ pfnum
25 PFNUMBER ] [ sfnum SFNUMBER ] [ controller CNUM ]
26
27 devlink port del DEV/PORT_INDEX
28
29 devlink port function set DEV/PORT_INDEX [ hw_addr ADDR ] [ state { ac‐
30 tive | inactive } ] [ roce { enable | disable } ] [ migratable
31 { enable | disable } ]
32
33 devlink port function rate { show | set | add | del | help }
34
35 devlink dev param set DEV/PORT_INDEX name PARAMETER value VALUE cmode {
36 runtime | driverinit | permanent }
37
38 devlink dev param show [ DEV/PORT_INDEX name PARAMETER ]
39
40 devlink port help
41
42
44 devlink port set - change devlink port attributes
45 DEV/PORT_INDEX - specifies the devlink port to operate on.
46
47 Format is:
48 BUS_NAME/BUS_ADDRESS/PORT_INDEX
49
50
51 type { eth | ib | auto }
52 set port type
53
54 eth - Ethernet
55
56 ib - Infiniband
57
58 auto - autoselect
59
60
61 devlink port split - split devlink port into more
62 DEV/PORT_INDEX - specifies the devlink port to operate on.
63
64
65 count COUNT
66 number of ports to split to.
67
68
69 devlink port unsplit - unsplit previously split devlink port
70 Could be performed on any split port of the same split group.
71
72
73 DEV/PORT_INDEX - specifies the devlink port to operate on.
74
75
76 devlink port show - display devlink port attributes
77 DEV/PORT_INDEX - specifies the devlink port to show. If this argument
78 is omitted all ports are listed.
79
80
81 devlink port health - devlink health reporting and recovery
82 Is an alias for devlink-health(8).
83
84
85 devlink port add - add a devlink port
86 DEV - specifies the devlink device to operate on. or
87
88
89 DEV/PORT_INDEX - specifies the devlink port index to use for the re‐
90 quested new port. This is optional. When omitted, driver allocates
91 unique port index.
92
93
94 flavour { pcipf | pcisf }
95 set port flavour
96
97 pcipf - PCI PF port
98
99 pcisf - PCI SF port
100
101
102 pfnum PFNUMBER
103 Specifies PCI pfnumber to use on which a SF device to create
104
105
106 sfnum SFNUMBER
107 Specifies sfnumber to assign to the device of the SF. This
108 field is optional for those devices which supports auto assign‐
109 ment of the SF number.
110
111
112 controller CNUM
113 Specifies controller number for which the SF port is created.
114 This field is optional. It is used only when SF port is created
115 for the external controller.
116
117
118 devlink port function set - Set the port function attribute(s).
119 DEV/PORT_INDEX - specifies the devlink port to operate on.
120
121
122 hw_addr ADDR
123 Hardware address of the function to set. This is a Ethernet MAC
124 address when port type is Ethernet.
125
126
127 state { active | inactive }
128 New state of the function to change to.
129
130 active - Once configuration of the function is done, activate
131 the function.
132
133 inactive - To inactivate the function and its device(s), set to
134 inactive.
135
136
137 roce { enable | disable }
138 Set the RoCE capability of the function.
139
140
141 migratable { enable | disable }
142 Set the migratable capability of the function.
143
144
145 devlink port del - delete a devlink port
146 DEV/PORT_INDEX - specifies the devlink port to delete.
147
148
149 devlink port param set - set new value to devlink port configuration param‐
150 eter
151 DEV/PORT_INDEX - specifies the devlink port to operate on.
152
153
154 name PARAMETER
155 Specify parameter name to set.
156
157
158 value VALUE
159 New value to set.
160
161
162 cmode { runtime | driverinit | permanent }
163 Configuration mode in which the new value is set.
164
165 runtime - Set new value while driver is running. This configura‐
166 tion mode doesn't require any reset to apply the new value.
167
168 driverinit - Set new value which will be applied during driver
169 initialization. This configuration mode requires restart driver
170 by devlink reload command to apply the new value.
171
172 permanent - New value is written to device's non-volatile mem‐
173 ory. This configuration mode requires hard reset to apply the
174 new value.
175
176
177 devlink port param show - display devlink port supported configuration pa‐
178 rameters attributes
179 DEV/PORT_INDEX - specifies the devlink port to operate on.
180
181 name PARAMETER Specify parameter name to show. If this argument, as
182 well as port index, are omitted - all parameters supported by devlink
183 device ports are listed.
184
185
186 devlink port function rate - manage devlink rate objects
187 Is an alias for devlink-rate(8).
188
189
191 devlink port show
192 Shows the state of all devlink ports on the system.
193
194 devlink port show pci/0000:01:00.0/1
195 Shows the state of specified devlink port.
196
197 devlink port set pci/0000:01:00.0/1 type eth
198 Set type of specified devlink port to Ethernet.
199
200 devlink port split pci/0000:01:00.0/1 count 4
201 Split the specified devlink port into four ports.
202
203 devlink port unsplit pci/0000:01:00.0/1
204 Unplit the specified previously split devlink port.
205
206 devlink port health show
207 Shows status and configuration of all supported reporters regis‐
208 tered on all devlink ports.
209
210 devlink port health show pci/0000:01:00.0/1 reporter tx
211 Shows status and configuration of tx reporter registered on
212 pci/0000:01:00.0/1 devlink port.
213
214 devlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88
215 Add a devlink port of flavour PCI SF on PCI PF having number 0 with
216 SF number 88. To make use of the function an example sequence is
217 to add a port, configure the function attribute and activate the
218 function. Once function usage is completed, inactivate the function
219 and finally delete the port. When there is desire to reuse the port
220 without deletion, it can be reconfigured and activated again when
221 function is in inactive state and function's operational state is
222 detached.
223
224 devlink port del pci/0000:06:00.0/1
225 Delete previously created devlink port. It is recommended to first
226 deactivate the function if the function supports state management.
227
228 devlink port function set pci/0000:01:00.0/1 hw_addr 00:00:00:11:22:33
229 Configure hardware address of the PCI function represented by de‐
230 vlink port. If the port supports change in function state, hard‐
231 ware address must be configured before activating the function.
232
233 devlink port function set pci/0000:01:00.0/1 state active
234 Activate the function. This will initiate the function enumeration
235 and driver loading.
236
237 devlink port function set pci/0000:01:00.0/1 state inactive
238 Deactivate the function. This will initiate the function teardown
239 which results in driver unload and device removal.
240
241 devlink port function set pci/0000:01:00.0/1 roce enable
242 This will enable the RoCE functionality of the function.
243
244 devlink port function set pci/0000:01:00.0/1 migratable enable
245 This will enable the migratable functionality of the function.
246
247 devlink port function set pci/0000:01:00.0/1 hw_addr 00:00:00:11:22:33
248 state active
249 Configure hardware address and also active the function. When a
250 function is activated together with other configuration in a single
251 command, all the configuration is applied first before changing the
252 state to active.
253
254 devlink dev param show
255 Shows (dumps) all the port parameters across all the devices regis‐
256 tered in the devlink.
257
258 devlink dev param set pci/0000:01:00.0/1 name internal_error_reset
259 value true cmode runtime
260 Sets the parameter internal_error_reset of specified devlink port
261 (#1) to true.
262
263 devlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88 con‐
264 troller 1
265 Add a devlink port of flavour PCI SF on controller 1 which has PCI
266 PF of number 0 with SF number 88. To make use of the function an
267 example sequence is to add a port, configure the function attribute
268 and activate the function. Once the function usage is completed,
269 deactivate the function and finally delete the port. When there is
270 desire to reuse the port without deletion, it can be reconfigured
271 and activated again when function is in inactive state and func‐
272 tion's operational state is detached.
273
274
276 devlink(8), devlink-dev(8), devlink-sb(8), devlink-monitor(8), devlink-
277 health(8),
278
279
281 Jiri Pirko <jiri@mellanox.com>
282
283
284
285iproute2 14 Mar 2016 DEVLINK-PORT(8)