DCB-APP(8)

๐Ÿ’… dcb-app โ€” the manual page, but make it cute

okay bestie, welcome to dcb-app(8) โ€” the page that teaches you how to show and manipulate the application priority table of the DCB (Data Center Bridging) subsystem. this is section 8 of the Linux manuals, and yes it's giving "networking girlboss". let's get into it ๐ŸŽ€


โœจ NAME โœจ

dcb-app โ€” show / manipulate application priority table of the DCB (Data Center Bridging) subsystem.


๐ŸŒธ SYNOPSIS ๐ŸŒธ

dcb [ OPTIONS ] app { COMMAND | help }

dcb app  {  show  |  flush  }  dev DEV [ default-prio ] [ ethtype-prio ]
        [ stream-port-prio ] [ dgram-port-prio ] [ port-prio ] [ dscp-
        prio ] [ pcp-prio ]

dcb app  {  add  |  del  |  replace  }  dev DEV [ default-prio PRIO-LIST
        ] [ ethtype-prio ET-MAP ] [ stream-port-prio PORT-MAP ] [ dgram-
        port-prio PORT-MAP ] [ port-prio PORT-MAP ] [ dscp-prio DSCP-MAP
        ] [ pcp-prio PCP-MAP ]

PRIO-LIST := [ PRIO-LIST ] PRIO

ET-MAP := [ ET-MAP ] ET-MAPPING

ET-MAPPING := ET:PRIO

PORT-MAP := [ PORT-MAP ] PORT-MAPPING

PORT-MAPPING := PORT:PRIO

DSCP-MAP := [ DSCP-MAP ] DSCP-MAPPING

DSCP-MAPPING := { DSCP | all }:PRIO

PCP-MAP := [ PCP-MAP ] PCP-MAPPING

PCP-MAPPING := PCP:PRIO

ET := { 0x600 .. 0xffff }

PORT := { 1 .. 65535 }

DSCP := { 0 .. 63 }

PCP := { 0(nd/de) .. 7(nd/de) }

PRIO := { 0 .. 7 }

like, look at all those ranges. ET goes 0x600 to 0xffff, PORT goes 1 to 65535, DSCP goes 0 to 63, PCP goes 0(nd/de) to 7(nd/de), and PRIO goes 0 to 7. memorize them, they're the vibe. โœจ


๐Ÿ’– DESCRIPTION ๐Ÿ’–

okay so dcb app is the tool you use to configure the APP table โ€” aka the application priority table โ€” inside the DCB (Data Center Bridging) subsystem. the APP table's whole job is assigning priority to traffic based on values in one of several headers: EtherType, L4 destination port, or DSCP. it also lets you configure a port-default priority that gets chosen when no other prioritization rule applies. so basically it's the "who goes first" table, and it's lowkey iconic.

DCB APP entries are 3-tuples of selector, protocol ID, and priority. the selector is an enumeration that picks one of the prioritization namespaces โ€” currently it mostly corresponds to the configurable parameters described below. the protocol ID is a value in the selector namespace. e.g. for the EtherType selector, protocol IDs are the individual EtherTypes; for DSCP they're individual code points. and the priority is the priority that should be assigned to traffic matching that selector + protocol ID.

the APP table is a set of DCB APP entries. the only requirement is that duplicate entries are not added. and like โ€” notably โ€” it is valid to have conflicting priority assignment for the same selector and protocol ID. for example, the set of two APP entries (DSCP, 10, 1) and (DSCP, 10, 2), where packets with DSCP of 10 should get priorities 1 and 2, forms a well-defined APP table. yes bestie, chaos is technically legal here. ๐Ÿ™ˆ

the dcb app tool allows low-level management of the app table by adding and deleting individual APP 3-tuples through the add and del commands. on the other hand, the command replace does what one would typically want in this situation โ€” first adds the new configuration, and then removes the obsolete one, so that only one prioritization is in effect for a given selector and protocol ID. that's the "actually sane" one. ๐Ÿซถ


๐Ÿ‘‘ COMMANDS ๐Ÿ‘‘

  • show โ€” displays all entries with a given selector. when no selector is given, it shows all APP table entries categorized per selector. โœจ
  • flush โ€” removes all entries with a given selector. when no selector is given, it removes all APP table entries. ๐Ÿ’€
  • add, del โ€” add and, respectively, remove individual APP 3-tuples to and from the DCB APP table.
  • replace โ€” takes the list of entries mentioned as parameter, and adds those that are not present in the APP table yet. then it removes those entries whose selector and protocol ID have been mentioned as parameter, but not with the exact same priority. this has the effect of, for the given selector and protocol ID, ensuring that the table only contains the priority (or priorities) given as parameter. the way it cleans up after itselfโ€ฆ periodt. ๐Ÿ’…

๐Ÿฆ‹ PARAMETERS ๐Ÿฆ‹

the following table shows parameters in a way that they would be used with add, del and replace commands. for show and flush, the parameter name is to be used as a simple keyword without further arguments. (yes, just the name, no extra gossip attached.)

  • default-prio PRIO-LIST โ€” the priority to be used for traffic whose priority is otherwise unspecified. the argument is a list of individual priorities. note that default-prio rules are configured as triplets (EtherType, 0, PRIO). dcb app translates these rules to the symbolic name default-prio and back. so cute of it. ๐ŸŽ€
  • ethtype-prio ET-MAP โ€” ET-MAP uses the array parameter syntax, see dcb(8) for details. keys are EtherType values. values are priorities to be assigned to traffic with the matching EtherType.
  • stream-port-prio PORT-MAP
  • dgram-port-prio PORT-MAP
  • port-prio PORT-MAP โ€” PORT-MAP uses the array parameter syntax, see dcb(8) for details. keys are L4 destination port numbers that match on, respectively, TCP and SCTP traffic, UDP and DCCP traffic, and either of those. values are priorities that should be assigned to matching traffic. ๐ŸŒˆ
  • dscp-prio DSCP-MAP โ€” DSCP-MAP uses the array parameter syntax, see dcb(8) for details. keys are DSCP points, values are priorities assigned to traffic with matching DSCP. DSCP points can be written either directly as numeric values, or using symbolic names specified in /etc/iproute2/rt_dsfield โ€” however, note that the file specifies full 8-bit dsfield values, whereas dcb app will only use the higher six bits. dcb app show will similarly format DSCP values as symbolic names if possible. the command line option -N turns the show translation off. (so if you're confused why 24 is printing as CS3, that's why, bestie ๐Ÿ˜ญ)
  • pcp-prio PCP-MAP โ€” PCP-MAP uses the array parameter syntax, see dcb(8) for details. keys are PCP/DEI. values are priorities assigned to traffic with matching PCP/DEI. PCP/DEI values are written as a combination of numeric and symbolic values, to accommodate both. PCP is always in numerical form, e.g. 0 .. 7, and DEI is in symbolic form, e.g. 'de' (drop-eligible), indicating that the DEI bit is 1, or 'nd' (not-drop-eligible), indicating that the DEI bit is 0. in combination 2de:1 translates to a mapping of PCP=2 and DEI=1 to priority 1. it's giving "two languages in one string". ๐Ÿ’œ

๐ŸŒŸ EXAMPLE & USAGE ๐ŸŒŸ

prioritize traffic with DSCP 0 to priority 0, 24 to 3 and 48 to 6:

# dcb app add dev eth0 dscp-prio 0:0 24:3 48:6

add another rule to configure DSCP 24 to priority 2 and show the result:

# dcb app add dev eth0 dscp-prio 24:2
# dcb app show dev eth0 dscp-prio
dscp-prio 0:0 CS3:2 CS3:3 CS6:6
# dcb -N app show dev eth0 dscp-prio
dscp-prio 0:0 24:2 24:3 48:6

reconfigure the table so that the only rule for DSCP 24 is for assignment of priority 4:

# dcb app replace dev eth0 dscp-prio 24:4
# dcb app -N show dev eth0 dscp-prio
dscp-prio 0:0 24:4 48:6

flush all DSCP rules:

# dcb app flush dev eth0 dscp-prio
# dcb app show dev eth0 dscp-prio
(nothing)

add a rule to map traffic with PCP 1 and DEI 0 to priority 1 and PCP 2 and DEI 1 to priority 2:

# dcb app add dev eth0 pcp-prio 1nd:1 2de:2
# dcb app show dev eth0 pcp-prio
pcp-prio 1nd:1 2de:2

see how the replace one just quietly fixed everything? that's main character energy. ๐Ÿ‘‘


โญ EXIT STATUS โญ

exit status is 0 if the command was successful, or a positive integer upon failure. simple as that. no cap. ๐Ÿ’ฏ


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ


๐Ÿ’€ REPORTING BUGS ๐Ÿ’€

report any bugs to the Network Developers mailing list <netdev@vger.kernel.org> where the development and maintenance is primarily done. you do not have to be subscribed to the list to send a message there. so go ahead and speak your truth, bestie. ๐Ÿซถ


๐ŸŒธ AUTHOR ๐ŸŒธ

Petr Machata <me@pmachata.org>


reminder: every option, every value, every range, every file path and every example above is exactly as the original page says it. the sass is mine, the facts are not. ๐Ÿ’–

and that's the whole page, babes โœจ this one came from iproute2, dated 6 December 2020 โ€” 6 December 2020, yes that's the whole vibe check. go configure your APP table and slay ๐Ÿ’…๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from