|
| 1 | +# [SAI] Port Storm Control Enhancements |
| 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 consistent behavior across SONiC platforms |
| 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 | + |
| 34 | +In order to have more clarity of usage, either description of the above SAI attribute needs change or new attributes for specific flood control are needed. |
| 35 | + |
| 36 | +By either introducing explicit new attributes or refining the existing definitions, SAI can more accurately reflect SONiC’s actual usage model, enabling consistent behavior, reducing confusion, and supporting future enhancements. |
| 37 | + |
| 38 | +In this proposal, two options are given and the better one should be opted. |
| 39 | + |
| 40 | +## Option - 1 : New attributes for Storm Control |
| 41 | + |
| 42 | +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. |
| 43 | + |
| 44 | +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. |
| 45 | + |
| 46 | +### Deprecation of SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID |
| 47 | +``` |
| 48 | +--- Old Code |
| 49 | ++++ New Code |
| 50 | + /** |
| 51 | + * @brief Enable flood (unknown unicast or unknown multicast) |
| 52 | + * storm control policer on port. |
| 53 | ++ * Deprecated. Use SAI_PORT_ATTR_UNKNOWN_UNICAST_STORM_CONTROL_POLICER_ID and SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID |
| 54 | + * |
| 55 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 56 | + * |
| 57 | + * @type sai_object_id_t |
| 58 | + * @flags CREATE_AND_SET |
| 59 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 60 | + * @allownull true |
| 61 | + * @default SAI_NULL_OBJECT_ID |
| 62 | ++ * @deprecated true |
| 63 | + */ |
| 64 | + SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID, |
| 65 | +``` |
| 66 | +### Description change of SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID |
| 67 | +``` |
| 68 | +--- Old Code |
| 69 | ++++ New Code |
| 70 | + /** |
| 71 | +- * @brief Enable multicast storm control policer on port. |
| 72 | ++ * @brief Enable unknown multicast storm control policer on port. |
| 73 | + * |
| 74 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 75 | + * |
| 76 | + * @type sai_object_id_t |
| 77 | + * @flags CREATE_AND_SET |
| 78 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 79 | + * @allownull true |
| 80 | + * @default SAI_NULL_OBJECT_ID |
| 81 | + */ |
| 82 | + SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID, |
| 83 | +``` |
| 84 | + |
| 85 | +### New port storm control attributes |
| 86 | +``` |
| 87 | +/** |
| 88 | + * @brief Enable flood (for unknown unicast traffic) |
| 89 | + * storm control policer on port. |
| 90 | + * |
| 91 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 92 | + * |
| 93 | + * @type sai_object_id_t |
| 94 | + * @flags CREATE_AND_SET |
| 95 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 96 | + * @allownull true |
| 97 | + * @default SAI_NULL_OBJECT_ID |
| 98 | + */ |
| 99 | + SAI_PORT_ATTR_UNKNOWN_UNICAST_STORM_CONTROL_POLICER_ID, |
| 100 | +
|
| 101 | + /** |
| 102 | + * @brief Enable known multicast storm control policer on port. |
| 103 | + * |
| 104 | + * Set Policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 105 | + * |
| 106 | + * @type sai_object_id_t |
| 107 | + * @flags CREATE_AND_SET |
| 108 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 109 | + * @allownull true |
| 110 | + * @default SAI_NULL_OBJECT_ID |
| 111 | + */ |
| 112 | + SAI_PORT_ATTR_KNOWN_MULTICAST_STORM_CONTROL_POLICER_ID, |
| 113 | +
|
| 114 | + /** |
| 115 | + * @brief Enable flood (for known unicast traffic) |
| 116 | + * storm control policer on port. |
| 117 | + * |
| 118 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 119 | + * |
| 120 | + * @type sai_object_id_t |
| 121 | + * @flags CREATE_AND_SET |
| 122 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 123 | + * @allownull true |
| 124 | + * @default SAI_NULL_OBJECT_ID |
| 125 | + */ |
| 126 | + SAI_PORT_ATTR_KNOWN_UNICAST_STORM_CONTROL_POLICER_ID, |
| 127 | +``` |
| 128 | + |
| 129 | +Option-1 changes are also included as code changes in this PR. |
| 130 | + |
| 131 | +## Option - 2 : SAI Attribute description change |
| 132 | + |
| 133 | +There are two minor header changes to be inline with SONiC behaviour expectation, |
| 134 | +And also two new storm-control attributes for Known multicast and known unicast storm. |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | +### Description change for FLOOD_STORM_CONTROL and MULTICAST_STORM_CONTROL attributes |
| 139 | + |
| 140 | +``` |
| 141 | +--- Old Code |
| 142 | ++++ New Code |
| 143 | + /** |
| 144 | +- * @brief Enable flood (unknown unicast or unknown multicast) |
| 145 | ++ * @brief Enable flood (unknown unicast) |
| 146 | + * storm control policer on port. |
| 147 | + * |
| 148 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 149 | + * |
| 150 | + * @type sai_object_id_t |
| 151 | + * @flags CREATE_AND_SET |
| 152 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 153 | + * @allownull true |
| 154 | + * @default SAI_NULL_OBJECT_ID |
| 155 | + */ |
| 156 | + SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID, |
| 157 | +``` |
| 158 | + |
| 159 | +``` |
| 160 | +--- Old Code |
| 161 | ++++ New Code |
| 162 | + /** |
| 163 | +- * @brief Enable multicast storm control policer on port. |
| 164 | ++ * @brief Enable unknown multicast storm control policer on port. |
| 165 | + * |
| 166 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 167 | + * |
| 168 | + * @type sai_object_id_t |
| 169 | + * @flags CREATE_AND_SET |
| 170 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 171 | + * @allownull true |
| 172 | + * @default SAI_NULL_OBJECT_ID |
| 173 | + */ |
| 174 | + SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID, |
| 175 | +``` |
| 176 | + |
| 177 | +### New storm control attributes for KNOWN_MULTICAST and KNOWN_UNICAST |
| 178 | +``` |
| 179 | + /** |
| 180 | + * @brief Enable known multicast storm control policer on port. |
| 181 | + * |
| 182 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 183 | + * |
| 184 | + * @type sai_object_id_t |
| 185 | + * @flags CREATE_AND_SET |
| 186 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 187 | + * @allownull true |
| 188 | + * @default SAI_NULL_OBJECT_ID |
| 189 | + */ |
| 190 | + SAI_PORT_ATTR_KNOWN_MULTICAST_STORM_CONTROL_POLICER_ID, |
| 191 | +
|
| 192 | + /** |
| 193 | + * @brief Enable known unicast storm control policer on port. |
| 194 | + * |
| 195 | + * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port. |
| 196 | + * |
| 197 | + * @type sai_object_id_t |
| 198 | + * @flags CREATE_AND_SET |
| 199 | + * @objects SAI_OBJECT_TYPE_POLICER |
| 200 | + * @allownull true |
| 201 | + * @default SAI_NULL_OBJECT_ID |
| 202 | + */ |
| 203 | + SAI_PORT_ATTR_KNOWN_UNICAST_STORM_CONTROL_POLICER_ID, |
| 204 | +``` |
| 205 | + |
| 206 | +### Concluded approach |
| 207 | +- Concluded approach shall be captured here with neccessary details. |
0 commit comments