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 ] [ pcipf
25               PFNUMBER ] { pcisf SFNUMBER }
26
27       devlink port del DEV/PORT_INDEX
28
29       devlink port function set DEV/PORT_INDEX { hw_addr ADDR } { state STATE
30               }
31
32       devlink dev param set DEV/PORT_INDEX name PARAMETER value VALUE cmode {
33               runtime | driverinit | permanent }
34
35       devlink dev param show [ DEV/PORT_INDEX name PARAMETER ]
36
37       devlink port help
38
39

DESCRIPTION

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

EXAMPLES

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

SEE ALSO

238       devlink(8), devlink-dev(8), devlink-sb(8), devlink-monitor(8), devlink-
239       health(8),
240
241

AUTHOR

243       Jiri Pirko <jiri@mellanox.com>
244
245
246
247iproute2                          14 Mar 2016                  DEVLINK-PORT(8)
Impressum