Skip to content

Commit 368a587

Browse files
committed
UEC CSIG Protocol
Signed-off-by: JaiOCP <jai.kumar@broadcom.com> UEC CSIG Protocol Signed-off-by: JaiOCP <jai.kumar@broadcom.com> UEC CSIG Protocol Signed-off-by: JaiOCP <jai.kumar@broadcom.com> UEC CSIG Protocol Signed-off-by: JaiOCP <jai.kumar@broadcom.com>
1 parent e84c11c commit 368a587

12 files changed

Lines changed: 973 additions & 4 deletions

doc/CSIG/CSIG-Tag.png

205 KB
Loading

doc/CSIG/Life-Of-CSIG-Packet.png

214 KB
Loading

doc/CSIG/SAI-CSIG-Spec.md

Lines changed: 689 additions & 0 deletions
Large diffs are not rendered by default.

doc/CSIG/TAM-Object.png

54.6 KB
Loading

inc/saiacl.h

Lines changed: 96 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,26 @@ typedef enum _sai_acl_dtel_flow_op_t
113113

114114
} sai_acl_dtel_flow_op_t;
115115

116+
/**
117+
* @brief CSIG Signal Type
118+
* Value of signal in the specification is maintained in the enum order.
119+
*/
120+
typedef enum _sai_csig_signal_type_t
121+
{
122+
/** Available Bandwidth in bytes per second */
123+
SAI_CSIG_SIGNAL_TYPE_ABW = 0,
124+
125+
/** Normalized Available Bandwidth in percentage */
126+
SAI_CSIG_SIGNAL_TYPE_ABWC = 1,
127+
128+
/** Delay in nanoseconds */
129+
SAI_CSIG_SIGNAL_TYPE_DELAY = 2,
130+
131+
/** Normalized Queue Depth, in flight bytes divided by normalized port speed */
132+
SAI_CSIG_SIGNAL_TYPE_NQD = 3,
133+
134+
} sai_csig_signal_type_t;
135+
116136
/**
117137
* @brief ACL Action Type
118138
*/
@@ -1588,10 +1608,46 @@ typedef enum _sai_acl_table_attr_t
15881608
*/
15891609
SAI_ACL_TABLE_ATTR_FIELD_NEXT_HOP_USER_META = SAI_ACL_TABLE_ATTR_FIELD_START + 0x162,
15901610

1611+
/**
1612+
* @brief CSIG Compact Tag Ether Type
1613+
*
1614+
* @type bool
1615+
* @flags CREATE_ONLY
1616+
* @default false
1617+
*/
1618+
SAI_ACL_TABLE_ATTR_FIELD_CSIG_COMPACT_TAG_ETHER_TYPE = SAI_ACL_TABLE_ATTR_FIELD_START + 0x163,
1619+
1620+
/**
1621+
* @brief CSIG Wide Tag Ether Type
1622+
*
1623+
* @type bool
1624+
* @flags CREATE_ONLY
1625+
* @default false
1626+
*/
1627+
SAI_ACL_TABLE_ATTR_FIELD_CSIG_WIDE_TAG_ETHER_TYPE = SAI_ACL_TABLE_ATTR_FIELD_START + 0x164,
1628+
1629+
/**
1630+
* @brief CSIG Signal Type
1631+
*
1632+
* @type bool
1633+
* @flags CREATE_ONLY
1634+
* @default false
1635+
*/
1636+
SAI_ACL_TABLE_ATTR_FIELD_CSIG_SIGNAL_TYPE = SAI_ACL_TABLE_ATTR_FIELD_START + 0x165,
1637+
1638+
/**
1639+
* @brief CSIG D Bit
1640+
*
1641+
* @type bool
1642+
* @flags CREATE_ONLY
1643+
* @default false
1644+
*/
1645+
SAI_ACL_TABLE_ATTR_FIELD_CSIG_D_BIT = SAI_ACL_TABLE_ATTR_FIELD_START + 0x166,
1646+
15911647
/**
15921648
* @brief End of ACL Table Match Field
15931649
*/
1594-
SAI_ACL_TABLE_ATTR_FIELD_END = SAI_ACL_TABLE_ATTR_FIELD_NEXT_HOP_USER_META,
1650+
SAI_ACL_TABLE_ATTR_FIELD_END = SAI_ACL_TABLE_ATTR_FIELD_CSIG_D_BIT,
15951651

