Skip to content

Commit 9d26d53

Browse files
committed
Port storm control enhancemnets (#2258)
Signed-off-by: rpmarvell <[email protected]>
1 parent 4b4347b commit 9d26d53

File tree

2 files changed

+190
-0
lines changed

2 files changed

+190
-0
lines changed
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# [SAI] Port Storm Control Enhancement
2+
-------------------------------------------------------------------------------
3+
Title | Port storm control enhancement
4+
-------------|-----------------------------------------------------------------
5+
Authors | Rajesh Perumal (Marvell)
6+
Status | In review
7+
Type | Standards track
8+
Created | 2026-02-24
9+
SAI-Version | 1.18
10+
-------------------------------------------------------------------------------
11+
12+
## Introduction
13+
14+
15+
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.
16+
To improve clarity and alignment, two approaches can be followed:
17+
18+
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.
19+
The following section details the selected enhancement approach and the required SAI header updates.
20+
21+
## Motivation
22+
23+
The table below highlights the gap between the current SAI attribute descriptions and how these attributes are interpreted within SONiC:
24+
25+
| Existing SAI Attribute | SAI Description | SONiC usage |
26+
|-------------------------------------------------|------------------------------------------------|------------------------------|
27+
| SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID | Unknown unicast/unknown multicast flood control| Unknown unicast flood control|
28+
| SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID| Multicast storm control policer on port | Unknown multicast traffic |
29+
30+
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.
31+
32+
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.
33+
34+
35+
## SAI Enhancement
36+
37+
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.
38+
39+
### Deprecated Attributes
40+
```
41+
--- Old Code
42+
+++ New Code
43+
/**
44+
* @brief Enable flood (unknown unicast or unknown multicast)
45+
* storm control policer on port.
46+
+ * Deprecated. Use SAI_PORT_ATTR_UNKNOWN_UNICAST_STORM_CONTROL_POLICER_ID and SAI_PORT_ATTR_UNKNOWN_MULTICAST_STORM_CONTROL_POLICER_ID
47+
*
48+
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
49+
*
50+
* @type sai_object_id_t
51+
* @flags CREATE_AND_SET
52+
* @objects SAI_OBJECT_TYPE_POLICER
53+
* @allownull true
54+
* @default SAI_NULL_OBJECT_ID
55+
+ * @deprecated true
56+
*/
57+
SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID,
58+
```
59+
```
60+
--- Old Code
61+
+++ New Code
62+
/**
63+
* @brief Enable multicast storm control policer on port.
64+
+ * Deprecated. Use SAI_PORT_ATTR_KNOWN_MULTICAST_STORM_CONTROL_POLICER_ID and SAI_PORT_ATTR_UNKNOWN_MULTICAST_STORM_CONTROL_POLICER_ID
65+
*
66+
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
67+
*
68+
* @type sai_object_id_t
69+
* @flags CREATE_AND_SET
70+
* @objects SAI_OBJECT_TYPE_POLICER
71+
* @allownull true
72+
* @default SAI_NULL_OBJECT_ID
73+
+ * @deprecated true
74+
*/
75+
SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID,
76+
```
77+
78+
### New port storm control attributes
79+
```
80+
/**
81+
* @brief Enable unknown unicast storm control policer on port.
82+
*
83+
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
84+
*
85+
* @type sai_object_id_t
86+
* @flags CREATE_AND_SET
87+
* @objects SAI_OBJECT_TYPE_POLICER
88+
* @allownull true
89+
* @default SAI_NULL_OBJECT_ID
90+
*/
91+
SAI_PORT_ATTR_UNKNOWN_UNICAST_STORM_CONTROL_POLICER_ID,
92+
93+
/**
94+
* @brief Enable known unicast storm control policer on port.
95+
*
96+
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
97+
*
98+
* @type sai_object_id_t
99+
* @flags CREATE_AND_SET
100+
* @objects SAI_OBJECT_TYPE_POLICER
101+
* @allownull true
102+
* @default SAI_NULL_OBJECT_ID
103+
*/
104+
SAI_PORT_ATTR_KNOWN_UNICAST_STORM_CONTROL_POLICER_ID,
105+
106+
/**
107+
* @brief Enable unknown multicast storm control policer on port.
108+
*
109+
* Set Policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
110+
*
111+
* @type sai_object_id_t
112+
* @flags CREATE_AND_SET
113+
* @objects SAI_OBJECT_TYPE_POLICER
114+
* @allownull true
115+
* @default SAI_NULL_OBJECT_ID
116+
*/
117+
SAI_PORT_ATTR_UNKNOWN_MULTICAST_STORM_CONTROL_POLICER_ID,
118+
119+
/**
120+
* @brief Enable known multicast storm control policer on port.
121+
*
122+
* Set Policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
123+
*
124+
* @type sai_object_id_t
125+
* @flags CREATE_AND_SET
126+
* @objects SAI_OBJECT_TYPE_POLICER
127+
* @allownull true
128+
* @default SAI_NULL_OBJECT_ID
129+
*/
130+
SAI_PORT_ATTR_KNOWN_MULTICAST_STORM_CONTROL_POLICER_ID,
131+
132+
```
133+
134+
This approach provides more granular storm‑control handling per traffic type.

inc/saiport.h

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,7 @@ typedef enum _sai_port_attr_t
12901290
/**
12911291
* @brief Enable flood (unknown unicast or unknown multicast)
12921292
* storm control policer on port.
1293+
* Deprecated. Use SAI_PORT_ATTR_UNKNOWN_UNICAST_STORM_CONTROL_POLICER_ID and SAI_PORT_ATTR_UNKNOWN_MULTICAST_STORM_CONTROL_POLICER_ID
12931294
*
12941295
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
12951296
*
@@ -1298,6 +1299,7 @@ typedef enum _sai_port_attr_t
12981299
* @objects SAI_OBJECT_TYPE_POLICER
12991300
* @allownull true
13001301
* @default SAI_NULL_OBJECT_ID
1302+
* @deprecated true
13011303
*/
13021304
SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID,
13031305

@@ -1316,6 +1318,7 @@ typedef enum _sai_port_attr_t
13161318

13171319
/**
13181320
* @brief Enable multicast storm control policer on port.
1321+
* Deprecated. Use SAI_PORT_ATTR_KNOWN_MULTICAST_STORM_CONTROL_POLICER_ID and SAI_PORT_ATTR_UNKNOWN_MULTICAST_STORM_CONTROL_POLICER_ID
13191322
*
13201323
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
13211324
*
@@ -1324,6 +1327,7 @@ typedef enum _sai_port_attr_t
13241327
* @objects SAI_OBJECT_TYPE_POLICER
13251328
* @allownull true
13261329
* @default SAI_NULL_OBJECT_ID
1330+
* @deprecated true
13271331
*/
13281332
SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID,
13291333

@@ -2956,6 +2960,58 @@ typedef enum _sai_port_attr_t
29562960
*/
29572961
SAI_PORT_ATTR_PTP_PEER_MEAN_PATH_DELAY,
29582962

2963+
/**
2964+
* @brief Enable known unicast storm control policer on port.
2965+
*
2966+
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
2967+
*
2968+
* @type sai_object_id_t
2969+
* @flags CREATE_AND_SET
2970+
* @objects SAI_OBJECT_TYPE_POLICER
2971+
* @allownull true
2972+
* @default SAI_NULL_OBJECT_ID
2973+
*/
2974+
SAI_PORT_ATTR_KNOWN_UNICAST_STORM_CONTROL_POLICER_ID,
2975+
2976+
/**
2977+
* @brief Enable unknown unicast storm control policer on port.
2978+
*
2979+
* Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
2980+
*
2981+
* @type sai_object_id_t
2982+
* @flags CREATE_AND_SET
2983+
* @objects SAI_OBJECT_TYPE_POLICER
2984+
* @allownull true
2985+
* @default SAI_NULL_OBJECT_ID
2986+
*/
2987+
SAI_PORT_ATTR_UNKNOWN_UNICAST_STORM_CONTROL_POLICER_ID,
2988+
2989+
/**
2990+
* @brief Enable known multicast storm control policer on port.
2991+
*
2992+
* Set Policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
2993+
*
2994+
* @type sai_object_id_t
2995+
* @flags CREATE_AND_SET
2996+
* @objects SAI_OBJECT_TYPE_POLICER
2997+
* @allownull true
2998+
* @default SAI_NULL_OBJECT_ID
2999+
*/
3000+
SAI_PORT_ATTR_KNOWN_MULTICAST_STORM_CONTROL_POLICER_ID,
3001+
3002+
/**
3003+
* @brief Enable unknown multicast storm control policer on port.
3004+
*
3005+
* Set Policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
3006+
*
3007+
* @type sai_object_id_t
3008+
* @flags CREATE_AND_SET
3009+
* @objects SAI_OBJECT_TYPE_POLICER
3010+
* @allownull true
3011+
* @default SAI_NULL_OBJECT_ID
3012+
*/
3013+
SAI_PORT_ATTR_UNKNOWN_MULTICAST_STORM_CONTROL_POLICER_ID,
3014+
29593015
/**
29603016
* @brief End of attributes
29613017
*/

0 commit comments

Comments
 (0)