• 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 gives for each DSCP value a
      bitmap of priorities related to that DSCP value by APP, along the
      lines of dcb_ieee_getapp_mask().
    
    - dcb_ieee_getapp_prio_dscp_mask_map() similarly to compute for a given
      netdevice a map from priorities to a bitmap of DSCPs.
    
    - dcb_ieee_getapp_default_prio_mask() which finds all default-priority
      rules for a given port in APP database, and returns a mask of
      priorities allowed by these default-priority rules.
    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>
    b67c540b
Name
Last commit
Last update
Documentation Loading commit data...
LICENSES Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.clang-format Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...