Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
134 changes: 134 additions & 0 deletions doc/QOS/SAI-Proposal-Port-Storm-Control-Enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# [SAI] Port Storm Control Enhancement
-------------------------------------------------------------------------------
Title | Port storm control enhancement
-------------|-----------------------------------------------------------------
Authors | Rajesh Perumal (Marvell)
Status | Reviewed on 26-Feb-2026
Type | Standards track
Created | 24-Feb-2026
SAI-Version | 1.18
-------------------------------------------------------------------------------

## Introduction


There is a long‑standing mismatch between the SAI storm‑control attribute definitions and how these attributes are interpreted within SONiC. The existing SAI attributes for flood and multicast storm control do not clearly differentiate among unknown unicast, unknown multicast, and known multicast traffic. As a result, vendors and SONiC implementations interpret these attributes differently, leading to inconsistent behavior across platforms.
To improve clarity and alignment, two approaches can be followed:

To improve clarity and alignment, new, explicit attributes are introduced for each traffic class and the ambiguous ones are deprecated. This resolves the ambiguity present in the current specification and enables consistent implementation across vendors and NOSes.
The following section details the selected enhancement approach and the required SAI header updates.

## Motivation

The table below highlights the gap between the current SAI attribute descriptions and how these attributes are interpreted within SONiC:

| Existing SAI Attribute | SAI Description | SONiC usage |
|-------------------------------------------------|------------------------------------------------|------------------------------|
| SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID | Unknown unicast/unknown multicast flood control| Unknown unicast flood control|
| SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID| Multicast storm control policer on port | Unknown multicast traffic |

This mismatch creates ambiguity, leads to inconsistent vendor implementations, and results in unclear handling of traffic classes (unknown unicast, unknown multicast, and known multicast). To address this, either the existing SAI attribute definitions must be refined, or new traffic‑specific attributes should be introduced. However, redefining current SAI attributes may introduce backward‑compatibility issues.

By defining explicit attributes, SAI can present storm‑control behavior more clearly across all network operating systems (including SONiC), reduce implementation confusion, and support future enhancements in storm‑control processing.


## SAI Enhancement

This enhancement proposes to deprecate the existing storm control attributes SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID and SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID, and replace it with dedicated, traffic‑specific attributes for unknown unicast, known unicast, unknown multicastand known multicast storm control. This provides clear separation of behavior and removes the ambiguity present in the current definition.

### Deprecated Attributes
```
--- Old Code
+++ New Code
/**
* @brief Enable flood (unknown unicast or unknown multicast)
* storm control policer on port.
+ * Deprecated. Use SAI_PORT_ATTR_UNKNOWN_UNICAST_STORM_CONTROL_POLICER_ID and SAI_PORT_ATTR_UNKNOWN_MULTICAST_STORM_CONTROL_POLICER_ID
*
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_POLICER
* @allownull true
* @default SAI_NULL_OBJECT_ID
+ * @deprecated true
*/
SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID,
```
```
--- Old Code
+++ New Code
/**
* @brief Enable multicast storm control policer on port.
+ * Deprecated. Use SAI_PORT_ATTR_KNOWN_MULTICAST_STORM_CONTROL_POLICER_ID and SAI_PORT_ATTR_UNKNOWN_MULTICAST_STORM_CONTROL_POLICER_ID
*
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_POLICER
* @allownull true
* @default SAI_NULL_OBJECT_ID
+ * @deprecated true
*/
SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID,
```

### New port storm control attributes
```
/**
* @brief Enable unknown unicast storm control policer on port.
*
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_POLICER
* @allownull true
* @default SAI_NULL_OBJECT_ID
*/
SAI_PORT_ATTR_UNKNOWN_UNICAST_STORM_CONTROL_POLICER_ID,

/**
* @brief Enable known unicast storm control policer on port.
*
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_POLICER
* @allownull true
* @default SAI_NULL_OBJECT_ID
*/
SAI_PORT_ATTR_KNOWN_UNICAST_STORM_CONTROL_POLICER_ID,

/**
* @brief Enable unknown multicast storm control policer on port.
*
* Set Policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_POLICER
* @allownull true
* @default SAI_NULL_OBJECT_ID
*/
SAI_PORT_ATTR_UNKNOWN_MULTICAST_STORM_CONTROL_POLICER_ID,

/**
* @brief Enable known multicast storm control policer on port.
*
* Set Policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_POLICER
* @allownull true
* @default SAI_NULL_OBJECT_ID
*/
SAI_PORT_ATTR_KNOWN_MULTICAST_STORM_CONTROL_POLICER_ID,

```

This approach provides more granular storm‑control handling per traffic type.
60 changes: 60 additions & 0 deletions inc/saiport.h
Original file line number Diff line number Diff line change
Expand Up @@ -1382,13 +1382,17 @@ typedef enum _sai_port_attr_t
* @brief Enable flood (unknown unicast or unknown multicast)
* storm control policer on port.
*
* Deprecated. Use SAI_PORT_ATTR_UNKNOWN_UNICAST_STORM_CONTROL_POLICER_ID
Comment thread
rpmarvell marked this conversation as resolved.
* and SAI_PORT_ATTR_UNKNOWN_MULTICAST_STORM_CONTROL_POLICER_ID.
*
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_POLICER
* @allownull true
* @default SAI_NULL_OBJECT_ID
* @deprecated true
*/
SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID,

Expand All @@ -1408,13 +1412,17 @@ typedef enum _sai_port_attr_t
/**
* @brief Enable multicast storm control policer on port.
*
* Deprecated. Use SAI_PORT_ATTR_KNOWN_MULTICAST_STORM_CONTROL_POLICER_ID
* and SAI_PORT_ATTR_UNKNOWN_MULTICAST_STORM_CONTROL_POLICER_ID.
*
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_POLICER
* @allownull true
* @default SAI_NULL_OBJECT_ID
* @deprecated true
*/
SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID,

Expand Down Expand Up @@ -3267,6 +3275,58 @@ typedef enum _sai_port_attr_t
*/
SAI_PORT_ATTR_CBFC_CREDIT_POOL_LIST,

/**
* @brief Enable known unicast storm control policer on port.
*
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_POLICER
* @allownull true
* @default SAI_NULL_OBJECT_ID
*/
SAI_PORT_ATTR_KNOWN_UNICAST_STORM_CONTROL_POLICER_ID,

/**
* @brief Enable unknown unicast storm control policer on port.
*
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_POLICER
* @allownull true
* @default SAI_NULL_OBJECT_ID
*/
SAI_PORT_ATTR_UNKNOWN_UNICAST_STORM_CONTROL_POLICER_ID,

/**
* @brief Enable known multicast storm control policer on port.
*
* Set Policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_POLICER
* @allownull true
* @default SAI_NULL_OBJECT_ID
*/
SAI_PORT_ATTR_KNOWN_MULTICAST_STORM_CONTROL_POLICER_ID,

/**
* @brief Enable unknown multicast storm control policer on port.
*
* Set Policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_POLICER
* @allownull true
* @default SAI_NULL_OBJECT_ID
*/
SAI_PORT_ATTR_UNKNOWN_MULTICAST_STORM_CONTROL_POLICER_ID,

/**
* @brief End of attributes
*/
Expand Down
Loading