15961652
/**
15971653
* @brief ACL table entries associated with this table.
@@ -2728,10 +2784,48 @@ typedef enum _sai_acl_entry_attr_t
27282784
*/
27292785
SAI_ACL_ENTRY_ATTR_FIELD_NEXT_HOP_USER_META = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x162,
27302786

2787+
/**
2788+
* @brief CSIG Compact Tag Ether Type
2789+
*
2790+
* @type sai_acl_field_data_t sai_uint16_t
2791+
* @flags CREATE_AND_SET
2792+
* @isvlan false
2793+
* @default disabled
2794+
*/
2795+
SAI_ACL_ENTRY_ATTR_FIELD_CSIG_COMPACT_TAG_ETHER_TYPE = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x163,
2796+
2797+
/**
2798+
* @brief CSIG Wide Tag Ether Type
2799+
*
2800+
* @type sai_acl_field_data_t sai_uint16_t
2801+
* @flags CREATE_AND_SET
2802+
* @isvlan false
2803+
* @default disabled
2804+
*/
2805+
SAI_ACL_ENTRY_ATTR_FIELD_CSIG_WIDE_TAG_ETHER_TYPE = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x164,
2806+
2807+
/**
2808+
* @brief CSIG Signal Type
2809+
*
2810+
* @type sai_acl_field_data_t sai_csig_signal_type_t
2811+
* @flags CREATE_AND_SET
2812+
* @default disabled
2813+
*/
2814+
SAI_ACL_ENTRY_ATTR_FIELD_CSIG_SIGNAL_TYPE = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x165,
2815+
2816+
/**
2817+
* @brief CSIG D Bit
2818+
*
2819+
* @type sai_acl_field_data_t sai_uint8_t
2820+
* @flags CREATE_AND_SET
2821+
* @default disabled
2822+
*/
2823+
SAI_ACL_ENTRY_ATTR_FIELD_CSIG_D_BIT = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x166,
2824+
27312825
/**
27322826
* @brief End of Rule Match Fields
27332827
*/
2734-
SAI_ACL_ENTRY_ATTR_FIELD_END = SAI_ACL_ENTRY_ATTR_FIELD_NEXT_HOP_USER_META,
2828+
SAI_ACL_ENTRY_ATTR_FIELD_END = SAI_ACL_ENTRY_ATTR_FIELD_CSIG_D_BIT,
27352829

27362830
/*
27372831
* Actions [sai_acl_action_data_t]

inc/saiport.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2925,6 +2925,25 @@ typedef enum _sai_port_attr_t
29252925
*/
29262926
SAI_PORT_ATTR_LINK_UP_DEBOUNCE_TIMEOUT,
29272927

2928+
/**
2929+
* @brief Enable INT metadata deletion
2930+
*
2931+
* @type bool
2932+
* @flags CREATE_AND_SET
2933+
* @default false
2934+
*/
2935+
SAI_PORT_ATTR_INT_DELETE,
2936+
2937+
/**
2938+
* @brief INT metadata
2939+
*
2940+
* @type sai_uint16_t
2941+
* @flags CREATE_AND_SET
2942+
* @isvlan false
2943+
* @default 0
2944+
*/
2945+
SAI_PORT_ATTR_INT_METADATA,
2946+
29282947
/**
29292948
* @brief End of attributes
29302949
*/

inc/saiswitch.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3550,6 +3550,22 @@ typedef enum _sai_switch_attr_t
35503550
*/
35513551
SAI_SWITCH_ATTR_LINK_UP_DEBOUNCE_TIMEOUT,
35523552

