]>
Commit | Line | Data |
---|---|---|
a3c4b484 JP |
1 | .TH DEVLINK\-PORT 8 "14 Mar 2016" "iproute2" "Linux" |
2 | .SH NAME | |
3 | devlink-port \- devlink port configuration | |
4 | .SH SYNOPSIS | |
5 | .sp | |
6 | .ad l | |
7 | .in +8 | |
8 | .ti -8 | |
9 | .B devlink | |
10 | .RI "[ " OPTIONS " ]" | |
11 | .B port | |
12 | .RI " { " COMMAND " | " | |
13 | .BR help " }" | |
14 | .sp | |
15 | ||
16 | .ti -8 | |
17 | .IR OPTIONS " := { " | |
18 | \fB\-V\fR[\fIersion\fR] | | |
43f35be4 | 19 | \fB\-n\fR[\fIno-nice-names\fR] } |
a3c4b484 JP |
20 | |
21 | .ti -8 | |
22 | .BR "devlink port set " | |
23 | .IR DEV/PORT_INDEX | |
24 | .RI "[ " | |
25 | .BR type " { " eth " | " ib " | " auto " }" | |
26 | .RI "]" | |
27 | ||
28 | .ti -8 | |
29 | .BR "devlink port split " | |
30 | .IR DEV/PORT_INDEX | |
31 | .BR count | |
32 | .IR COUNT | |
33 | ||
34 | .ti -8 | |
35 | .BR "devlink port unsplit " | |
36 | .IR DEV/PORT_INDEX | |
37 | ||
38 | .ti -8 | |
39 | .B devlink port show | |
40 | .RI "[ " DEV/PORT_INDEX " ]" | |
41 | ||
1fe8c44b VT |
42 | .ti -8 |
43 | .B devlink port health | |
44 | .RI "{ " show " | " recover " | " diagnose " | " dump " | " set " }" | |
45 | ||
331bf89a PP |
46 | .ti -8 |
47 | .BI "devlink port add" | |
48 | .RB "[" | |
49 | .IR "DEV | DEV/PORT_INDEX" | |
50 | .RB "] " | |
51 | .RB "[ " flavour | |
52 | .IR FLAVOUR " ]" | |
53 | .RB "[ " pcipf | |
54 | .IR PFNUMBER " ]" | |
55 | .RB "{ " pcisf | |
56 | .IR SFNUMBER " }" | |
57 | .br | |
58 | ||
59 | .ti -8 | |
60 | .B devlink port del | |
61 | .IR DEV/PORT_INDEX | |
62 | ||
bdfb9f1b PP |
63 | .ti -8 |
64 | .BR "devlink port function set " | |
65 | .IR DEV/PORT_INDEX | |
66 | .RI "{ " | |
67 | .BR "hw_addr " | |
68 | .RI "ADDR }" | |
69 | .RI "{ " | |
70 | .BR "state" | |
71 | .RI "STATE }" | |
72 | ||
c946f5d3 OM |
73 | .ti -8 |
74 | .B devlink dev param set | |
75 | .I DEV/PORT_INDEX | |
76 | .B name | |
77 | .I PARAMETER | |
78 | .B value | |
79 | .I VALUE | |
80 | .BR cmode " { " runtime " | " driverinit " | " permanent " } " | |
81 | ||
82 | .ti -8 | |
83 | .B devlink dev param show | |
84 | [ | |
85 | .I DEV/PORT_INDEX | |
86 | .B name | |
87 | .I PARAMETER | |
88 | ] | |
89 | ||
a3c4b484 JP |
90 | .ti -8 |
91 | .B devlink port help | |
92 | ||
93 | .SH "DESCRIPTION" | |
94 | .SS devlink port set - change devlink port attributes | |
95 | ||
96 | .PP | |
97 | .B "DEV/PORT_INDEX" | |
98 | - specifies the devlink port to operate on. | |
99 | ||
100 | .in +4 | |
101 | Format is: | |
102 | .in +2 | |
103 | BUS_NAME/BUS_ADDRESS/PORT_INDEX | |
104 | ||
105 | .TP | |
106 | .BR type " { " eth " | " ib " | " auto " } " | |
107 | set port type | |
108 | ||
109 | .I eth | |
110 | - Ethernet | |
111 | ||
112 | .I ib | |
113 | - Infiniband | |
114 | ||
115 | .I auto | |
116 | - autoselect | |
117 | ||
118 | .SS devlink port split - split devlink port into more | |
119 | ||
120 | .PP | |
121 | .B "DEV/PORT_INDEX" | |
122 | - specifies the devlink port to operate on. | |
123 | ||
124 | .TP | |
125 | .BI count " COUNT" | |
126 | number of ports to split to. | |
127 | ||
128 | .SS devlink port unsplit - unsplit previously split devlink port | |
129 | Could be performed on any split port of the same split group. | |
130 | ||
131 | .PP | |
132 | .B "DEV/PORT_INDEX" | |
133 | - specifies the devlink port to operate on. | |
134 | ||
135 | .SS devlink port show - display devlink port attributes | |
136 | ||
137 | .PP | |
138 | .I "DEV/PORT_INDEX" | |
139 | - specifies the devlink port to show. | |
140 | If this argument is omitted all ports are listed. | |
141 | ||
1fe8c44b VT |
142 | .SS devlink port health - devlink health reporting and recovery |
143 | Is an alias for | |
144 | .BR devlink-health (8). | |
145 | ||
331bf89a PP |
146 | .ti -8 |
147 | .SS devlink port add - add a devlink port | |
148 | .PP | |
149 | .B "DEV" | |
150 | - specifies the devlink device to operate on. or | |
151 | ||
152 | .PP | |
153 | .B "DEV/PORT_INDEX" | |
154 | - specifies the devlink port index to use for the requested new port. | |
155 | This is optional. When ommited, driver allocates unique port index. | |
156 | ||
157 | .TP | |
158 | .BR flavour " { " pcipf " | " pcisf " } " | |
159 | set port flavour | |
160 | ||
161 | .I pcipf | |
162 | - PCI PF port | |
163 | ||
164 | .I pcisf | |
165 | - PCI SF port | |
166 | ||
167 | .TP | |
168 | .BR pfnum " { " pfnumber " } " | |
169 | Specifies PCI pfnumber to use on which a SF device to create | |
170 | ||
171 | .TP | |
172 | .BR sfnum " { " sfnumber " } " | |
173 | Specifies sfnumber to assign to the device of the SF. | |
bdfb9f1b PP |
174 | This field is optional for those devices which supports auto assignment of the |
175 | SF number. | |
176 | ||
177 | .ti -8 | |
178 | .SS devlink port function set - Set the port function attribute(s). | |
179 | ||
180 | .PP | |
181 | .B "DEV/PORT_INDEX" | |
182 | - specifies the devlink port to operate on. | |
183 | ||
184 | .TP | |
185 | .BR hw_addr " ADDR" | |
186 | - hardware address of the function to set. This is a Ethernet MAC address when | |
187 | port type is Ethernet. | |
188 | ||
189 | .TP | |
190 | .BR state " { " active " | " inactive " } " | |
191 | - new state of the function to change to. | |
192 | ||
193 | .I active | |
194 | - Once configuration of the function is done, activate the function. | |
195 | ||
196 | .I inactive | |
197 | - To inactivate the function and its device(s), set to inactive. | |
331bf89a PP |
198 | |
199 | .ti -8 | |
200 | .SS devlink port del - delete a devlink port | |
201 | .PP | |
202 | .B "DEV/PORT_INDEX" | |
203 | - specifies the devlink port to delete. | |
204 | ||
c946f5d3 OM |
205 | .ti -8 |
206 | .SS devlink port param set - set new value to devlink port configuration parameter | |
207 | .PP | |
208 | .B "DEV/PORT_INDEX" | |
209 | - specifies the devlink port to operate on. | |
210 | ||
211 | .TP | |
212 | .BI name " PARAMETER" | |
213 | Specify parameter name to set. | |
214 | ||
215 | .TP | |
216 | .BI value " VALUE" | |
217 | New value to set. | |
218 | ||
219 | .TP | |
220 | .BR cmode " { " runtime " | " driverinit " | " permanent " } " | |
221 | Configuration mode in which the new value is set. | |
222 | ||
223 | .I runtime | |
224 | - Set new value while driver is running. This configuration mode doesn't require any reset to apply the new value. | |
225 | ||
226 | .I driverinit | |
227 | - Set new value which will be applied during driver initialization. This configuration mode requires restart driver by devlink reload command to apply the new value. | |
228 | ||
229 | .I permanent | |
230 | - New value is written to device's non-volatile memory. This configuration mode requires hard reset to apply the new value. | |
231 | ||
232 | .SS devlink port param show - display devlink port supported configuration parameters attributes | |
233 | ||
234 | .PP | |
235 | .B "DEV/PORT_INDEX" | |
236 | - specifies the devlink port to operate on. | |
237 | ||
238 | .B name | |
239 | .I PARAMETER | |
240 | Specify parameter name to show. | |
241 | If this argument, as well as port index, are omitted - all parameters supported by devlink device ports are listed. | |
242 | ||
a3c4b484 JP |
243 | .SH "EXAMPLES" |
244 | .PP | |
245 | devlink port show | |
246 | .RS 4 | |
247 | Shows the state of all devlink ports on the system. | |
248 | .RE | |
249 | .PP | |
250 | devlink port show pci/0000:01:00.0/1 | |
251 | .RS 4 | |
252 | Shows the state of specified devlink port. | |
253 | .RE | |
254 | .PP | |
255 | devlink port set pci/0000:01:00.0/1 type eth | |
256 | .RS 4 | |
257 | Set type of specified devlink port to Ethernet. | |
258 | .RE | |
259 | .PP | |
260 | devlink port split pci/0000:01:00.0/1 count 4 | |
261 | .RS 4 | |
262 | Split the specified devlink port into four ports. | |
263 | .RE | |
264 | .PP | |
265 | devlink port unsplit pci/0000:01:00.0/1 | |
266 | .RS 4 | |
267 | Unplit the specified previously split devlink port. | |
9ab56784 | 268 | .RE |
1fe8c44b VT |
269 | .PP |
270 | devlink port health show | |
271 | .RS 4 | |
272 | Shows status and configuration of all supported reporters registered on all devlink ports. | |
273 | .RE | |
274 | .PP | |
275 | devlink port health show pci/0000:01:00.0/1 reporter tx | |
276 | .RS 4 | |
277 | Shows status and configuration of tx reporter registered on pci/0000:01:00.0/1 devlink port. | |
278 | .RE | |
331bf89a PP |
279 | .PP |
280 | devlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88 | |
281 | .RS 4 | |
282 | Add a devlink port of flavour PCI SF on PCI PF having number 0 with SF number 88. | |
bdfb9f1b PP |
283 | To make use of the function an example sequence is to add a port, configure the |
284 | function attribute and activate the function. Once function usage is completed, | |
285 | inactivate the function and finally delete the port. When there is desire to | |
286 | reuse the port without deletion, it can be reconfigured and activated again when | |
287 | function is in inactive state and function's operational state is detached. | |
331bf89a PP |
288 | .RE |
289 | .PP | |
290 | devlink port del pci/0000:06:00.0/1 | |
291 | .RS 4 | |
bdfb9f1b PP |
292 | Delete previously created devlink port. It is recommended to first deactivate |
293 | the function if the function supports state management. | |
294 | .RE | |
295 | .PP | |
296 | devlink port function set pci/0000:01:00.0/1 hw_addr 00:00:00:11:22:33 | |
297 | .RS 4 | |
298 | Configure hardware address of the PCI function represented by devlink port. | |
299 | If the port supports change in function state, hardware address must be configured | |
300 | before activating the function. | |
301 | .RE | |
302 | .PP | |
303 | devlink port function set pci/0000:01:00.0/1 state active | |
304 | .RS 4 | |
305 | Activate the function. This will initiate the function enumeration and driver loading. | |
306 | .RE | |
307 | .PP | |
308 | devlink port function set pci/0000:01:00.0/1 state inactive | |
309 | .RS 4 | |
310 | Deactivate the function. This will initiate the function teardown which results | |
311 | in driver unload and device removal. | |
312 | .RE | |
313 | .PP | |
314 | devlink port function set pci/0000:01:00.0/1 hw_addr 00:00:00:11:22:33 state active | |
315 | .RS 4 | |
316 | Configure hardware address and also active the function. When a function is | |
317 | activated together with other configuration in a single command, all the | |
318 | configuration is applied first before changing the state to active. | |
331bf89a | 319 | .RE |
c946f5d3 OM |
320 | .PP |
321 | devlink dev param show | |
322 | .RS 4 | |
323 | Shows (dumps) all the port parameters across all the devices registered in the devlink. | |
324 | .RE | |
325 | .PP | |
326 | devlink dev param set pci/0000:01:00.0/1 name internal_error_reset value true cmode runtime | |
327 | .RS 4 | |
328 | Sets the parameter internal_error_reset of specified devlink port (#1) to true. | |
329 | .RE | |
a3c4b484 JP |
330 | |
331 | .SH SEE ALSO | |
332 | .BR devlink (8), | |
333 | .BR devlink-dev (8), | |
4bf138d6 | 334 | .BR devlink-sb (8), |
a3c4b484 | 335 | .BR devlink-monitor (8), |
1fe8c44b | 336 | .BR devlink-health (8), |
a3c4b484 JP |
337 | .br |
338 | ||
339 | .SH AUTHOR | |
340 | Jiri Pirko <jiri@mellanox.com> |