1DEVLINK-PORT(8)                      Linux                     DEVLINK-PORT(8)
2
3
4

NAME

6       devlink-port - devlink port configuration
7

SYNOPSIS

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 } ]
31
32       devlink port function rate { show | set | add | del | help }
33
34       devlink dev param set DEV/PORT_INDEX name PARAMETER value VALUE cmode {
35               runtime | driverinit | permanent }
36
37       devlink dev param show [ DEV/PORT_INDEX name PARAMETER ]
38
39       devlink port help
40
41

DESCRIPTION

43   devlink port set - change devlink port attributes
44       DEV/PORT_INDEX - specifies the devlink port to operate on.
45
46           Format is:
47             BUS_NAME/BUS_ADDRESS/PORT_INDEX
48
49
50       type { eth | ib | auto }
51              set port type
52
53              eth - Ethernet
54
55              ib - Infiniband
56
57              auto - autoselect
58
59
60   devlink port split - split devlink port into more
61       DEV/PORT_INDEX - specifies the devlink port to operate on.
62
63
64       count COUNT
65              number of ports to split to.
66
67
68   devlink port unsplit - unsplit previously split devlink port
69       Could be performed on any split port of the same split group.
70
71
72       DEV/PORT_INDEX - specifies the devlink port to operate on.
73
74
75   devlink port show - display devlink port attributes
76       DEV/PORT_INDEX - specifies the devlink port to show.  If this argument
77       is omitted all ports are listed.
78
79
80   devlink port health - devlink health reporting and recovery
81       Is an alias for devlink-health(8).
82
83
84   devlink port add - add a devlink port
85       DEV - specifies the devlink device to operate on. or
86
87
88       DEV/PORT_INDEX - specifies the devlink port index to use for the re‐
89       quested new port.  This is optional. When omitted, driver allocates
90       unique port index.
91
92
93       flavour { pcipf | pcisf }
94              set port flavour
95
96              pcipf - PCI PF port
97
98              pcisf - PCI SF port
99
100
101       pfnum PFNUMBER
102              Specifies PCI pfnumber to use on which a SF device to create
103
104
105       sfnum SFNUMBER
106              Specifies sfnumber to assign to the device of the SF.  This
107              field is optional for those devices which supports auto assign‐
108              ment of the SF number.
109
110
111       controller CNUM
112              Specifies controller number for which the SF port is created.
113              This field is optional. It is used only when SF port is created
114              for the external controller.
115
116
117   devlink port function set - Set the port function attribute(s).
118       DEV/PORT_INDEX - specifies the devlink port to operate on.
119
120
121       hw_addr ADDR
122              Hardware address of the function to set. This is a Ethernet MAC
123              address when port type is Ethernet.
124
125
126       state { active | inactive }
127              New state of the function to change to.
128
129              active - Once configuration of the function is done, activate
130              the function.
131
132              inactive - To inactivate the function and its device(s), set to
133              inactive.
134
135
136   devlink port del - delete a devlink port
137       DEV/PORT_INDEX - specifies the devlink port to delete.
138
139
140   devlink port param set - set new value to devlink port configuration param‐
141       eter
142       DEV/PORT_INDEX - specifies the devlink port to operate on.
143
144
145       name PARAMETER
146              Specify parameter name to set.
147
148
149       value VALUE
150              New value to set.
151
152
153       cmode { runtime | driverinit | permanent }
154              Configuration mode in which the new value is set.
155
156              runtime - Set new value while driver is running. This configura‐
157              tion mode doesn't require any reset to apply the new value.
158
159              driverinit - Set new value which will be applied during driver
160              initialization. This configuration mode requires restart driver
161              by devlink reload command to apply the new value.
162
163              permanent - New value is written to device's non-volatile mem‐
164              ory. This configuration mode requires hard reset to apply the
165              new value.
166
167
168   devlink port param show - display devlink port supported configuration pa‐
169       rameters attributes
170       DEV/PORT_INDEX - specifies the devlink port to operate on.
171
172       name PARAMETER Specify parameter name to show.  If this argument, as
173       well as port index, are omitted - all parameters supported by devlink
174       device ports are listed.
175
176
177   devlink port function rate - manage devlink rate objects
178       Is an alias for devlink-rate(8).
179
180

EXAMPLES

182       devlink port show
183           Shows the state of all devlink ports on the system.
184
185       devlink port show pci/0000:01:00.0/1
186           Shows the state of specified devlink port.
187
188       devlink port set pci/0000:01:00.0/1 type eth
189           Set type of specified devlink port to Ethernet.
190
191       devlink port split pci/0000:01:00.0/1 count 4
192           Split the specified devlink port into four ports.
193
194       devlink port unsplit pci/0000:01:00.0/1
195           Unplit the specified previously split devlink port.
196
197       devlink port health show
198           Shows status and configuration of all supported reporters regis‐
199           tered on all devlink ports.
200
201       devlink port health show pci/0000:01:00.0/1 reporter tx
202           Shows status and configuration of tx reporter registered on
203           pci/0000:01:00.0/1 devlink port.
204
205       devlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88
206           Add a devlink port of flavour PCI SF on PCI PF having number 0 with
207           SF number 88.  To make use of the function an example sequence is
208           to add a port, configure the function attribute and activate the
209           function. Once function usage is completed, inactivate the function
210           and finally delete the port. When there is desire to reuse the port
211           without deletion, it can be reconfigured and activated again when
212           function is in inactive state and function's operational state is
213           detached.
214
215       devlink port del pci/0000:06:00.0/1
216           Delete previously created devlink port. It is recommended to first
217           deactivate the function if the function supports state management.
218
219       devlink port function set pci/0000:01:00.0/1 hw_addr 00:00:00:11:22:33
220           Configure hardware address of the PCI function represented by de‐
221           vlink port.  If the port supports change in function state, hard‐
222           ware address must be configured before activating the function.
223
224       devlink port function set pci/0000:01:00.0/1 state active
225           Activate the function. This will initiate the function enumeration
226           and driver loading.
227
228       devlink port function set pci/0000:01:00.0/1 state inactive
229           Deactivate the function. This will initiate the function teardown
230           which results in driver unload and device removal.
231
232       devlink port function set pci/0000:01:00.0/1 hw_addr 00:00:00:11:22:33
233       state active
234           Configure hardware address and also active the function. When a
235           function is activated together with other configuration in a single
236           command, all the configuration is applied first before changing the
237           state to active.
238
239       devlink dev param show
240           Shows (dumps) all the port parameters across all the devices regis‐
241           tered in the devlink.
242
243       devlink dev param set pci/0000:01:00.0/1 name internal_error_reset
244       value true cmode runtime
245           Sets the parameter internal_error_reset of specified devlink port
246           (#1) to true.
247
248       devlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88 con‐
249       troller 1
250           Add a devlink port of flavour PCI SF on controller 1 which has PCI
251           PF of number 0 with SF number 88. To make use of the function an
252           example sequence is to add a port, configure the function attribute
253           and activate the function. Once the function usage is completed,
254           deactivate the function and finally delete the port. When there is
255           desire to reuse the port without deletion, it can be reconfigured
256           and activated again when function is in inactive state and func‐
257           tion's operational state is detached.
258
259

SEE ALSO

261       devlink(8), devlink-dev(8), devlink-sb(8), devlink-monitor(8), devlink-
262       health(8),
263
264

AUTHOR

266       Jiri Pirko <jiri@mellanox.com>
267
268
269
270iproute2                          14 Mar 2016                  DEVLINK-PORT(8)
Impressum