You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/CSIG/SAI-CSIG-Spec.md
+79-91Lines changed: 79 additions & 91 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,81 +147,47 @@ The sai_tam_int_type_t enum specifies types of INT technologies supported by the
147
147
148
148
149
149
### 4.4 TAM INT BW Interval
150
-
The time interval is configured for both the available bandwidth and normalized available bandwidth computations. To support this, new enum has been defined for the configurable time interval values. Additionally, a vendor defined enum has been added to ensure support for vendor-specific time iterval implementations.
150
+
The time interval is configured for both available bandwidth and normalized available bandwidth computations. Two related attributes have been introduced: switch-level attributes to query the number of timers and the specific time interval values.
151
151
152
-
```
153
-
/**
154
-
* @brief Bandwidth time interval units
155
-
*/
156
-
typedef enum _sai_tam_int_bw_time_interval_unit_t
157
-
{
158
-
/**
159
-
* @brief Time interval unit nanosecond
160
-
*/
161
-
SAI_TAM_INT_BW_TIME_INTERVAL_UNIT_NANOSEC,
162
-
163
-
/**
164
-
* @brief Time interval unit microsecond
165
-
*/
166
-
SAI_TAM_INT_BW_TIME_INTERVAL_UNIT_USEC,
167
-
168
-
/**
169
-
* @brief Time interval unit millisecond
170
-
*/
171
-
SAI_TAM_INT_BW_TIME_INTERVAL_UNIT_MSEC,
172
-
173
-
} sai_tam_int_bw_time_interval_unit_t;
152
+
The NOS must first query the supported number of timer intervals and the interval values before programming the timer interval for compact and/or wide tags for ABW and/or ABW/C signals.
174
153
175
-
/**
176
-
* @brief BW time intervals
177
-
*/
178
-
typedef enum _sai_tam_int_bw_time_interval_t
179
-
{
180
-
/**
181
-
* @brief Time window 128
182
-
*/
183
-
SAI_TAM_INT_BW_TIME_INTERVAL_128,
184
-
185
-
/**
186
-
* @brief Time window 256
187
-
*/
188
-
SAI_TAM_INT_BW_TIME_INTERVAL_256,
189
-
190
-
/**
191
-
* @brief Time window 384
192
-
*/
193
-
SAI_TAM_INT_BW_TIME_INTERVAL_384,
154
+
#### 4.4.1 Switch Level Timer Attributes
155
+
Switch level attributes are READ ONLY attributes to learn about implementation's capability.
194
156
157
+
```
195
158
/**
196
-
* @brief Time window 512
159
+
* @brief Maximum number of timers supported for CSIG bandwidth signal
160
+
*
161
+
* @type sai_uint8_t
162
+
* @flags READ_ONLY
197
163
*/
198
-
SAI_TAM_INT_BW_TIME_INTERVAL_512,
164
+
SAI_SWITCH_ATTR_MAX_CSIG_TIMERS,
199
165
200
166
/**
201
-
* @brief Time window 640
167
+
* @brief CSIG Bandwidth time intervals supported in microseconds valid only for available and relative available bandwidth signal type
168
+
*
169
+
* @type sai_u32_list_t
170
+
* @flags READ_ONLY
202
171
*/
203
-
SAI_TAM_INT_BW_TIME_INTERVAL_640,
172
+
SAI_SWITCH_ATTR_CSIG_BW_TIME_INTERVAL_IN_USEC,
204
173
205
-
/**
206
-
* @brief Time window 768
207
-
*/
208
-
SAI_TAM_INT_BW_TIME_INTERVAL_768,
174
+
```
209
175
210
-
/**
211
-
* @brief Time window 896
212
-
*/
213
-
SAI_TAM_INT_BW_TIME_INTERVAL_896,
176
+
#### 4.4.2 TAM Level Timer Attribute
177
+
Time intervals is configured as part of TAM INT object configuration for CSIG.
214
178
179
+
```
215
180
/**
216
-
* @brief Time window 1024
181
+
* @brief Time interval for bandwidth computation in microseconds
182
+
*
183
+
* @type sai_uint32_t
184
+
* @flags CREATE_AND_SET
185
+
* @isvlan false
186
+
* @default 128
187
+
* @validonly SAI_TAM_INT_ATTR_CSIG_SIGNAL_TYPE == SAI_CSIG_SIGNAL_TYPE_ABW or SAI_TAM_INT_ATTR_CSIG_SIGNAL_TYPE == SAI_CSIG_SIGNAL_TYPE_ABWC
217
188
*/
218
-
SAI_TAM_INT_BW_TIME_INTERVAL_1024,
189
+
SAI_TAM_INT_ATTR_BW_TIME_INTERVAL,
219
190
220
-
/**
221
-
* @brief Vendor defined time window
222
-
*/
223
-
SAI_TAM_INT_BW_TIME_INTERVAL_VENDOR_DEFINED,
224
-
} sai_tam_int_bw_time_interval_t;
225
191
```
226
192
227
193
### 4.5 TAM INT Object
@@ -249,25 +215,16 @@ This object has recently been enhanced to support the new CSIG INT type, along w
249
215
SAI_TAM_INT_ATTR_CSIG_SIGNAL_TYPE,
250
216
251
217
/**
252
-
* @brief Time interval for bandwidth computation
218
+
* @brief Time interval for bandwidth computation in microseconds
253
219
*
254
-
* @type sai_tam_int_bw_time_interval_t
220
+
* @type sai_uint32_t
255
221
* @flags CREATE_AND_SET
256
-
* @default SAI_TAM_INT_BW_TIME_INTERVAL_256
222
+
* @isvlan false
223
+
* @default 128
257
224
* @validonly SAI_TAM_INT_ATTR_CSIG_SIGNAL_TYPE == SAI_CSIG_SIGNAL_TYPE_ABW or SAI_TAM_INT_ATTR_CSIG_SIGNAL_TYPE == SAI_CSIG_SIGNAL_TYPE_ABWC
258
225
*/
259
226
SAI_TAM_INT_ATTR_BW_TIME_INTERVAL,
260
227
261
-
/**
262
-
* @brief Bandwidth time Interval Units
263
-
*
264
-
* @type sai_tam_int_bw_time_interval_unit_t
265
-
* @flags CREATE_AND_SET
266
-
* @default SAI_TAM_INT_BW_TIME_INTERVAL_UNIT_USEC
267
-
* @validonly SAI_TAM_INT_ATTR_CSIG_SIGNAL_TYPE == SAI_CSIG_SIGNAL_TYPE_ABW or SAI_TAM_INT_ATTR_CSIG_SIGNAL_TYPE == SAI_CSIG_SIGNAL_TYPE_ABWC
268
-
*/
269
-
SAI_TAM_INT_ATTR_BW_TIME_INTERVAL_UNIT,
270
-
271
228
/**
272
229
* @brief Number of quantization bands
273
230
* Compact tag supports maximum of 32 bands and wide tag supports maximum of 1048576 bands
@@ -279,14 +236,26 @@ This object has recently been enhanced to support the new CSIG INT type, along w
279
236
*/
280
237
SAI_TAM_INT_ATTR_QUANT_BANDS,
281
238
239
+
/**
240
+
* @brief Quantization bands identifier
241
+
* Number of identifiers specified MUST match the number of quantization bands configured for compact tag
242
+
*
243
+
* @type sai_u16_list_t
244
+
* @flags CREATE_AND_SET
245
+
* @default empty
246
+
* @validonly SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_COMPACT or SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_WIDE
247
+
*/
248
+
SAI_TAM_INT_ATTR_QUANT_BAND_ID,
249
+
282
250
/**
283
251
* @brief Quantization band range values for compact tag
284
252
*
285
253
* @type sai_u64_range_list_t
286
254
* @flags CREATE_AND_SET
287
255
* @default empty
256
+
* @validonly SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_COMPACT or SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_WIDE
288
257
*/
289
-
SAI_TAM_INT_ATTR_QUANT_BAND_UINT32_RANGE_LIST,
258
+
SAI_TAM_INT_ATTR_QUANT_BAND_UINT64_RANGE_LIST,
290
259
291
260
/**
292
261
* @brief Base value for wide tag quantization. Must be 0 or power of 2
@@ -303,7 +272,7 @@ This object has recently been enhanced to support the new CSIG INT type, along w
@@ -318,17 +287,22 @@ This object has recently been enhanced to support the new CSIG INT type, along w
318
287
* @validonly SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_COMPACT or SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_WIDE
319
288
*/
320
289
SAI_TAM_INT_ATTR_CSIG_D_BIT,
290
+
321
291
```
322
292
323
-
**New Data Type for u32 list**
293
+
**New Data Type for u64 list**
324
294
```
325
-
typedef struct _sai_u32_range_list_t
295
+
typedef struct _sai_u64_range_list_t
326
296
{
327
297
uint32_t count;
328
-
sai_u32_range_t *list;
329
-
} sai_u32_range_list_t;
298
+
sai_u64_range_t *list;
299
+
} sai_u64_range_list_t;
330
300
```
331
301
302
+
**Quantization Band ID**
303
+
Default band id or bucket id for the qunatization is implicit starting from 0 and increases lineraly.
304
+
New attribute SAI_TAM_INT_ATTR_QUANT_BAND_ID allows NOS to assign a band id or bucket id to individual quantization bands randomly. This is done to support an implementation that may require a mapping to hw index allocation of quantization buckets or may want to map it on e.g. vlan id for overloading hw tables structures. This is an optional feature and can be ignored if not needed.
305
+
332
306
### 4.6 ACL Match Fields
333
307
The ACL infrastructure supports matching specific fields within a packet and is enhanced to include CSIG tag fields. This functionality is crucial for developing policies based on CSIG tags with flags set, as explained further in the workflow section.
334
308
New match for compact and wide tag EtherType and Signal type is introduced.
@@ -341,19 +315,20 @@ New match for compact and wide tag EtherType and Signal type is introduced.
341
315
*/
342
316
typedef enum _sai_csig_signal_type_t
343
317
{
344
-
/** Available Bandwidth */
318
+
/** Available Bandwidth in bytes per second */
345
319
SAI_CSIG_SIGNAL_TYPE_ABW = 0,
346
320
347
-
/** Normalized Available Bandwidth */
321
+
/** Normalized Available Bandwidth in percentage */
348
322
SAI_CSIG_SIGNAL_TYPE_ABWC = 1,
349
323
350
-
/** Delay */
324
+
/** Delay in nanoseconds */
351
325
SAI_CSIG_SIGNAL_TYPE_DELAY = 2,
352
326
353
-
/** Normalized Queue Depth */
327
+
/** Normalized Queue Depth, in flight bytes divided by normalized port speed */
354
328
SAI_CSIG_SIGNAL_TYPE_NQD = 3,
355
329
356
330
} sai_csig_signal_type_t;
331
+
357
332
```
358
333
359
334
**Table Fields**
@@ -481,6 +456,16 @@ Switch attribute specifies number of bandwidth timers a given implementation sup
481
456
* @flags READ_ONLY
482
457
*/
483
458
SAI_SWITCH_ATTR_MAX_CSIG_TIMERS,
459
+
460
+
/**
461
+
* @brief CSIG Bandwidth time intervals supported in microseconds valid only for available and relative available bandwidth signal type
@@ -594,7 +575,14 @@ Create TAM objects as described in section 5.1.1 and 5.1.2
594
575
Step 2:
595
576
Install an ACL rule to match CSIG ethtype and set the action as insert and bind the ACL Table to the switch
596
577
- match <SAI_ACL_ENTRY_ATTR_FIELD_CSIG_COMPACT_ETHER_TYPE> action <SAI_ACL_ENTRY_ATTR_ACTION_INT_INSERT, sai_tam_int_csig_compact_tag_object>
597
-
- match <SAI_ACL_ENTRY_ATTR_FIELD_CSIG_WIDE_ETHER_TYPE> action <SAI_ACL_ENTRY_ATTR_ACTION_INT_INSERT, sai_tam_int_csig_wide_tag_object>
578
+
- match <SAI_ACL_ENTRY_ATTR_FIELD_CSIG_WIDE_ETHER_TYPE> action <SAI_ACL_ENTRY_ATTR_ACTION_INT_INSERT, sai_tam_int_csig_wide_tag_object>
579
+
580
+
or
581
+
582
+
Step2:
583
+
584
+
Create a contain TAM object for TAM INT object and bind it to switch attribute SAI_SWITCH_ATTR_TAM_OBJECT_ID. Mutiple TAM INT objects can be created under single TAM object to support different signal types and time intervals.
585
+
598
586
599
587
#### 5.1.4 Enable CSIG for subset of ingress ports
0 commit comments