• Petr Machata's avatar
    mlxsw: spectrum: Support ieee_setapp, ieee_delapp · b2b1dab6
    Petr Machata authored
    The APP TLVs are used for communicating priority-to-protocol ID maps for
    a given netdevice. Support the following APP TLVs:
    
    - DSCP (selector 5) to configure priority-to-DSCP code point maps. Use
      these maps to configure packet priority on ingress, and DSCP code
      point rewrite on egress.
    
    - Default priority (selector 1, PID 0) to configure priority for the
      DSCP code points that don't have one assigned by the DSCP selector. In
      future this could also be used for assigning default port priority
      when a packet arrives without DSCP tagging.
    
    Besides setting up the maps themselves, also configure port trust level
    and rewrite bits.
    
    Port trust level determines whether, for a packet arriving through a
    certain port, the priority should be determined based on PCP or DSCP
    header fields. So far, mlxsw kept the device default of trust-PCP. Now,
    as soon as the first DSCP APP TLV is configured, switch to trust-DSCP.
    Only when all DSCP APP TLVs are removed, switch back to trust-PCP again.
    Note that the default priority APP TLV doesn't impact the trust level
    configuration.
    
    Rewrite bits determine whether DSCP and PCP fields of egressing packets
    should be updated according to switch priority. When port trust is
    switched to DSCP, enable rewrite of DSCP field.
    Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b2b1dab6
spectrum_dcb.c 20 KB