3553+
/**
3554+
* @brief Maximum number of timers supported for CSIG bandwidth signal
3555+
*
3556+
* @type sai_uint8_t
3557+
* @flags READ_ONLY
3558+
*/
3559+
SAI_SWITCH_ATTR_MAX_CSIG_TIMERS,
3560+
3561+
/**
3562+
* @brief CSIG Bandwidth time intervals supported in microseconds valid only for available and relative available bandwidth signal type
3563+
*
3564+
* @type sai_u32_list_t
3565+
* @flags READ_ONLY
3566+
*/
3567+
SAI_SWITCH_ATTR_CSIG_BW_TIME_INTERVAL_IN_USEC,
3568+
35533569
/**
35543570
* @brief End of attributes
35553571
*/

inc/saitam.h

Lines changed: 107 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,15 @@ typedef enum _sai_tam_int_type_t
484484
*/
485485
SAI_TAM_INT_TYPE_PATH_TRACING,
486486

487+
/**
488+
* @brief INT type Congestion Signaling compact tag
489+
*/
490+
SAI_TAM_INT_TYPE_CSIG_COMPACT,
491+
492+
/**
493+
* @brief INT type Congestion Signaling wide tag
494+
*/
495+
SAI_TAM_INT_TYPE_CSIG_WIDE,
487496
} sai_tam_int_type_t;
488497

489498
/**
@@ -512,8 +521,12 @@ typedef enum _sai_tam_int_presence_type_t
512521
/**
513522
* @brief INT presence type DSCP
514523
*/
515-
SAI_TAM_INT_PRESENCE_TYPE_DSCP
524+
SAI_TAM_INT_PRESENCE_TYPE_DSCP,
516525

526+
/**
527+
* @brief INT presence type Ether Type Code Point
528+
*/
529+
SAI_TAM_INT_PRESENCE_TYPE_ETH_TYPE,
517530
} sai_tam_int_presence_type_t;
518531

519532
/**
@@ -801,6 +814,99 @@ typedef enum _sai_tam_int_attr_t
801814
*/
802815
SAI_TAM_INT_ATTR_REPORT_ID,
803816

