Skip to content
  • Petr Machata's avatar
    net: dcb: Add priority-to-DSCP map getters · b67c540b
    Petr Machata authored
    On ingress, a network device such as a switch assigns to packets
    priority based on various criteria. Common options include interpreting
    PCP and DSCP fields according to user configuration. When a packet
    egresses the switch, a reverse process may rewrite PCP and/or DSCP
    values according to packet priority.
    
    The following three functions support a) obtaining a DSCP-to-priority
    map or vice versa, and b) finding default-priority entries in APP
    database.
    
    The DCB subsystem supports for APP entries a very generous M:N mapping
    between priorities and protocol identifiers. Understandably,
    several (say) DSCP values can map to the same priority. But this
    asymmetry holds the other way around as well--one priority can map to
    several DSCP values. For this reason, the following functions operate in
    terms of bitmaps, with ones in positions that match some APP entry.
    
    - dcb_ieee_getapp_dscp_prio_mask_map() to compute for a given netdevice
      a map of DSCP-to-priority-mask, which ...
    b67c540b