Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added doc/CSIG/CSIG-Tag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/CSIG/Life-Of-CSIG-Packet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
674 changes: 674 additions & 0 deletions doc/CSIG/SAI-CSIG-Spec.md

Large diffs are not rendered by default.

Binary file added doc/CSIG/TAM-Object.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 96 additions & 2 deletions inc/saiacl.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,26 @@ typedef enum _sai_acl_dtel_flow_op_t

} sai_acl_dtel_flow_op_t;

/**
* @brief CSIG Signal Type
* Value of signal in the specification is maintained in the enum order.
*/
typedef enum _sai_csig_signal_type_t
{
/** Available Bandwidth */
SAI_CSIG_SIGNAL_TYPE_ABW = 0,

/** Normalized Available Bandwidth */
SAI_CSIG_SIGNAL_TYPE_ABWC = 1,

/** Delay */
SAI_CSIG_SIGNAL_TYPE_DELAY = 2,

/** Normalized Queue Depth */
SAI_CSIG_SIGNAL_TYPE_NQD = 3,

} sai_csig_signal_type_t;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Units for each signal type

/**
* @brief ACL Action Type
*/
Expand Down Expand Up @@ -1588,10 +1608,46 @@ typedef enum _sai_acl_table_attr_t
*/
SAI_ACL_TABLE_ATTR_FIELD_NEXT_HOP_USER_META = SAI_ACL_TABLE_ATTR_FIELD_START + 0x162,

/**
* @brief CSIG Compact Tag Ether Type
*
* @type bool
* @flags CREATE_ONLY
* @default false
*/
SAI_ACL_TABLE_ATTR_FIELD_CSIG_COMPACT_TAG_ETHER_TYPE = SAI_ACL_TABLE_ATTR_FIELD_START + 0x163,

/**
* @brief CSIG Wide Tag Ether Type
*
* @type bool
* @flags CREATE_ONLY
* @default false
*/
SAI_ACL_TABLE_ATTR_FIELD_CSIG_WIDE_TAG_ETHER_TYPE = SAI_ACL_TABLE_ATTR_FIELD_START + 0x164,

/**
* @brief CSIG Signal Type
*
* @type bool
* @flags CREATE_ONLY
* @default false
*/
SAI_ACL_TABLE_ATTR_FIELD_CSIG_SIGNAL_TYPE = SAI_ACL_TABLE_ATTR_FIELD_START + 0x165,

/**
* @brief CSIG D Bit
*
* @type bool
* @flags CREATE_ONLY
* @default false
*/
SAI_ACL_TABLE_ATTR_FIELD_CSIG_D_BIT = SAI_ACL_TABLE_ATTR_FIELD_START + 0x166,

/**
* @brief End of ACL Table Match Field
*/
SAI_ACL_TABLE_ATTR_FIELD_END = SAI_ACL_TABLE_ATTR_FIELD_NEXT_HOP_USER_META,
SAI_ACL_TABLE_ATTR_FIELD_END = SAI_ACL_TABLE_ATTR_FIELD_CSIG_D_BIT,

/**
* @brief ACL table entries associated with this table.
Expand Down Expand Up @@ -2728,10 +2784,48 @@ typedef enum _sai_acl_entry_attr_t
*/
SAI_ACL_ENTRY_ATTR_FIELD_NEXT_HOP_USER_META = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x162,

/**
* @brief CSIG Compact Tag Ether Type
*
* @type sai_acl_field_data_t sai_uint16_t
* @flags CREATE_AND_SET
* @isvlan false
* @default disabled
*/
SAI_ACL_ENTRY_ATTR_FIELD_CSIG_COMPACT_TAG_ETHER_TYPE = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x163,

/**
* @brief CSIG Wide Tag Ether Type
*
* @type sai_acl_field_data_t sai_uint16_t
* @flags CREATE_AND_SET
* @isvlan false
* @default disabled
*/
SAI_ACL_ENTRY_ATTR_FIELD_CSIG_WIDE_TAG_ETHER_TYPE = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x164,

/**
* @brief CSIG Signal Type
*
* @type sai_acl_field_data_t sai_csig_signal_type_t
* @flags CREATE_AND_SET
* @default disabled
*/
SAI_ACL_ENTRY_ATTR_FIELD_CSIG_SIGNAL_TYPE = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x165,

