---
title: Easy RoCE
slug: aidc/easy-roce
description: roce configuration
createdAt: 2025-12-01T11:11:08.000Z
---

## <font color="#1d50a2">Easy RoCE View</font>

<font color="#1d05a2">Table 1 Easy RoCE View</font>

| **Command**                                                                         | **Purpose**                               |
| ----------------------------------------------------------------------------------- | ----------------------------------------- |
| **show qos roce** \[**all**\|**summary**\|*RoCE\_profile\_name*]                    | Display "Easy RoCE" configuration.        |
| **show counters qos roce interfaceethernet** *interface\_name* **queue** *queue-id* | Display RoCE statistics of the interface. |
| **clear counters qos roce**                                                         | Clear RoCE statistics of all interfaces.  |

### <font color="#1d50a2">show qos roce \[all|summary|*RoCE\_profile\_name*\]</font>

**\[Command]**
**show qos roce** \[**all**|**summary**|*RoCE\_profile\_name*]

**\[Purpose]**
Display RoCE configuration.

**\[View]**
Global Configuration View

**\[Notes]**
CX732Q-N-V2 devices currently do not support.

**\[Use Cases]**

```plaintext
sonic# show qos roce
Notice: Displaying configuraions of in-use RoCE profiles
==> RoCE Profile: roce_lossless_5m_low_latency | RoCE Policy Map: roce_lossless_5m_low_latency_100g <==
+--------------------+-----------------+-----------------------------------------------------+
|                    | Operational     | Description                                         |
+====================+=================+=====================================================+
| Mode               | Lossless        | QoS RoCE mode                                       |
+--------------------+-----------------+-----------------------------------------------------
| Status             | Bind: 0/0-0/252 | QoS RoCE binding status                             |
+--------------------+-----------------+-----------------------------------------------------+
| Cable Length       | 5m              | Cable length in meters for QoS RoCE lossless config |
+--------------------+-----------------+-----------------------------------------------------+
| Congestion-Control | -               | -                                                   |
|  - Congestion Mode | ECN             | Congestion control mode                             |
|  - Enabled TC      | 3,4             | Congestion control config enabled traffic class     |
|  - Max Threshold   | 1025024         | Congestion control config max threshold             |
|  - Min Threshold   | 15360           | Congestion control config max threshold             |
+--------------------+-----------------+-----------------------------------------------------+
| PFC                | -               | -                                                   |
|  - PFC Priority    | 3,4             | PFC enabled switch priority                         |
|  - TX Status       | Enabled         | PFC RX status                                       |
|  - RX Status       | Enabled         | PFC TX status                                       |
+--------------------+-----------------+-----------------------------------------------------+
| Trust              | -               | -                                                   |
|  - Trust Mode      | DSCP            | Trust setting for packet classification             |
+--------------------+-----------------+-----------------------------------------------------+

====> RoCE DSCP->SP Mapping Configurations <====
+-------------------------+-------------------+
| DSCP                    | Switch Priority   |
+=========================+===================+
| 0,1,2,3,4,5,6,7         | 0                 |
| 8,9,10,11,12,13,14,15   | 1                 |
| 16,17,18,19,20,21,22,23 | 2                 |
| 24,25,26,27,28,29,30,31 | 3                 |
| 32,33,34,35,36,37,38,39 | 4                 |
| 40,41,42,43,44,45,46,47 | 5                 |
| 48,49,50,51,52,53,54,55 | 6                 |
| 56,57,58,59,60,61,62,63 | 7                 |
+-------------------------+-------------------+

====> RoCE SP->TC Mapping & ETS Configurations <====
+-------------------+--------+----------+
| Switch Priority   | Mode   | Weight   |
+===================+========+==========+
| 6                 | SP     | -        |
| 7                 | SP     | -        |
+-------------------+--------+----------+

====> PFC Profile Configurations <====
+-------------------------------------------+-------------------+
| Profile Name                              | Switch Priority   |
+===========================================+===================+
| egress_lossless_profile                   | 3,4               |
| egress_lossy_profile                      | 0,1,2,5,6,7       |
| ingress_lossy_profile                     | 0,1,2,5,6,7       |
| pg_lossless_10000_40m_profile             | 3,4               |
| roce_lossless_5m_low_latency_100g_profile | 3,4               |
+-------------------------------------------+-------------------+

sonic# show qos roce summary
+------------------------------+----------+----------+
| Profile                      | Mode     | Status   |
+==============================+==========+==========+
| roce_lossless_5m_low_latency | lossless | Bind     |
+------------------------------+----------+----------+
```

