-
Notifications
You must be signed in to change notification settings - Fork 583
Port storm control enhancement #2258
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
Open
rpmarvell
wants to merge
1
commit into
opencomputeproject:master
Choose a base branch
from
rpmarvell:rpmarvell_port_storm_control
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+194
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.