• Ido Schimmel's avatar
    mlxsw: spectrum: Initialize egress scheduling · 90183b98
    Ido Schimmel authored
    Before introducing support for DCB ops we should first make sure we
    initialize the relevant parts in the device correctly. Specifically, the
    egress scheduling.
    
    The device supports a superset of the 802.1Qaz standard with 4 hierarchy
    levels that can be linked to each other in multiple ways and with
    different transmission selection algorithms (TSA) employed between them.
    
    However, since we only intend to support the 802.1Qaz standard we
    flatten the hierarchies and let the user configure via DCB ops the TSA
    and max rate shaper at the subgroup hierarchy (see figure below) and the
    mapping between switch priority to traffic class. By default, all switch
    priorities are mapped to traffic class 0, strict priority is employed
    and max shaper is disabled.
    
    Default configuration:
    
             switch priority 0      ...         switch priority 7
                     +                                  +
                     |                                  |
                     +----------------------------------+
                     |
                  +--v--+                          +-----+
    Traffic Class |     |                          |     |
      Hierarchy   | TC0 |           ...            | TC7 |
                  |     |                          |     |
                  +--+--+                          +--+--+
                     |                                |
                  +--v--+                          +--v--+
      Subgroup    | SG0 |                          | SG7 |
      Hierarchy   |     |                          |     |
                  +-----+                          +-----+
                  | TSA |                          | TSA |
                  +-----+           ...            +-----+
                  | MAX |                          | MAX |
                  +--+--+                          +--+--+
                     |                                |
                     +---------------+----------------+
                                     |
                                  +--v--+
                          Group   |     |
                        Hierarchy | GR0 |
                                  |     |
                                  +--+--+
                                     |
                                  +--v--+
                          Port    |     |
                        Hierarchy | PR0 |
                                  |     |
                                  +-----+
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    90183b98
spectrum.c 92.1 KB