### <font color="#1d50a2">show counters qos roce interface ethernet *interface\_name* queue *queue-id*</font>

**\[Command]**
**show counters qos roce interface ethernet** *interface\_name* **queue** *queue-id*

**\[Purpose]**
Display RoCE statistics of the interface.

**\[Parameters]**

| **Parameter**     | **Description**               |
| ----------------- | ----------------------------- |
| *interface\_name* | Interface name (eg.0/1)       |
| *queue-id*        | Queue ID, the range is \[0,7] |

**\[View]**
Global Configuration View

**\[Notes]**
CX732Q-N-V2 devices currently do not support.

**\[Use Cases]**

```plaintext
sonic# show counters qos roce interface ethernet 0/32 queue 3
                               operational
-----------------------------  -----------------
roce states                    Ethernet32.3
pfc-stats
- pfc_rx_stats                 0
- pfc_tx_stats                 402
- pg-stats
-   total_packet               11,380,786,999
-   total_bytes                1,456,740,735,872
-   drop_packet                0
-   curr_occupancy             0
ecn-stats
- ecn_stats                    0
- ecn_buffer
-   shared_use_watermark_byte  0
-   total_use_watermark_byte   0
-   total_use_count_byte       0
queue-stats
- Counter_pkts                 0
- Counter_bytes                0
- Drop_pkts                    0
- Drop_bytes                   0
- CounterRate_pkts             0.0
- CounterRate_bytes            0.0
- DropRate_pkts                0.0
- DropRate_bytes               0.0
- Occupancy_bytes              0
- SharedOccupancy_bytes        0
```

### <font color="#1d50a2">clear counters qos roce</font>

**\[Command]**
**clear counters qos roce**

**\[Purpose]**
Clear RoCE statistics of all interfaces.

**\[View]**
Global Configuration View

**\[Notes]**
CX732Q-N-V2 devices currently do not support.

**\[Use Cases]**

```plaintext
sonic# show counters qos roce interface 0/32 queue 3
```

## <font color="#1d50a2">Easy RoCE Config</font>

<font color="#1d05a2">Table 2 Easy RoCE Config</font>

| **Command**                                                                                                                   | **Purpose**                                                        |
| ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| **qos roce** \{**lossless**\|**lossy**} \[**cable-length** *length*] \[**incast-level** *level*] \[**traffic-model** *model*] | Enable "Easy RoCE", and create a configuration template.           |
| **qos service-policy** \{**roce\_lossless**\|**roce\_lossy**\|*RoCE\_profile\_name*}                                          | Apply "Easy RoCE" configuration to all interfaces.                 |
| **qos roce** *RoCE\_profile\_name*                                                                                            | Enter the RoCE template configuration view.                        |
| **bind interface** \{**all**\|**ethernet** *interface\_name*\|**range** *interface\_name\_list*}                              | Apply the RoCE configuration template to the specified interfaces. |

### <font color="#1d50a2">qos roce \{lossless|lossy\} \[cable-length *length*\] \[incast-level *level*\] \[traffic-model *model*\]</font>

**\[Command]**
**qos roce** \{**lossless**|**lossy**} \[**cable-length** *length*] \[**incast-level** *level*] \[**traffic-model** *model*]

**\[Purpose]**
Enable "Easy RoCE", and create a configuration template.

**\[Parameters]**

| **Parameter** | **Description**                                                                |
| ------------- | ------------------------------------------------------------------------------ |
| *length*      | Specify the cable length, choose from **5m/40m/100m/300m**.                    |
| *level*       | Specify the traffic incast model, choose from **low**/**medium**/**high**      |
| *model*       | Specify the traffic model, choose from **throughput**/**latency**/**balance.** |

**\[View]**
Global Configuration View

