~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/networking/devlink/devlink-linecard.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/networking/devlink/devlink-linecard.rst (Architecture alpha) and /Documentation/networking/devlink/devlink-linecard.rst (Architecture ppc)


  1 .. SPDX-License-Identifier: GPL-2.0                 1 .. SPDX-License-Identifier: GPL-2.0
  2                                                     2 
  3 =================                                   3 =================
  4 Devlink Line card                                   4 Devlink Line card
  5 =================                                   5 =================
  6                                                     6 
  7 Background                                          7 Background
  8 ==========                                          8 ==========
  9                                                     9 
 10 The ``devlink-linecard`` mechanism is targeted     10 The ``devlink-linecard`` mechanism is targeted for manipulation of
 11 line cards that serve as a detachable PHY modu     11 line cards that serve as a detachable PHY modules for modular switch
 12 system. Following operations are provided:         12 system. Following operations are provided:
 13                                                    13 
 14   * Get a list of supported line card types.       14   * Get a list of supported line card types.
 15   * Provision of a slot with specific line car     15   * Provision of a slot with specific line card type.
 16   * Get and monitor of line card state and its     16   * Get and monitor of line card state and its change.
 17                                                    17 
 18 Line card according to the type may contain on     18 Line card according to the type may contain one or more gearboxes
 19 to mux the lanes with certain speed to multipl     19 to mux the lanes with certain speed to multiple ports with lanes
 20 of different speed. Line card ensures N:M mapp     20 of different speed. Line card ensures N:M mapping between
 21 the switch ASIC modules and physical front pan     21 the switch ASIC modules and physical front panel ports.
 22                                                    22 
 23 Overview                                           23 Overview
 24 ========                                           24 ========
 25                                                    25 
 26 Each line card devlink object is created by de     26 Each line card devlink object is created by device driver,
 27 according to the physical line card slots avai     27 according to the physical line card slots available on the device.
 28                                                    28 
 29 Similar to splitter cable, where the device mi     29 Similar to splitter cable, where the device might have no way
 30 of detection of the splitter cable geometry, t     30 of detection of the splitter cable geometry, the device
 31 might not have a way to detect line card type.     31 might not have a way to detect line card type. For that devices,
 32 concept of provisioning is introduced. It allo     32 concept of provisioning is introduced. It allows the user to:
 33                                                    33 
 34   * Provision a line card slot with certain li     34   * Provision a line card slot with certain line card type
 35                                                    35 
 36     - Device driver would instruct the ASIC to     36     - Device driver would instruct the ASIC to prepare all
 37       resources accordingly. The device driver     37       resources accordingly. The device driver would
 38       create all instances, namely devlink por     38       create all instances, namely devlink port and netdevices
 39       that reside on the line card, according      39       that reside on the line card, according to the line card type
 40   * Manipulate of line card entities even with     40   * Manipulate of line card entities even without line card
 41     being physically connected or powered-up       41     being physically connected or powered-up
 42   * Setup splitter cable on line card ports        42   * Setup splitter cable on line card ports
 43                                                    43 
 44     - As on the ordinary ports, user may provi     44     - As on the ordinary ports, user may provision a splitter
 45       cable of a certain type, without the nee     45       cable of a certain type, without the need to
 46       be physically connected to the port          46       be physically connected to the port
 47   * Configure devlink ports and netdevices         47   * Configure devlink ports and netdevices
 48                                                    48 
 49 Netdevice carrier is decided as follows:           49 Netdevice carrier is decided as follows:
 50                                                    50 
 51   * Line card is not inserted or powered-down      51   * Line card is not inserted or powered-down
 52                                                    52 
 53     - The carrier is always down                   53     - The carrier is always down
 54   * Line card is inserted and powered up           54   * Line card is inserted and powered up
 55                                                    55 
 56     - The carrier is decided as for ordinary p     56     - The carrier is decided as for ordinary port netdevice
 57                                                    57 
 58 Line card state                                    58 Line card state
 59 ===============                                    59 ===============
 60                                                    60 
 61 The ``devlink-linecard`` mechanism supports th     61 The ``devlink-linecard`` mechanism supports the following line card states:
 62                                                    62 
 63   * ``unprovisioned``: Line card is not provis     63   * ``unprovisioned``: Line card is not provisioned on the slot.
 64   * ``unprovisioning``: Line card slot is curr     64   * ``unprovisioning``: Line card slot is currently being unprovisioned.
 65   * ``provisioning``: Line card slot is curren     65   * ``provisioning``: Line card slot is currently in a process of being provisioned
 66     with a line card type.                         66     with a line card type.
 67   * ``provisioning_failed``: Provisioning was      67   * ``provisioning_failed``: Provisioning was not successful.
 68   * ``provisioned``: Line card slot is provisi     68   * ``provisioned``: Line card slot is provisioned with a type.
 69   * ``active``: Line card is powered-up and ac     69   * ``active``: Line card is powered-up and active.
 70                                                    70 
 71 The following diagram provides a general overv     71 The following diagram provides a general overview of ``devlink-linecard``
 72 state transitions::                                72 state transitions::
 73                                                    73 
 74                                           +---     74                                           +-------------------------+
 75                                           |        75                                           |                         |
 76        +---------------------------------->        76        +---------------------------------->      unprovisioned      |
 77        |                                  |        77        |                                  |                         |
 78        |                                  +---     78        |                                  +--------|-------^--------+
 79        |                                           79        |                                           |       |
 80        |                                           80        |                                           |       |
 81        |                                  +---     81        |                                  +--------v-------|--------+
 82        |                                  |        82        |                                  |                         |
 83        |                                  |        83        |                                  |       provisioning      |
 84        |                                  |        84        |                                  |                         |
 85        |                                  +---     85        |                                  +------------|------------+
 86        |                                           86        |                                               |
 87        |                 +--------------------     87        |                 +-----------------------------+
 88        |                 |                         88        |                 |                             |
 89        |    +------------v------------+   +---     89        |    +------------v------------+   +------------v------------+   +-------------------------+
 90        |    |                         |   |        90        |    |                         |   |                         ---->                         |
 91        +-----   provisioning_failed   |   |        91        +-----   provisioning_failed   |   |       provisioned       |   |         active          |
 92        |    |                         |   |        92        |    |                         |   |                         <----                         |
 93        |    +------------^------------+   +---     93        |    +------------^------------+   +------------|------------+   +-------------------------+
 94        |                 |                         94        |                 |                             |
 95        |                 |                         95        |                 |                             |
 96        |                 |                +---     96        |                 |                +------------v------------+
 97        |                 |                |        97        |                 |                |                         |
 98        |                 |                |        98        |                 |                |     unprovisioning      |
 99        |                 |                |        99        |                 |                |                         |
