|
| 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. |
0 commit comments