Lines Matching +full:port +full:- +full:2

1 .. SPDX-License-Identifier: GPL-2.0
6 Devlink Port
9 ``devlink-port`` is a port that exists on the device. It has a logically
10 separate ingress/egress point of the device. A devlink port can be any one
11 of many flavours. A devlink port flavour along with port attributes
12 describe what a port represents.
14 A device driver that intends to publish a devlink port sets the
15 devlink port attributes and registers the devlink port.
17 Devlink port flavours are described below.
19 .. list-table:: List of devlink port flavours
22 * - Flavour
23 - Description
24 * - ``DEVLINK_PORT_FLAVOUR_PHYSICAL``
25 - Any kind of physical port. This can be an eswitch physical port or any
26 other physical port on the device.
27 * - ``DEVLINK_PORT_FLAVOUR_DSA``
28 - This indicates a DSA interconnect port.
29 * - ``DEVLINK_PORT_FLAVOUR_CPU``
30 - This indicates a CPU port applicable only to DSA.
31 * - ``DEVLINK_PORT_FLAVOUR_PCI_PF``
32 - This indicates an eswitch port representing a port of PCI
34 * - ``DEVLINK_PORT_FLAVOUR_PCI_VF``
35 - This indicates an eswitch port representing a port of PCI
37 * - ``DEVLINK_PORT_FLAVOUR_PCI_SF``
38 - This indicates an eswitch port representing a port of PCI
40 * - ``DEVLINK_PORT_FLAVOUR_VIRTUAL``
41 - This indicates a virtual port for the PCI virtual function.
43 Devlink port can have a different type based on the link layer described below.
45 .. list-table:: List of devlink port types
48 * - Type
49 - Description
50 * - ``DEVLINK_PORT_TYPE_ETH``
51 - Driver should set this port type when a link layer of the port is
53 * - ``DEVLINK_PORT_TYPE_IB``
54 - Driver should set this port type when a link layer of the port is
56 * - ``DEVLINK_PORT_TYPE_AUTO``
57 - This type is indicated by the user when driver should detect the port
61 ---------------
64 consists of one or more ports. This port is represented by the devlink eswitch
65 port.
74 ---------------------------------------------------------
76 | --------- --------- ------- ------- |
77 ----------- | | vf(s) | | sf(s) | |vf(s)| |sf(s)| |
78 | server | | ------- ----/---- ---/----- ------- ---/--- ---/--- |
80 | connect | | ------- ------- |
81 ----------- | | controller_num=1 (no eswitch) |
82 ------|--------------------------------------------------
85 ---------------------------------------------------------
87 | ----------------------------------------------------- |
88 | |ctrl-0 | ctrl-0 | ctrl-0 | ctrl-0 | ctrl-0 |ctrl-0 | |
90 | ----------------------------------------------------- |
91 | |ctrl-1 | ctrl-1 | ctrl-1 | ctrl-1 | ctrl-1 |ctrl-1 | |
93 | ----------------------------------------------------- |
96 ----------- | --------- --------- ------- ------- |
98 | pci rc |==| ------- ----/---- ---/----- ------- ---/--- ---/--- |
100 ----------- | ------- ------- |
103 ---------------------------------------------------------
119 configure port function attribute before activating the port function.
122 `devlink port function set hw_addr` command. For Ethernet port function
126 `devlink port function set roce` command.
129 `devlink port function set migratable` command.
132 `devlink port function set ipsec_crypto` command.
135 `devlink port function set ipsec_packet` command.
138 using `devlink port function set max_io_eqs` command.
144 -----------------
148 - Get the MAC address of the VF identified by its unique devlink port index::
150 $ devlink port show pci/0000:06:00.0/2
151 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1
155 - Set the MAC address of the VF identified by its unique devlink port index::
157 $ devlink port function set pci/0000:06:00.0/2 hw_addr 00:11:22:33:44:55
159 $ devlink port show pci/0000:06:00.0/2
160 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1
164 - Get the MAC address of the SF identified by its unique devlink port index::
166 $ devlink port show pci/0000:06:00.0/32768
171 - Set the MAC address of the SF identified by its unique devlink port index::
173 $ devlink port function set pci/0000:06:00.0/32768 hw_addr 00:00:00:00:88:88
175 $ devlink port show pci/0000:06:00.0/32768
181 ---------------------
190 When RoCE capability is disabled in the device using port function attribute,
193 - Get RoCE capability of the VF device::
195 $ devlink port show pci/0000:06:00.0/2
196 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1
200 - Set RoCE capability of the VF device::
202 $ devlink port function set pci/0000:06:00.0/2 roce disable
204 $ devlink port show pci/0000:06:00.0/2
205 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1
210 ---------------------------
226 - Get migratable capability of the VF device::
228 $ devlink port show pci/0000:06:00.0/2
229 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1
233 - Set migratable capability of the VF device::
235 $ devlink port function set pci/0000:06:00.0/2 migratable enable
237 $ devlink port show pci/0000:06:00.0/2
238 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1
242 - Bind VF to VFIO driver with migration support::
253 -----------------------------
260 - Get IPsec crypto capability of the VF device::
262 $ devlink port show pci/0000:06:00.0/2
263 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1
267 - Set IPsec crypto capability of the VF device::
269 $ devlink port function set pci/0000:06:00.0/2 ipsec_crypto enable
271 $ devlink port show pci/0000:06:00.0/2
272 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1
277 -----------------------------
285 - Get IPsec packet capability of the VF device::
287 $ devlink port show pci/0000:06:00.0/2
288 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1
292 - Set IPsec packet capability of the VF device::
294 $ devlink port function set pci/0000:06:00.0/2 ipsec_packet enable
296 $ devlink port show pci/0000:06:00.0/2
297 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1
302 ------------------------------
315 - Get maximum IO event queues of the VF device::
317 $ devlink port show pci/0000:06:00.0/2
318 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1
322 - Set maximum IO event queues of the VF device::
324 $ devlink port function set pci/0000:06:00.0/2 max_io_eqs 32
326 $ devlink port show pci/0000:06:00.0/2
327 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1
341 1) create - create a subfunction;
342 2) configure - configure subfunction attributes;
343 3) deploy - deploy the subfunction;
345 Subfunction management is done using devlink port user interface.
349 ----------
350 A subfunction is created using a devlink port interface. A user adds the
351 subfunction by adding a devlink port of subfunction flavour. The devlink
353 it to create a subfunction devlink port. Driver then instantiates the
354 subfunction port and any associated objects such as health reporters and
357 (2) Configure
358 -------------
359 A subfunction devlink port is created but it is not active yet. That means the
360 entities are created on devlink side, the e-switch port representor is created,
361 but the subfunction device itself is not created. A user might use e-switch port
367 ----------
371 A subfunction device is created on the :ref:`Documentation/driver-api/auxiliary_bus.rst <auxiliary_…
377 Devlink provides API to manage tx rates of single devlink port or a group.
381 Represents a single devlink port; created/destroyed by the driver. Since leaf
382 have 1to1 mapping to its devlink port, in user space it is referred as
437 #. If all the nodes from the highest priority sub-group are satisfied, or
442 may export nodes/leafs and their child-parent relationships.
447 .. list-table:: Terms and Definitions
450 * - Term
451 - Definitions
452 * - ``PCI device``
453 - A physical PCI device having one or more PCI buses consists of one or
455 * - ``PCI controller``
456 - A controller consists of potentially multiple physical functions,
458 * - ``Port function``
459 - An object to manage the function of a port.
460 * - ``Subfunction``
461 - A lightweight function that has parent PCI function on which it is
463 * - ``Subfunction device``
464 - A bus device of the subfunction, usually on a auxiliary bus.
465 * - ``Subfunction driver``
466 - A device driver for the subfunction auxiliary device.
467 * - ``Subfunction management device``
468 - A PCI physical function that supports subfunction management.
469 * - ``Subfunction management driver``
470 - A device driver for PCI physical function that supports
471 subfunction management using devlink port interface.
472 * - ``Subfunction host driver``
473 - A device driver for PCI physical function that hosts subfunction