817+
/**
818+
* @brief Ethernet code point value that indicates presence of CSIG compact tag in a packet
819+
*
820+
* @type sai_uint16_t
821+
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
822+
* @isvlan false
823+
* @condition SAI_TAM_INT_ATTR_INT_PRESENCE_TYPE == SAI_TAM_INT_PRESENCE_TYPE_ETH_TYPE
824+
*/
825+
SAI_TAM_INT_ATTR_ETH_TYPE_CODE_POINT,
826+
827+
/**
828+
* @brief CSIG signal type
829+
*
830+
* @type sai_csig_signal_type_t
831+
* @flags CREATE_AND_SET
832+
* @default SAI_CSIG_SIGNAL_TYPE_ABW
833+
*/
834+
SAI_TAM_INT_ATTR_CSIG_SIGNAL_TYPE,
835+
836+
/**
837+
* @brief Time interval for bandwidth computation in microseconds
838+
*
839+
* @type sai_uint32_t
840+
* @flags CREATE_AND_SET
841+
* @isvlan false
842+
* @default 128
843+
* @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
844+
*/
845+
SAI_TAM_INT_ATTR_BW_TIME_INTERVAL,
846+
847+
/**
848+
* @brief Number of quantization bands
849+
* Compact tag supports maximum of 32 bands and wide tag supports maximum of 1048576 bands
850+
*
851+
* @type sai_uint32_t
852+
* @flags CREATE_AND_SET
853+
* @default 32
854+
* @validonly SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_COMPACT or SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_WIDE
855+
*/
856+
SAI_TAM_INT_ATTR_QUANT_BANDS,
857+
858+
/**
859+
* @brief Quantization bands identifier
860+
* Number of identifiers specified MUST match the number of quantization bands configured for compact tag
861+
*
862+
* @type sai_u16_list_t
863+
* @flags CREATE_AND_SET
864+
* @default empty
865+
* @validonly SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_COMPACT or SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_WIDE
866+
*/
867+
SAI_TAM_INT_ATTR_QUANT_BAND_ID,
868+
869+
/**
870+
* @brief Quantization band range values for compact tag
871+
*
872+
* @type sai_u64_range_list_t
873+
* @flags CREATE_AND_SET
874+
* @default empty
875+
* @validonly SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_COMPACT or SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_WIDE
876+
*/
877+
SAI_TAM_INT_ATTR_QUANT_BAND_UINT64_RANGE_LIST,
878+
879+
/**
880+
* @brief Base value for wide tag quantization. Must be 0 or power of 2
881+
*
882+
* @type sai_uint32_t
883+
* @flags CREATE_AND_SET
884+
* @default 0
885+
* @validonly SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_WIDE
886+
*/
887+
SAI_TAM_INT_ATTR_WIDE_QUANT_BASE_VALUE,
888+
889+
/**
890+
* @brief Step value for wide tag quantization. Must be power of 2
891+
*
892+
* @type sai_uint32_t
893+
* @flags CREATE_AND_SET
894+
* @default 1
895+
* @validonly SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_WIDE
896+
*/
897+
SAI_TAM_INT_ATTR_WIDE_QUANT_STEP_VALUE,
898+
899+
/**
900+
* @brief Update the D bit indicating the packet is trimmed
901+
* DSCP value configured for TRIM packets comes from the TRIM configuration
902+
*
903+
* @type bool
904+
* @flags CREATE_AND_SET
905+
* @default false
906+
* @validonly SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_COMPACT or SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_WIDE
907+
*/
908+
SAI_TAM_INT_ATTR_CSIG_D_BIT,
909+
804910
/**
805911
* @brief End of Attributes
806912
*/

inc/saitypes.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,12 +374,24 @@ typedef struct _sai_u16_range_t
374374
uint16_t max;
375375
} sai_u16_range_t;
376376

377+
typedef struct _sai_u64_range_t
378+
{
379+
uint64_t min;
380+
uint64_t max;
381+
} sai_u64_range_t;
382+
377383
typedef struct _sai_u16_range_list_t
378384
{
379385
uint32_t count;
380386
sai_u16_range_t *list;
381387
} sai_u16_range_list_t;
382388

389+
typedef struct _sai_u64_range_list_t
390+
{
391+
uint32_t count;
392+
sai_u64_range_t *list;
393+
} sai_u64_range_list_t;
394+
383395
/**
384396
* @brief Defines a vlan list data structure
385397
*/
@@ -1779,6 +1791,12 @@ typedef union _sai_attribute_value_t
17791791
/** @validonly meta->attrvaluetype == SAI_ATTR_VALUE_TYPE_PRBS_PER_LANE_BIT_ERROR_RATE_LIST */
17801792
sai_prbs_per_lane_bit_error_rate_list_t prbs_ber_list;
17811793

1794+
/** @validonly meta->attrvaluetype == SAI_ATTR_VALUE_TYPE_UINT64_RANGE */
1795+
sai_u64_range_t u64range;
1796+
1797+
/** @validonly meta->attrvaluetype == SAI_ATTR_VALUE_TYPE_UINT64_RANGE_LIST */
1798+
sai_u64_range_list_t u64rangelist;
1799+
17821800
} sai_attribute_value_t;
17831801

17841802
/**

meta/acronyms.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ CMIS - Common Management Interface Specification
2828
CPLD - Complex programmable logic device
2929
CPU - Central Processing Unit
3030
CRC - Cyclic Redundancy Code
31+
CSIG - Congestion Signaling
3132
DFE - Decision Feedback Equalizer
3233
DHCP - Dynamic Host Configuration Protocol
3334
DHCPV6 - Dynamic Host Configuration Protocol for IPv6

0 commit comments

Comments
 (0)