100        |                 |                +---    100        |                 |                +------------|------------+
101        |                 |                        101        |                 |                             |
102        |                 +--------------------    102        |                 +-----------------------------+
103        |                                          103        |                                               |
104        +--------------------------------------    104        +-----------------------------------------------+
105                                                   105 
106                                                   106 
107 Example usage                                     107 Example usage
108 =============                                     108 =============
109                                                   109 
110 .. code:: shell                                   110 .. code:: shell
111                                                   111 
112     $ devlink lc show [ DEV [ lc LC_INDEX ] ]     112     $ devlink lc show [ DEV [ lc LC_INDEX ] ]
113     $ devlink lc set DEV lc LC_INDEX [ { type     113     $ devlink lc set DEV lc LC_INDEX [ { type LC_TYPE | notype } ]
114                                                   114 
115     # Show current line card configuration and    115     # Show current line card configuration and status for all slots:
116     $ devlink lc                                  116     $ devlink lc
117                                                   117 
118     # Set slot 8 to be provisioned with type "    118     # Set slot 8 to be provisioned with type "16x100G":
119     $ devlink lc set pci/0000:01:00.0 lc 8 typ    119     $ devlink lc set pci/0000:01:00.0 lc 8 type 16x100G
120                                                   120 
121     # Set slot 8 to be unprovisioned:             121     # Set slot 8 to be unprovisioned:
122     $ devlink lc set pci/0000:01:00.0 lc 8 not    122     $ devlink lc set pci/0000:01:00.0 lc 8 notype
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php