/**
* @brief CSIG D Bit
*
* @type sai_acl_field_data_t sai_uint8_t
* @flags CREATE_AND_SET
* @default disabled
*/
SAI_ACL_ENTRY_ATTR_FIELD_CSIG_D_BIT = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x166,

/**
* @brief End of Rule Match Fields
*/
SAI_ACL_ENTRY_ATTR_FIELD_END = SAI_ACL_ENTRY_ATTR_FIELD_NEXT_HOP_USER_META,
SAI_ACL_ENTRY_ATTR_FIELD_END = SAI_ACL_ENTRY_ATTR_FIELD_CSIG_D_BIT,

/*
* Actions [sai_acl_action_data_t]
Expand Down
19 changes: 19 additions & 0 deletions inc/saiport.h
Original file line number Diff line number Diff line change
Expand Up @@ -2798,6 +2798,25 @@ typedef enum _sai_port_attr_t
*/
SAI_PORT_ATTR_PORT_PG_PKT_DROP_STATUS,

/**
* @brief Enable INT metadata deletion
*
* @type bool
* @flags CREATE_AND_SET
* @default false
*/
SAI_PORT_ATTR_INT_DELETE,

/**
* @brief INT metadata
*
* @type sai_uint16_t
* @flags CREATE_AND_SET
* @isvlan false
* @default 0
*/
SAI_PORT_ATTR_INT_METADATA,

/**
* @brief End of attributes
*/
Expand Down
21 changes: 21 additions & 0 deletions inc/saiswitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -3539,6 +3539,27 @@ typedef enum _sai_switch_attr_t
*/
SAI_SWITCH_ATTR_FAST_LINKUP_BER_THRESHOLD,

/**
* @brief Maximum number of timers supported for CSIG bandwidth signal
*
* @type sai_uint8_t
* @flags READ_ONLY
*/
SAI_SWITCH_ATTR_MAX_CSIG_TIMERS,

/**
* @brief TAM INT bind point
*
* Bind (or unbind) the TAM INT object.
* SAI_NULL_OBJECT_ID in the attribute value.
*
* @type sai_object_list_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_TAM_INT
* @default empty
*/
SAI_SWITCH_ATTR_TAM_INT_OBJECT_ID,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conclusion was to use the existing SAI_SWITCH_ATTR_TAM_OBJECT_ID->TAM_INT instead of adding a new TAM_INT object.


/**
* @brief End of attributes
*/
Expand Down
179 changes: 178 additions & 1 deletion inc/saitam.h
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,15 @@ typedef enum _sai_tam_int_type_t
*/
SAI_TAM_INT_TYPE_PATH_TRACING,

/**
* @brief INT type Congestion Signaling compact tag
*/
SAI_TAM_INT_TYPE_CSIG_COMPACT,

/**
* @brief INT type Congestion Signaling wide tag
*/
SAI_TAM_INT_TYPE_CSIG_WIDE,
} sai_tam_int_type_t;

/**
Expand Down Expand Up @@ -512,10 +521,87 @@ typedef enum _sai_tam_int_presence_type_t
/**
* @brief INT presence type DSCP
*/
SAI_TAM_INT_PRESENCE_TYPE_DSCP
SAI_TAM_INT_PRESENCE_TYPE_DSCP,

/**
* @brief INT presence type Ether Type Code Point
*/
SAI_TAM_INT_PRESENCE_TYPE_ETH_TYPE,
} sai_tam_int_presence_type_t;

/**
* @brief Bandwidth time interval units
*/
typedef enum _sai_tam_int_bw_time_interval_unit_t
{
/**
* @brief Time interval unit nanosecond
*/
SAI_TAM_INT_BW_TIME_INTERVAL_UNIT_NANOSEC,

/**
* @brief Time interval unit microsecond
*/
SAI_TAM_INT_BW_TIME_INTERVAL_UNIT_USEC,

/**
* @brief Time interval unit millisecond
*/
SAI_TAM_INT_BW_TIME_INTERVAL_UNIT_MSEC,

} sai_tam_int_bw_time_interval_unit_t;

