NVIDIA® WinOF VPI Documentation v5.50.54000
Linux Kernel Upstream Release Notes v6.5

Differentiated Services Code Point (DSCP)

DSCP is a mechanism used for classifying network traffic on IP networks. It uses the 6-bit Differentiated Services Field (DS or DSCP field) in the IP header for packet classification purposes. Using Layer 3 classification enables you to maintain the same classification semantics beyond local network, across routers.

Every transmitted packet holds the information allowing network devices to map the packet to the appropriate 802.1Qbb CoS. For DSCP based PFC or ETS the packet is marked with a DSCP value in the Differentiated Services (DS) field of the IP header.

  • Operating Systems: Windows Server 2012, Windows Server 2012 R2 and Windows Server 2016

  • Firmware version: 2.30.8000 or higher

Marking DSCP value in the IP header is done differently for IP packets constructed by the NIC (e.g. RDMA traffic) and for packets constructed by the IP stack (e.g. TCP traffic).

  • For IP packets generated by the IP stack, the DSCP value is provided by the IP stack. The NIC does not validate the match between DSCP and Class of Service (CoS) values. CoS and DSCP values are expected to be set through standard tools, such as PowerShell command New-NetQosPolicy using PriorityValue8021Action and DSCPAction flags respectively.

  • For IP packets generated by the NIC (RDMA), the DSCP value is generated according to the CoS value programmed for the interface. CoS value is set through standard tools, such as PowerShell command New-NetQosPolicy using PriorityValue8021Action flag. The NIC uses a mapping table between the CoS value and the DSCP value configured through the RroceDscpMarkPriorityFlow- Control[0-7] Registry keys

  1. Verify that DCB is installed and enabled (is not installed by default).

    Copy
    Copied!
                

    PS $ Install-WindowsFeature Data-Center-Bridging

  2. Import the PowerShell modules that are required to configure DCB.

    Copy
    Copied!
                

    PS $ import-module NetQos PS $ import-module DcbQos PS $ import-module NetAdapter

  3. Configure DCB.

    Copy
    Copied!
                

    PS $ Set-NetQosDcbxSetting -Willing 0

  4. Enable Network Adapter QoS.

    Copy
    Copied!
                

    PS $ Set-NetAdapterQos -Name "Cx3Pro_ETH_P1" -Enabled 1

  5. Enable Priority Flow Control (PFC) on the specific priority 3,5.

    Copy
    Copied!
                

    PS $ Enable-NetQosFlowControl 3,5

Create a QoS policy to tag All TCP/UDP traffic with CoS value 3 and DSCP value 9.

Copy
Copied!
            

PS $ New-NetQosPolicy "DEFAULT" -Default -PriorityValue8021Action 3 -DSCPAction 9

DSCP can also be configured per protocol.

Copy
Copied!
            

PS $ New-NetQosPolicy "TCP" -IPProtocolMatchCondition TCP -PriorityValue8021Action 3 -DSCPAction 16 PS $ New-NetQosPolicy "UDP" -IPProtocolMatchCondition UDP -PriorityValue8021Action 3 -DSCPAction 32

Create a QoS policy to tag All TCP/UDP traffic with CoS value 0 and DSCP value 8.

Copy
Copied!
            

PS $ New-NetQosPolicy "DEFAULT" -Default -PriorityValue8021Action 0 -DSCPAction 8 -PolicyStore activestore

Configure DSCP with value 16 for TCP/IP connections with a range of ports.

Copy
Copied!
            

PS $ New-NetQosPolicy "TCP1" -DSCPAction 16 -IPDstPortStartMatchCondition 31000 -IPDst-PortEndMatchCondition 31999 -IPProtocol TCP -PriorityValue8021Action 0 -PolicyStore activestore

Configure DSCP with value 24 for TCP/IP connections with another range of ports.

Copy
Copied!
            

PS $ New-NetQosPolicy "TCP2" -DSCPAction 24 -IPDstPortStartMatchCondition 21000 -IPDst-PortEndMatchCondition 31999 -IPProtocol TCP -PriorityValue8021Action 0 -PolicyStore activestore

Configure two Traffic Classes with bandwidths of 16% and 80%.

Copy
Copied!
            

PS $ New-NetQosTrafficClass -name "TCP1" -priority 3 -bandwidthPercentage 16 -AlgorithmETS PS $ New-NetQosTrafficClass -name "TCP2" -priority 5 -bandwidthPercentage 80 -AlgorithmETS

Create a QoS policy to tag the ND traffic for port 10000 with CoS value 3.

Copy
Copied!
            

PS $ New-NetQosPolicy "ND10000" -NetDirectPortMatchCondition 10000 - PriorityValue8021Action 3

Related Commands:

  • Get-NetAdapterQos - Gets the QoS properties of the network adapter

  • Get-NetQosPolicy - Retrieves network QoS policies

  • Get-NetQosFlowControl - Gets QoS status per priority

The following attributes must be set manually and will be added to the miniport registry.

DSCP Registry Keys Settings

Registry Key

Description

TxUntagPriorityTag

If 0x1, do not add 802.1Q tag to transmitted packets which are assigned 802.1p priority, but are not assigned a non-zero VLAN ID (i.e. priority-tagged).

Default 0x0, for DSCP based PFC set to 0x1.

RxUntaggedMapToLossless

If 0x1, all untagged traffic is mapped to the lossless receive queue.

Default 0x0, for DSCP based PFC set to 0x1.

RroceDscpMarkPriorityFlowControl_<ID>

A value to mark DSCP for RoCE packets assigned to CoS=ID, when priority flow control is enabled. The valid values range is from 0 to 63,

Default is ID value, e.g. PriorityToDscpMappingTable_3 is 3.

ID values range from 0 to 7.

DscpBasedEtsEnabled

If 0x1 - all Dscp based ETS feature is enabled, if 0x0 - disabled. Default 0x0.

DscpForGlobalFlowControl

Default DSCP value for flow control. Default 0x1a.

Warning

For changes to take affect, please restart the network adapter after changing this registry key.

Default Settings

When DSCP configuration registry keys are missing in the miniport registry, the following defaults are assigned:

DSCP Default Registry Keys Settings

Registry Key

Default Value

TxUntagPriorityTag

0

RxUntaggedMapToLossles

0

PriorityToDscpMappingTable_0

0

PriorityToDscpMappingTable_1

1

PriorityToDscpMappingTable_2

2

PriorityToDscpMappingTable_3

3

PriorityToDscpMappingTable_4

4

PriorityToDscpMappingTable_5

5

PriorityToDscpMappingTable_6

6

PriorityToDscpMappingTable_7

7

DscpBasedEtsEnabled

eth:0

DscpForGlobalFlowControl

26


To verify that all QoS and DSCP settings were correct, you can capture incoming and outgoing traffic by using the ibdump tool and see the DSCP value in the captured packets as displayed in the figure below.

image2019-3-12_12-2-56.png

© Copyright 2023, NVIDIA. Last updated on Oct 26, 2023.