Skip to content

Commit

Permalink
Add detailed map
Browse files Browse the repository at this point in the history
Signed-off-by: bingwang <bingwang@microsoft.com>
  • Loading branch information
bingwang-ms committed Mar 18, 2022
1 parent 5b6e794 commit f515bac
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions doc/qos/tunnel_dscp_remapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Before remapping to queue 4 and 6, both queues are required to be cleared. Hence
* Table for decap

DSCP_TO_TC_MAP for mapping DSCP to TC

<a name="DSCP_TO_TC_MAP_AZURE_TUNNEL"></a>
```json
"DSCP_TO_TC_MAP": {
"AZURE_TUNNEL": {
Expand All @@ -83,7 +83,7 @@ Before remapping to queue 4 and 6, both queues are required to be cleared. Hence
```

TC_TO_PRIORITY_GROUP_MAP for mappping TC to PG

<a name="TC_TO_PRIORITY_GROUP_MAP|AZURE_TUNNEL"></a>
```json
"TC_TO_PRIORITY_GROUP_MAP": {
"AZURE_TUNNEL": {
Expand All @@ -101,7 +101,7 @@ Before remapping to queue 4 and 6, both queues are required to be cleared. Hence
* Table for encap

TC_TO_QUEUE_MAP for remapping queue

<a name="TC_TO_QUEUE_MAP|AZURE_TUNNEL"></a>
```json
"TC_TO_QUEUE_MAP": {
"AZURE_TUNNEL": {
Expand All @@ -117,6 +117,7 @@ Before remapping to queue 4 and 6, both queues are required to be cleared. Hence
```

TC_TO_DSCP_MAP for rewriting DSCP
<a name="TC_TO_DSCP_MAP_AZURE_TUNNEL"></a>
```json
"TC_TO_DSCP_MAP": {
"AZURE_TUNNEL": {
Expand Down Expand Up @@ -201,6 +202,23 @@ TC remapping requires below SAI attributes change.
*/
SAI_TUNNEL_ATTR_DECAP_QOS_TC_TO_PRIORITY_GROUP_MAP,
```
For instance, when we get a traffic flow with DSCP = 3 on T1, the traffic and bounced back traffic is delivered and remapped as below:

1. Traffic from `T1` to `Standby ToR`
- Traffic mapped to `TC3` and `PG3` by port level QoS mapping
2. Bounced back traffic from `Standby ToR` to `T1`
- Packet is encapped and will be delivered back to `T1` by `MuxTunnel`
- The outer `DSCP` is rewritten to `2` as specified in [TC_TO_DSCP_MAP|AZURE_TUNNEL](#TC_TO_DSCP_MAP_AZURE_TUNNEL) by SAI attribute `SAI_TUNNEL_ATTR_ENCAP_QOS_TC_AND_COLOR_TO_DSCP_MAP`.
- Traffic is delivered in `Queue 2` as specified in `TC_TO_QUEUE_MAP|AZURE_TUNNEL` by SAI attribute `SAI_TUNNEL_ATTR_ENCAP_QOS_TC_TO_QUEUE_MAP`
3. Bounced back traffic from T1 to Active ToR
- Bounced back traffic arrive at `T1` in `Queue 2` and `PG2` by port level QoS mapping
- Bounced back traffic routed to `Active ToR`
4. Traffic from Active ToR to Server
- Packet is decapped and will be delivered to server
- The outer `DSCP` is ignored as the `dscp_mode` for `MuxTunnel` is `PIPE`. The inner `DSCP3` is copied to outer layer
- Traffic is remapped to `TC 3` as specified in `DSCP_TO_TC_MAP|AZURE_TUNNEL` by SAI attribute `SAI_TUNNEL_ATTR_DECAP_QOS_DSCP_TO_TC_MAP`
- Traffic is remapped to `PG 2` as specified in `TC_TO_PRIORITY_GROUP_MAP|AZURE_TUNNEL` by SAI attribute `SAI_TUNNEL_ATTR_DECAP_QOS_TC_TO_PRIORITY_GROUP_MAP`
- Decapped traffic is delivered to target server
### 5.3 orchagent

Code change in orchagent
Expand Down

0 comments on commit f515bac

Please sign in to comment.