|
| 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 | +1. Introducing new, explicit attributes for each traffic class and deprecating the ambiguous ones |
| 19 | +2. Refining the descriptions of existing attributes while adding only the missing attributes |
| 20 | + |
| 21 | +The following sections detail both options along with the required SAI header updates. |
| 22 | + |
| 23 | + |
| 24 | +## Motivation |
| 25 | + |
| 26 | +Clear and unambiguous SAI attribute definitions are essential for ensuring consistent storm‑control behavior across SONiC platforms. The table below highlights the gap between the current SAI attribute descriptions and how these attributes are interpreted within SONiC: |
| 27 | + |
| 28 | +| Existing SAI Attribute | SAI Description | SONiC usage | |
| 29 | +|-------------------------------------------------|------------------------------------------------|------------------------------| |
| 30 | +| SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID | Unknown unicast/unknown multicast flood control| Unknown unicast flood control| |
| 31 | +| SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID| Multicast storm control policer on port | Unknown multicast traffic | |
| 32 | + |
| 33 | +This mismatch leads to ambiguity, inconsistent vendor implementations, and unclear handling of traffic classes (unknown unicast, unknown multicast, known multicast). To resolve this, either the existing SAI attribute descriptions must be refined, or new traffic‑specific attributes must be introduced. |
| 34 | + |
| 35 | +By defining explicit attributes or improving the descriptions, SAI can present storm‑control behavior more clearly to all network operating systems (including SONiC), reduce confusion, and enable future enhancements in storm‑control handling. |
| 36 | + |
| 37 | +This proposal presents two options, and the community may choose the one that provides the best long‑term clarity and alignment. |
| 38 | + |
| 39 | +## Option - 1 : New attributes for Storm Control |
| 40 | + |
| 41 | +Deprecate the existing SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID attribute and replace it with dedicated, traffic‑specific attributes for unknown unicast, known unicast, and known multicast storm control. This provides clear separation of behavior and removes the ambiguity present in the current definition. |
| 42 | + |
| 43 | +In addition, update the description of SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID to explicitly state that it applies to unknown multicast traffic, ensuring consistency and alignment with SONiC’s usage model. |
| 44 | + |
| 45 | +### Deprecation of SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID |
| 46 | +``` |
| 47 | +--- Old Code |
| 48 | ++++ New Code |
| 49 | + /** |
| 50 | + * @brief Enable flood (unknown unicast or unknown multicast) |
| 51 | + * storm control policer on port. |
| 52 | ++ * Deprecated. Use SAI_PORT_ATTR_UNKNOWN_UNICAST_STORM_CONTROL_POLICER_ID and SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID |
| 53 | + * |
| 54 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 55 | + * |
| 56 | + * @type sai_object_id_t |
| 57 | + * @flags CREATE_AND_SET |
| 58 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 59 | + * @allownull true |
| 60 | + * @default SAI_NULL_OBJECT_ID |
| 61 | ++ * @deprecated true |
| 62 | + */ |
| 63 | + SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID, |
| 64 | +``` |
| 65 | +### Description change of SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID |
| 66 | +``` |
| 67 | +--- Old Code |
| 68 | ++++ New Code |
| 69 | + /** |
| 70 | +- * @brief Enable multicast storm control policer on port. |
| 71 | ++ * @brief Enable unknown multicast storm control policer on port. |
| 72 | + * |
| 73 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 74 | + * |
| 75 | + * @type sai_object_id_t |
| 76 | + * @flags CREATE_AND_SET |
| 77 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 78 | + * @allownull true |
| 79 | + * @default SAI_NULL_OBJECT_ID |
| 80 | + */ |
| 81 | + SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID, |
| 82 | +``` |
| 83 | + |
| 84 | +### New port storm control attributes |
| 85 | +``` |
| 86 | +/** |
| 87 | + * @brief Enable flood (for unknown unicast traffic) |
| 88 | + * storm control policer on port. |
| 89 | + * |
| 90 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 91 | + * |
| 92 | + * @type sai_object_id_t |
| 93 | + * @flags CREATE_AND_SET |
| 94 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 95 | + * @allownull true |
| 96 | + * @default SAI_NULL_OBJECT_ID |
| 97 | + */ |
| 98 | + SAI_PORT_ATTR_UNKNOWN_UNICAST_STORM_CONTROL_POLICER_ID, |
| 99 | +
|
| 100 | + /** |
| 101 | + * @brief Enable known multicast storm control policer on port. |
| 102 | + * |
| 103 | + * Set Policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 104 | + * |
| 105 | + * @type sai_object_id_t |
| 106 | + * @flags CREATE_AND_SET |
| 107 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 108 | + * @allownull true |
| 109 | + * @default SAI_NULL_OBJECT_ID |
| 110 | + */ |
| 111 | + SAI_PORT_ATTR_KNOWN_MULTICAST_STORM_CONTROL_POLICER_ID, |
| 112 | +
|
| 113 | + /** |
| 114 | + * @brief Enable flood (for known unicast traffic) |
| 115 | + * storm control policer on port. |
| 116 | + * |
| 117 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 118 | + * |
| 119 | + * @type sai_object_id_t |
| 120 | + * @flags CREATE_AND_SET |
| 121 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 122 | + * @allownull true |
| 123 | + * @default SAI_NULL_OBJECT_ID |
| 124 | + */ |
| 125 | + SAI_PORT_ATTR_KNOWN_UNICAST_STORM_CONTROL_POLICER_ID, |
| 126 | +``` |
| 127 | + |
| 128 | +Option-1 changes are also included as code changes in this PR. |
| 129 | + |
| 130 | +## Option - 2 : SAI Attribute description change |
| 131 | + |
| 132 | +There are two minor header changes to be inline with SONiC behaviour expectation, |
| 133 | +And also two new storm-control attributes for Known multicast and known unicast storm. |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | +### Description change for FLOOD_STORM_CONTROL and MULTICAST_STORM_CONTROL attributes |
| 138 | + |
| 139 | +``` |
| 140 | +--- Old Code |
| 141 | ++++ New Code |
| 142 | + /** |
| 143 | +- * @brief Enable flood (unknown unicast or unknown multicast) |
| 144 | ++ * @brief Enable flood (unknown unicast) |
| 145 | + * storm control policer on port. |
| 146 | + * |
| 147 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 148 | + * |
| 149 | + * @type sai_object_id_t |
| 150 | + * @flags CREATE_AND_SET |
| 151 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 152 | + * @allownull true |
| 153 | + * @default SAI_NULL_OBJECT_ID |
| 154 | + */ |
| 155 | + SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID, |
| 156 | +``` |
| 157 | + |
| 158 | +``` |
| 159 | +--- Old Code |
| 160 | ++++ New Code |
| 161 | + /** |
| 162 | +- * @brief Enable multicast storm control policer on port. |
| 163 | ++ * @brief Enable unknown multicast storm control policer on port. |
| 164 | + * |
| 165 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 166 | + * |
| 167 | + * @type sai_object_id_t |
| 168 | + * @flags CREATE_AND_SET |
| 169 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 170 | + * @allownull true |
| 171 | + * @default SAI_NULL_OBJECT_ID |
| 172 | + */ |
| 173 | + SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID, |
| 174 | +``` |
| 175 | + |
| 176 | +### New storm control attributes for KNOWN_MULTICAST and KNOWN_UNICAST |
| 177 | +``` |
| 178 | + /** |
| 179 | + * @brief Enable known multicast storm control policer on port. |
| 180 | + * |
| 181 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 182 | + * |
| 183 | + * @type sai_object_id_t |
| 184 | + * @flags CREATE_AND_SET |
| 185 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 186 | + * @allownull true |
| 187 | + * @default SAI_NULL_OBJECT_ID |
| 188 | + */ |
| 189 | + SAI_PORT_ATTR_KNOWN_MULTICAST_STORM_CONTROL_POLICER_ID, |
| 190 | +
|
| 191 | + /** |
| 192 | + * @brief Enable known unicast storm control policer on port. |
| 193 | + * |
| 194 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 195 | + * |
| 196 | + * @type sai_object_id_t |
| 197 | + * @flags CREATE_AND_SET |
| 198 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 199 | + * @allownull true |
| 200 | + * @default SAI_NULL_OBJECT_ID |
| 201 | + */ |
| 202 | + SAI_PORT_ATTR_KNOWN_UNICAST_STORM_CONTROL_POLICER_ID, |
| 203 | +``` |
| 204 | + |
| 205 | +### Concluded approach |
| 206 | +- Concluded approach shall be captured here with neccessary details. |
0 commit comments