User Manual

Features Overview and ConfigurationRev 2.3-1.0.1
Mellanox Technologies
40
If the underlying device is not a VLAN device, the tc command is used. In this case, even
though
tc manual states that the mapping is from the sk_prio to the TC number, the
mlx4_en driver interprets this as a sk_prio to UP mapping.
Mapping the sk_prio to the UP is done by using
tc_wrap.py -i <dev name> -u
0,1,2,3,4,5,6,7
4. The UP is mapped to the TC as configured by the mlnx_qos tool or by the lldpad daemon if
DCBX is used.
Socket applications can use setsockopt (SK_PRIO, value) to directly set the sk_prio
of the socket. In this case the ToS to sk_prio fixed mapping is not needed. This allows
the application and the administrator to utilize more than the 4 values possible via ToS.
In case of VLAN interface, the UP obtained according to the above mapping is also used
in the VLAN tag of the traffic
3.1.2.3 RoCE Quality of Service Mapping
Applications use RDMA-CM API to create and use QPs.
The following is the RoCE QoS mapping flow:
1. The application sets the ToS of the QP using the
rdma_set_option option
(
RDMA_OPTION_ID_TOS, value).
2. ToS is translated into the Socket Priority (
sk_prio) using a fixed translation:
TOS 0 <=> sk_prio 0
TOS 8 <=> sk_prio 2
TOS 24 <=> sk_prio 4
TOS 16 <=> sk_prio 6
3. The Socket Priority is mapped to the User Priority (UP) using the tc command.
In case of a VLAN device where the parent real device is used for the purpose of this map-
ping
If the underlying device is a VLAN device, and the parent real device was not used for the
mapping, the
VLAN device’s egress_map is used
On Kernels 3.13 and higher or Kernels that ported the functionality of enabled access to
the VLAN
device egress map (through vlan_dev_get_egress_qos_mask() call in if_vlan.h)
4. The UP is mapped to the TC as configured by the
mlnx_qos tool or by the lldpad daemon if
DCBX is used.
With RoCE, there can only be 4 predefined ToS values for the purpose of QoS mapping.
3.1.2.4 Raw Ethernet QP Quality of Service Mapping
Applications open a Raw Ethernet QP using VERBs directly.
The following is the RoCE QoS mapping flow: