Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAI Egress DSCP action behavior #2049

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
cd9a32d
[DASH] Add Routing Group API (#2026)
marian-pritsak Jun 27, 2024
c85ff70
SAI Egress DSCP action behavior initial draft
siqbal1986 Jul 10, 2024
bb2ead6
changed heading
siqbal1986 Jul 10, 2024
afd8e84
Fixed formatting issues in the document and updated the figure to ref…
siqbal1986 Jul 11, 2024
01c4729
SAI proposal for icmp echo offload (#2020)
chikkaiah-work Jul 10, 2024
4887562
[meta][sai] Move extensions SAI and API to 0x20000000 range (#2028)
kcudnik Jul 14, 2024
19eafa2
Update DASH pipeline and HA related counters. (#2051)
r12f Jul 15, 2024
28555f9
Update DASH SAI API comments (#2050)
r12f Jul 15, 2024
41edafe
Add port attribute to get the max debug data size. (#2033)
mikeberesford Jul 18, 2024
32003aa
Add DPU acronym (#2053)
mukeshmv Jul 24, 2024
29acd21
Convert DASH meter bucket object to table entry (#2056)
mukeshmv Jul 24, 2024
5480c57
Update SAI-Proposal-ACL-1.md (#2044)
chenjunyi1999 Jul 25, 2024
d3329b2
Add new Next Hop Type and allow Next Hop to be an IPMC Group Member (…
mholankar Aug 5, 2024
5e909f9
SER Support (#1993)
JaiOCP Aug 5, 2024
835c44e
Add Dash DPU scope DPU driven HA attributes (#2055)
mukeshmv Aug 6, 2024
e1285b9
Correct the type of SAI_HA_SCOPE_ATTR_HA_SET_ID (#2068)
jimmyzhai Aug 21, 2024
6700772
Unreliable LOS (#2063)
JaiOCP Aug 22, 2024
e5ae10f
Release notes for SAI 1.14.0 (#2062)
prasanna228 Aug 24, 2024
dded7a3
Add DASH Flow API to support connection tracking (#2064)
ShaofengWu123 Aug 29, 2024
265b184
Add DASH appliance object APIs (#2073)
mukeshmv Sep 5, 2024
75ce71b
sFlow Truncation support (#2065)
rck-innovium Sep 19, 2024
2202269
Include the metadata headers in the generated SWIG bindings (#2069)
saiarcot895 Sep 19, 2024
5b0cb2f
Extended port operational status with various error status (#2060)
prgeor Sep 24, 2024
a753d25
updated the document based on community input
siqbal1986 Sep 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/ACL/SAI-Proposal-ACL-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ This example creates and ACL group with more than one ACL table and bind it to a

### Example 4 - Binding an ACL group to a set of ports
This example creates an ACL group and binds it to multiple ports.

// Bind this ACL group *acl_grp_id1* to port2, and port20s OID.
port_attr_list.count = 1;
port_attr_list.list[0].id = SAI_PORT_ATTR_INGRESS_ACL;
Expand Down
80 changes: 80 additions & 0 deletions doc/IP-Multicast/MulticastNextHopRewrite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# SAI attributes for disabling L3 rewrites

# for IP Multicast forwarding

```
Author:mholankar@
```

## Overview

This document discusses requirements and the SAI spec proposal for disabling rewriting fields (SourceMAC, VLAN) as part of IPMC routing.

## Background

### SAI pipeline for IPMC forwarding. After Multicast Replication, the egress

### pipeline is very similar to Unicast Forwarding. The reference pipeline is

### fromUnicastForwarding.

- Nexthop sets the egress RIF and NextHopIP
- Neighbor table lookup on NextHopIP to set packet's destination MAC address
- Egress RIF lookup to set packet's source MAC address, VLAN and port.

## Requirements

We require knobs for disabling rewrites to following fields as part of Multicast forwarding flows

```
● Src MAC disable
● Vlan rewrite disable
```

We have scenarios where we need knobs for disabling header field rewrites, for Multicast Replication.

Case1:For certain flows, the switch does MulticastReplication for a VLAN tagged packet. However, we do not want the VLAN tag to be over-written during replication, we want the replication to retain the VLAN tag. For such a case we would like to disable L3 VLAN rewrite. Please note: that when a disable L3 Vlan rewrite
flag is enabled, it does allow for untagged packets to get replicated.

Case2: For some scenarios, we may want to rewrite the SRC MAC. Having NextHop based knobs for such rewrites would be very helpful.

In summary, with SDN based forwarding, Controller treats the L2 fields like any other header field which can be controlled and requires them to be configured flexibility as part of MulticastReplication.

## Proposal

Since we require capability to disable the rewrites for certain Multicast flows and not for all flows via/to neighbor, the best option is to have these as part of NextHop object:

- SAI_NEXT_HOP_ATTR_DISABLE_SRC_MAC_REWRITE
- SAI_NEXT_HOP_ATTR_DISABLE_DST_MAC_REWRITE
- SAI_NEXT_HOP_ATTR_DISABLE_VLAN_REWRITE

### Example SAI object creation for an IPMCGroup:

- Create a **SAI_OBJECT_TYPE_IPMC_GROUP** for the multicast group with the following attributes.
- Create a SAI_OBJECT_TYPE_ROUTER_INTERFACE with following attributes:
● SAI_ROUTER_INTERFACE_ATTR_VIRTUAL_ROUTER_ID
● SAI_ROUTER_INTERFACE_ATTR_SRC_MAC_ADDRESS
● SAI_ROUTER_INTERFACE_ATTR_TYPE=SAI_ROUTER_INTERFACE_TYPE_

```
PORT
```

● SAI_ROUTER_INTERFACE_ATTR_PORT_ID
- Create a SAI_OBJECT_TYPE_NEIGHBOR_ENTRY for each neighbor with:
● "ip"=Link local address ● "rif" ● "switch id"
● SAI_NEIGHBOR_ENTRY_ATTR_DST_MAC_ADDRESS(optional)
● SAI_NEIGHBOR_ENTRY_ATTR_NO_HOST_ROUTE=true
- Create SAI_OBJECT_TYPE_NEXT_HOP with:
● SAI_NEXT_HOP_ATTR_TYPE=SAI_NEXT_HOP_TYPE_IPMC
● SAI_NEXT_HOP_ATTR_ROUTER_INTERFACE_ID
● SAI_NEXT_HOP_ATTR_IP="ip"of neighbor

```
● SAI_NEXT_HOP_ATTR_DISABLE_SRC_MAC_REWRITE=true
● SAI_NEXT_HOP_ATTR_DISABLE_VLAN_REWRITE=true
```

- Create a **SAI_OBJECT_TYPE_IPMC_GROUP_MEMBER** with following attributes:
● SAI_IPMC_GROUP_MEMBER_ATTR_IPMC_GROUP_ID with ipmc_group_oid
● SAI_IPMC_GROUP_MEMBER_ATTR_IPMC_OUTPUT_ID with next_hop_oid
73 changes: 73 additions & 0 deletions doc/QOS/SAI-Proposal-Egress-DSCP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
SAI Egress DSCP action behavior
-------------------------------------------------------------------------------
Title | SAI Egress DSCP action behavior
-------------|-----------------------------------------------------------------
Authors | Shahzad Iqbal, Microsoft Corp.
Status | In review
Type | Standards track
Created | 07/10/2024
SAI-Version | 1.14
-------------------------------------------------------------------------------

This spec documents the behavior of various components which set DSCP value in the Egress packet pipeline.

# Overview #

There are various components with the capability to change the DSCP value of an L3 packet based on a match criteria. A clear order of precedence is needed for predictable behavior if multiple subsystems in the packet pipeline change this value.

# Scope #

This document only addresses the Egress stage of the packet pipeline. It does not specify any precedence for the ingress stage DSCP value change.
## SAI functions capable of changing DSCP. ##
There are currently 6 components in SAI which have the ability to change the DSCP value directly of a given packet. 'There are indirect ways to change the DSCP value such as ACL -> TC -> DSCP map but those fall out of the scope of this document.'

-------------------------------------------------------------------------------
Function | SAI attribute
--------------------------------------|----------------------------------------
Switch Qos TC-COLOR -> DSCP map | SAI_SWITCH_ATTR_QOS_TC_AND_COLOR_TO_DSCP_MAP
Switch Tunnel TC-COLOR -> DSCP map | SAI_SWITCH_TUNNEL_ATTR_ENCAP_QOS_TC_AND_COLOR_TO_DSCP_MAP
Tunnel DSCP mode | SAI_TUNNEL_DSCP_MODE_PIPE_MODEL, SAI_TUNNEL_DSCP_MODE_UNIFORM_MODEL
Tunnel TC-COLOR -> DSCP mapping | SAI_TUNNEL_ATTR_ENCAP_QOS_TC_AND_COLOR_TO_DSCP_MAP
Port Qos TC-COLOR -> DSCP map | SAI_PORT_ATTR_QOS_TC_AND_COLOR_TO_DSCP_MAP,
Egress ACL DSCP change action | ACL SAI_ACL_ENTRY_ATTR_ACTION_SET_DSCP
-------------------------------------------------------------------------------

Since these components operate in different positions in a ASIC pipeline, a possibility exists that DSCP value change performed by one component may be undone by the subsequent component.

The overall behavior can be segregated into three sections of the pipeline. Ingress, post-Ingress and Egress. This document focuses solely on the Egress section of the pipeline.

# Model for Egress Behavior #
The DSCP value set by various components on the egress side of the ASIC pipeline shall have the following precedence in descending order. This precedence shall apply to packets in the egress pipeline and shall override any other DSCP value set by the Ingress stage.
**However This precedence would be overriden if the platform provides the necessary SAI capibility API for Egress precedence check. This SAI API currently does not exist but would be added at a later date. For further details, please refer to the Community feedback section of this document.**

1. Egress ACL.

2. Tunnel DSCP mapping
- Tunnel TC-COLOR -> DSCP mapping
- Tunnel DSCP mode
- Switch Tunnel TC-COLOR -> DSCP map

3. Port Qos TC-COLOR -> DSCP map
siqbal1986 marked this conversation as resolved.
Show resolved Hide resolved

4. Switch Qos TC-COLOR -> DSCP map

## Examples of packet behavior. ##

These following is a logical diagram which shows how the DSCP value of a packet may be changed by different components. This diagram does not represent the actual layout of the pipeline.

<img src="../figures/egress_dscp_change_precedence.png" width="1200">
siqbal1986 marked this conversation as resolved.
Show resolved Hide resolved


## Community Feedback ##
After discussion with the SAI community the following feedback was recieved.

1. The proposal should be enhanced to cover for both Ingress and Egress stages of pipelines.

2. A SAI attribute should be devised to query the precedence behaviour set by the platform.

The following issues have been created to track these additional enhancements.

https://github.com/opencomputeproject/SAI/issues/2080 Request for SAI Ingress DSCP/TC precedence behavior document.

https://github.com/opencomputeproject/SAI/issues/2081 Request for SAI capability check to determine the Ingress/Egress DSCP/TC action precedence supported by the ASIC

4 changes: 2 additions & 2 deletions doc/SAI-Proposal-FRR.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Entity.

The switchover from the primary next hop to backup is triggered once a failure
of a particular object is spotted. This object can be a physical port, a tunnel
interface, BFD session etc.
interface, BFD session, ICMP ECHO session etc.

It is preferred that the switchover is triggered by the switching entity without
involving control plane in the process. This way the amount of time it takes to
Expand Down Expand Up @@ -173,7 +173,7 @@ be of one of the types that the hardware is able to monitor.
- SAI\_NEXT\_HOP\_GROUP\_MEMBER\_ATTR\_MONITORED\_OBJECT

This attribute allows the switching entity to monitor a specified object
(BFD session, physical port, tunnel interface etc) and in case of its failure,
(BFD session, ICMP ECHO session, physical port, tunnel interface etc) and in case of its failure,
trigger a switchover.

If the referred object fails, then the switch marks the next hop as FAILED and does not use it for forwarding.
Expand Down
Loading
Loading