Intel® Ethernet 800 Series Linux Flow Control
Configuration Guide for RDMA Use Cases
Step 2: Kernel Priority (sk_prio) or DSCP to UP Mapping
Option A: PCP/VLAN PFC: ToS to Kernel Priority Mapping to UP Mapping
The ToS value automatically maps to Linux kernel priorities (hard coded in Linux based on ip_tos2prio in net/ipv4/route.c).
Mappings to set priority values 0, 2 ,4, and 6 are:
For more details, refer to:
http://linux-tc-notes.sourceforge.net/tc/doc/priority.txt
Also, refer to
Linux Source Notes:
PCP Mappings are implemented in the Linux kernel and drivers using
This is how 0, 2, 4, and 6 priority values occur.
In order to use other priority values (i.e., 1, 3, 5, 7), a VLAN is required to be set up using the egress-qos-map option. For example to map all priority 0 as priority 3:
Option B: DSCP to UP Mapping
DSCP mapping is implemented in the Linux kernel and drivers using ToS to DSCP direct mapping. Note that ToS is deprecated in favor of DSCP. The two low-order bits are used for ECN, while the upper six bits are used for the DSCP value (the priority). DSCP marking uses 6 bits of the 8-bit TOS field in the IPv4 Header to provide up to 64 classes (or code points) for traffic, thus the value for the DSCP field is four times the value of PCP ToS. DSCP to UP translation table has 64 entries and provides a translation from every one of 64 DSCP values to a 3-bit UP value.
The following table shows the commonly used DSCP Values and their priority values.
DSCP Value | Decimal Value | ToS (4 x DSCP) | UP |
---|---|---|---|
000 000 | 0 | 0 | 0 |
001 000 | 8 | 32 | 1 |
010 000 | 16 | 64 | 2 |
010 100 | 20 | 80 | 2 |
011 000 | 24 | 96 | 3 |
011 010 | 26 | 104 | 3 |
100 000 | 32 | 128 | 4 |
100 110 | 38 | 152 | 4 |
101 000 | 40 | 160 | 5 |
101 110 | 46 | 184 | 5 |
110 000 | 48 | 192 | 6 |
111 000 | 56 | 224 | 7 |