Skip to content
Merged
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.
689 changes: 689 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 in bytes per second */
SAI_CSIG_SIGNAL_TYPE_ABW = 0,

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

/** Delay in nanoseconds */
SAI_CSIG_SIGNAL_TYPE_DELAY = 2,

/** Normalized Queue Depth, in flight bytes divided by normalized port speed */
SAI_CSIG_SIGNAL_TYPE_NQD = 3,

} sai_csig_signal_type_t;

/**
* @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 @@ -2925,6 +2925,25 @@ typedef enum _sai_port_attr_t
*/
SAI_PORT_ATTR_LINK_UP_DEBOUNCE_TIMEOUT,

/**
* @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
16 changes: 16 additions & 0 deletions inc/saiswitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -3550,6 +3550,22 @@ typedef enum _sai_switch_attr_t
*/
SAI_SWITCH_ATTR_LINK_UP_DEBOUNCE_TIMEOUT,

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

/**
* @brief CSIG Bandwidth time intervals supported in microseconds valid only for available and relative available bandwidth signal type
*
* @type sai_u32_list_t
* @flags READ_ONLY
*/
SAI_SWITCH_ATTR_CSIG_BW_TIME_INTERVAL_IN_USEC,

/**
* @brief End of attributes
*/
Expand Down
108 changes: 107 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,8 +521,12 @@ 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;

/**
Expand Down Expand Up @@ -801,6 +814,99 @@ 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 in microseconds
*
* @type sai_uint32_t
* @flags CREATE_AND_SET
* @isvlan false
* @default 128
* @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 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 bands identifier
* Number of identifiers specified MUST match the number of quantization bands configured for compact tag
*
* @type sai_u16_list_t
* @flags CREATE_AND_SET
* @default empty
* @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_BAND_ID,

/**
* @brief Quantization band range values for compact tag
*
* @type sai_u64_range_list_t
* @flags CREATE_AND_SET
* @default empty
* @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_BAND_UINT64_RANGE_LIST,

/**
* @brief Base value for wide tag quantization. Must be 0 or 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 1
* @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
18 changes: 18 additions & 0 deletions inc/saitypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,24 @@ typedef struct _sai_u16_range_t
uint16_t max;
} sai_u16_range_t;

typedef struct _sai_u64_range_t
{
uint64_t min;
uint64_t max;
} sai_u64_range_t;

typedef struct _sai_u16_range_list_t
{
uint32_t count;
sai_u16_range_t *list;
} sai_u16_range_list_t;

typedef struct _sai_u64_range_list_t
{
uint32_t count;
sai_u64_range_t *list;
} sai_u64_range_list_t;

/**
* @brief Defines a vlan list data structure
*/
Expand Down Expand Up @@ -1779,6 +1791,12 @@ typedef union _sai_attribute_value_t
/** @validonly meta->attrvaluetype == SAI_ATTR_VALUE_TYPE_PRBS_PER_LANE_BIT_ERROR_RATE_LIST */
sai_prbs_per_lane_bit_error_rate_list_t prbs_ber_list;

/** @validonly meta->attrvaluetype == SAI_ATTR_VALUE_TYPE_UINT64_RANGE */
sai_u64_range_t u64range;

/** @validonly meta->attrvaluetype == SAI_ATTR_VALUE_TYPE_UINT64_RANGE_LIST */
sai_u64_range_list_t u64rangelist;

} sai_attribute_value_t;

/**
Expand Down
1 change: 1 addition & 0 deletions meta/acronyms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ CMIS - Common Management Interface Specification
CPLD - Complex programmable logic device
CPU - Central Processing Unit
CRC - Cyclic Redundancy Code
CSIG - Congestion Signaling
DFE - Decision Feedback Equalizer
DHCP - Dynamic Host Configuration Protocol
DHCPV6 - Dynamic Host Configuration Protocol for IPv6
Expand Down
12 changes: 11 additions & 1 deletion meta/saimetadatatypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,17 @@ typedef enum _sai_attr_value_type_t
/**
* @brief Attribute value is a list of bit error rates for all lanes in a port.
*/
SAI_ATTR_VALUE_TYPE_PRBS_PER_LANE_BIT_ERROR_RATE_LIST
SAI_ATTR_VALUE_TYPE_PRBS_PER_LANE_BIT_ERROR_RATE_LIST,

/**
* @brief Attribute value is 64 bit unsigned integer range.
*/
SAI_ATTR_VALUE_TYPE_UINT64_RANGE,

/**
* @brief Attribute value is 64 bit unsigned integer range list.
*/
SAI_ATTR_VALUE_TYPE_UINT64_RANGE_LIST
} sai_attr_value_type_t;

/**
Expand Down
Loading