beautypg.com

2 plain ethernet quality of service mapping – Dell Mellanox Family of Adapters User Manual

Page 26

background image

Driver Installation and Configuration

Rev 1.1

Mellanox Technologies

26

The following is the general mapping traffic to Traffic Classes flow:

1. The application sets the required Type of Service (ToS).

2. The ToS is translated into a Socket Priority (

sk_prio

).

3. The

sk_prio

is mapped to a User Priority (UP) by the system administrator (some applica-

tions set

sk_prio

directly).

4. The UP is mapped to TC by the network/system administrator.

5. TCs hold the actual QoS parameters

QoS can be applied on the following types of traffic. However, the general QoS flow may vary
among them:

Plain Ethernet - Applications use regular inet sockets and the traffic passes via the ker-
nel Ethernet driver

RoCE - Applications use the RDMA API to transmit using QPs

Raw Ethernet QP - Application use VERBs API to transmit using a Raw Ethernet QP

4.2.3.2 Plain Ethernet Quality of Service Mapping

Applications use regular inet sockets and the traffic passes via the kernel Ethernet driver.

The following is the Plain Ethernet QoS mapping flow:

1. The application sets the ToS of the socket using

setsockopt

(

IP_TOS

, value).

2. ToS is translated into the

sk_prio

using a fixed translation:

3. The Socket Priority is mapped to the UP:

If the underlying device is a VLAN device,

egress_map

is used controlled by the

vconfig

command. This is per VLAN mapping.

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 -u

0,1,2,3,4,5,6,7

4. The the UP is mapped to the TC as configured by the

mlnx_qos

tool or by the

lldpad

daemon

if DCBX is used.

TOS 0 <=> sk_prio 0

TOS 8 <=> sk_prio 2

TOS 24 <=> sk_prio 4

TOS 16 <=> sk_prio 6

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