DCB-ETS(8) | Linux | DCB-ETS(8) |
dcb-app - show / manipulate application priority table of the DCB (Data Center Bridging) subsystem
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 ]
dcb ets { 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 ]
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
ET := { 0x600 .. 0xffff }
PORT := { 1 .. 65535 }
DSCP := { 0 .. 63 }
PRIO := { 0 .. 7 }
dcb app is used to configure APP table, or application priority table in the DCB (Data Center Bridging) subsystem. The APP table is used to assign priority to traffic based on value in one of several headers: EtherType, L4 destination port, or DSCP. It also allows configuration of port-default priority that is chosen if no other prioritization rule applies.
DCB APP entries are 3-tuples of selector, protocol ID, and priority. Selector is an enumeration that picks one of the prioritization namespaces. Currently it mostly corresponds to configurable parameters described below. Protocol ID is a value in the selector namespace. E.g. for EtherType selector, protocol IDs are the individual EtherTypes, for DSCP they are individual code points. The priority is the priority that should be assigned to traffic that matches the selector and protocol ID.
The APP table is a set of DCB APP entries. The only requirement is that duplicate entries are not added. 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 priority of both 1 and 2, form a well-defined APP table. The dcb app tool allows low-level management of the app table by adding and deleting individual APP 3-tuples through add and del commands. On the other 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.
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.
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 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)
Exit status is 0 if command was successful or a positive integer upon failure.
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.
Petr Machata <me@pmachata.org>
6 December 2020 | iproute2 |