**\[Notes]**
To enhance the user-friendliness of AsterNOS in RoCE scenarios, we support "Easy RoCE" configuration and management. There are two modes in RoCE scenario: "Lossless Ethernet" and "Lossy Ethernet". In lossless mode, the system will automatically generate lossless configuration templates, with default DSCP mapping, enabling PFC and ECN for queue 3 and 4, and setting strict priority scheduling for queue 6 and 7. At the same time, it is supported for you to enter the corresponding configuration view to modify the parameters.
Run command **no qos roce** \{**lossless**|**lossy**} to remove "Easy RoCE" configuration.
CX732Q-N-V2 devices currently do not support.

**\[Use Cases]**

```plaintext
sonic(config)# qos roce lossless
or
sonic(config)# qos roce lossless cable-length 5m incast-level low traffic-model latency
Notice: Creating new RoCE profile roce_lossless_5m_low_latency
```

### <font color="#1d50a2">qos service-policy \{roce\_lossless|roce\_lossy|*RoCE\_profile\_name*\}</font>

**\[Command]**
**qos service-policy** \{**roce\_lossless**|**roce\_lossy**|*RoCE\_profile\_name*}

**\[Purpose]**
Apply "Easy RoCE" configuration to all interfaces.

**\[Parameters]**

| **Parameter**         | **Description**                   |
| --------------------- | --------------------------------- |
| *RoCE\_profile\_name* | Specify the name of RoCE profile. |

**\[View]**
Global Configuration View

**\[Notes]**
Run command **no qos service-policy** \{**roce\_lossless**|**roce\_lossy**|*RoCE\_profile\_name*} to unbind all interfaces.
CX732Q-N-V2 devices currently do not support.

**\[Use Cases]**

```plaintext
sonic(config)# qos service-policy roce_lossless
Notice: interface 0/0,0/4 has already bind other policy, pleace manually bind roce_lossless to the interfaces
or
sonic(config)# qos service-policy roce_lossless_5m_low_latency
Notice: RoCE is not supported on interface 0/256-0/257, skipping
Notice: Binding RoCE profile roce_lossless_5m_low_latency to interface 0/0-0/252
```

### <font color="#1d50a2">qos roce *RoCE\_profile\_name*</font>

**\[Command]**
**qos roce** *RoCE\_profile\_name*

**\[Purpose]**
Enter the RoCE template configuration view.

**\[Parameters]**

| **Parameter**         | **Description**                   |
| --------------------- | --------------------------------- |
| *RoCE\_profile\_name* | Specify the name of RoCE profile. |

**\[View]**
Global Configuration View

**\[Notes]**
Run command **no qos roce** *RoCE\_profile\_name* to delete the template you created.
CX732Q-N-V2 devices currently do not support.

**\[Use Cases]**

```plaintext
sonic(config)# qos roce roce_lossless
or
sonic(config)# qos roce roce_lossless_5m_low_latency
```

### <font color="#1d50a2">bind interface \{all|ethernet *interface\_name*|range *interface\_name\_list*\}</font>

**\[Command]**
**bind interface** \{**all**|**ethernet** *interface\_name*|**range** *interface\_name\_list*}

**\[Purpose]**
Apply the RoCE configuration template to the specified interfaces.

**\[Parameters]**

| **Parameter**           | **Description**                                 |
| ----------------------- | ----------------------------------------------- |
| **all**                 | Bind to all interfaces.                         |
| *interface\_name*       | Specify the certain interface name id (eg. 0/1) |
| *interface\_name\_list* | Specify the name list (eg. 0/0-0/64,0/128)      |

**\[View]**
RoCE Template Configuration View

**\[Notes]**
Run command **no bind interface** \{**all**|**ethernet** *interface\_name*|**range** *interface\_name\_list*} to unbind.
CX732Q-N-V2 devices currently do not support.

**\[Use Cases]**

```plaintext
sonic(config)# qos roce roce_lossless_5m_low_latency
sonic(config-roce_lossless_5m_low_latency)# bind interface range 0/0-0/12
Notice: Binding RoCE profile roce_lossless_5m_low_latency to interface 0/0-0/12
```

##