/**
* @brief BW time intervals
*/
typedef enum _sai_tam_int_bw_time_interval_t
{
/**
* @brief Time window 128
*/
SAI_TAM_INT_BW_TIME_INTERVAL_128,

/**
* @brief Time window 256
*/
SAI_TAM_INT_BW_TIME_INTERVAL_256,

/**
* @brief Time window 384
*/
SAI_TAM_INT_BW_TIME_INTERVAL_384,

/**
* @brief Time window 512
*/
SAI_TAM_INT_BW_TIME_INTERVAL_512,

/**
* @brief Time window 640
*/
SAI_TAM_INT_BW_TIME_INTERVAL_640,

/**
* @brief Time window 768
*/
SAI_TAM_INT_BW_TIME_INTERVAL_768,

/**
* @brief Time window 896
*/
SAI_TAM_INT_BW_TIME_INTERVAL_896,

/**
* @brief Time window 1024
*/
SAI_TAM_INT_BW_TIME_INTERVAL_1024,

/**
* @brief Vendor defined time window
*/
SAI_TAM_INT_BW_TIME_INTERVAL_VENDOR_DEFINED,
} sai_tam_int_bw_time_interval_t;

/**
* @brief Attributes for TAM INT
*/
Expand Down Expand Up @@ -801,6 +887,97 @@ typedef enum _sai_tam_int_attr_t
*/
SAI_TAM_INT_ATTR_REPORT_ID,

/**
* @brief Ethernet code point value that indicates presence of CSIG compact tag in a packet
*
* @type sai_uint16_t
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
* @isvlan false
* @condition SAI_TAM_INT_ATTR_INT_PRESENCE_TYPE == SAI_TAM_INT_PRESENCE_TYPE_ETH_TYPE
*/
SAI_TAM_INT_ATTR_ETH_TYPE_CODE_POINT,

/**
* @brief CSIG signal type
*
* @type sai_csig_signal_type_t
* @flags CREATE_AND_SET
* @default SAI_CSIG_SIGNAL_TYPE_ABW
*/
SAI_TAM_INT_ATTR_CSIG_SIGNAL_TYPE,

/**
* @brief Time interval for bandwidth computation
*
* @type sai_tam_int_bw_time_interval_t
* @flags CREATE_AND_SET
* @default SAI_TAM_INT_BW_TIME_INTERVAL_256
* @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
*/
SAI_TAM_INT_ATTR_BW_TIME_INTERVAL,

/**
* @brief Bandwidth time Interval Units
*
* @type sai_tam_int_bw_time_interval_unit_t
* @flags CREATE_AND_SET
* @default SAI_TAM_INT_BW_TIME_INTERVAL_UNIT_USEC
* @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
*/
SAI_TAM_INT_ATTR_BW_TIME_INTERVAL_UNIT,

/**
* @brief Number of quantization bands
* Compact tag supports maximum of 32 bands and wide tag supports maximum of 1048576 bands
*
* @type sai_uint32_t
* @flags CREATE_AND_SET
* @default 32
* @validonly SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_COMPACT or SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_WIDE
*/
SAI_TAM_INT_ATTR_QUANT_BANDS,

/**
* @brief Quantization band range values for compact tag
*
* @type sai_u32_range_list_t
* @flags CREATE_AND_SET
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the data type to uint64. uint 32 will not acommodate interface speeds higher than 50Gbps

* @default empty
* @validonly SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_COMPACT
*/
SAI_TAM_INT_ATTR_QUANT_BAND_UINT32_RANGE_LIST,

/**
* @brief Base value for wide tag quantization. Must be power of 2
*
* @type sai_uint32_t
* @flags CREATE_AND_SET
* @default 0
* @validonly SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_WIDE
*/
SAI_TAM_INT_ATTR_WIDE_QUANT_BASE_VALUE,

/**
* @brief Step value for wide tag quantization. Must be power of 2
*
* @type sai_uint32_t
* @flags CREATE_AND_SET
* @default 0
* @validonly SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_WIDE
*/
SAI_TAM_INT_ATTR_WIDE_QUANT_STEP_VALUE,

/**
* @brief Update the D bit indicating the packet is trimmed
* DSCP value configured for TRIM packets comes from the TRIM configuration
*
* @type bool
* @flags CREATE_AND_SET
* @default false
* @validonly SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_COMPACT or SAI_TAM_INT_ATTR_TYPE == SAI_TAM_INT_TYPE_CSIG_WIDE
*/
SAI_TAM_INT_ATTR_CSIG_D_BIT,

/**
* @brief End of Attributes
*/
Expand Down
Loading