API Guide

RoCE v1 An Ethernet layer protocol that allows for communication between two hosts that are in the same Ethernet
broadcast domain.
RoCE v2 An Internet layer protocol that allows RoCE v2 packets to be routed, called Routable RoCE (RRoCE).
To enable RoCE, configure the QoS service policy on the switch in ingress and egress directions on all the interfaces. For more
information about this configuration, see Configure RoCE on the switch.
Configure RoCE on the switch
To configure RoCE, classify the ingress and egress traffic as lossy and lossless traffic. Based on the classification, assign the
ECN threshold and bandwidth for the respective queues. For RoCEv1, ECN threshold configuration is not required.
Configuration notes
Use the trust-map or policy-map CLI commands to configure dot1p and DSCP traffic-class markings. For RoCEv2,
classification is based only on DSCP.
Use the qos-map CLI command to apply the traffic class to queues.
Use the network-type policy-map to classify any of the priority values as lossless and fine-tune the respective buffer value
depending on traffic congestion.
Adjust the ECN threshold based on the traffic pattern.
Use the queuing-type policy-map to modify the bandwidth allocation for lossy and lossless queues.
If you are using RoCEv1, only bandwidth allocation is required. ECN and ECN queue association are not required.
To ensure lossless traffic flow, configure PFC on all lossless interfaces.
The following example describes the steps to configure RoCE on the switch. This configuration example uses priority 3 for
RoCE.
1. Enter CONFIGURATION mode.
OS10# configure terminal
OS10 (config)#
2. Enable the Data Center Bridging Exchange protocol (DCBX). See Data center bridging exchange (DCBX) for more
information.
OS10 (config)# dcbx enable
3. Create a VLAN. In this example, VLAN 55 switches the RoCE traffic. You can configure any value from 1 to 4093.
OS10 (config)# interface vlan 55
OS10 (conf-if-vl-55)# no shutdown
4. Apply the dot1p trust globally or at the interface level. In this example, the dot1p trust is applied globally.
NOTE:
If PFC configuration is not enabled on all the ports in the switch, do not apply dot1p trust globally. Apply the dot1p
trust on the specific interfaces.
For RoCEv1, use the trust-map dot1p default command or the user-defined trust-map dot1p
configuration.
For RoCEv2, use the trust-map dscp default command or the user-defined trust-map dscp
configuration.
OS10 (config)# system qos
OS10 (config-sys-qos)# trust-map dot1p default
5. Create a network-qos type class-map and policy-map for priority flow control (PFC). This configuration fine tunes the buffer
settings for the particular priority.
OS10 (config)# class-map type network-qos pfcdot1p3
OS10 (config-cmap-nqos)# match qos-group 3
OS10 (config)# policy-map type network-qos policy_pfcdot1p3
OS10(config-pmap-network-qos)# class pfcdot1p3
OS10(config-pmap-c-nqos)# pause
OS10(config-pmap-c-nqos)# pfc-cos 3
1212
Quality of service