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
38 changes: 38 additions & 0 deletions doc/SAI-Proposal-Fast-Linkup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Fast Link-Up
-------------------------------------------------------------------------------
Title | Fast Link-Up
-------------|-----------------------------------------------------------------
Authors | Eddy Kvetny, Nvidia
Status | In review
Type | Standards track
Created | 2025-09-09
SAI-Version | 1.17
-------------------------------------------------------------------------------

# 1. Overview
In some cases the equalization parameters from the previous session can be used for a new link-up process. It can significantly reduce time of the Link-Up process

# 2. Scope
This approach is applicable to devices (switch-to-switch or switch-to-NIC) supporting this process, usually from the same vendor or from different vendors aligned on the process.

Can be applied to cold/fast boot or link recovery flows (vendor decision)

# 3. Architecture
This feature shall be enabled per-port using a new SAI attribute - SAI_PORT_ATTR_FAST_LINKUP_ENABLED (default status - disabled/false)

On ports with the enabled feature the ASIC FW shall try first to bring a link up using the equalization parameter stored from the previous successul session. The time given to ASIC to try to bring a link up with the old EQ parameters is limited by the Fast Link-Up Polling Timer. The time value is configured using a new SAI attribute - SAI_SWITCH_ATTR_FAST_LINKUP_POLLING_TIMEOUT. The supported range for this value (in secs) can be read by NOS using a new SAI attribute SAI_SWITCH_ATTR_FAST_LINKUP_POLLING_TIMEOUT_RANGE

If the process of brining a link up with the previosly used EQ parameters doesn't succeed the regular link-up process is triggered

If the link succeeds moving to the Operation UP state then the BER level shall be checked to make sure that the establish link has a good quality. To do that another timer called Guard Timer is used. Its value is also configurable using a new SAI attribute (SAI_SWITCH_ATTR_FAST_LINKUP_GUARD_TIMEOUT)


When the Guard Timer expires the BER is measured and compared with the "good" BER value configured using a new SAI attribure SAI_SWITCH_ATTR_FAST_LINKUP_BER_THRESHOLD. Only if the measured BER is equal or better than the configured BER threshold the process is considered completed. Otherwise, the fallback to the regular link-up process is done and link's Oper status changes to DOWN

If the remote side doesn't support the Fast Link-up then the fallback to regular process will happen

Note that the State Machine is implemented by ASIC FW and can vary between vendors. The proposal just defines just high level flow and SAI configuration for this flow

The following State Machine is proposed for the Fast Link-UP process described above

![](figures/sai_fast_linkup_state_machine.png)
Binary file added doc/figures/sai_fast_linkup_state_machine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions inc/saiport.h
Original file line number Diff line number Diff line change
Expand Up @@ -2712,6 +2712,15 @@ typedef enum _sai_port_attr_t
*/
SAI_PORT_ATTR_PAM4_EYE_VALUES,

/**
* @brief Enables the fast link-up for a port on port/link recovery. Vendors can use to reduce linkup time on remote link failure
*
* @type bool
* @flags CREATE_AND_SET
* @default false
*/
SAI_PORT_ATTR_FAST_LINKUP_ENABLED,

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

/**
* @brief Linkup polling time range (in secs)
*
* @type sai_u16_range_t
* @flags READ_ONLY
*/
SAI_SWITCH_ATTR_FAST_LINKUP_POLLING_TIMEOUT_RANGE,

/**
* @brief Time (in sec) during which the fast link-up is attempted.
*
* If this timer expires before the link is UP the regular link-up will be performed
* Supported range can be obtained using SAI_SWITCH_ATTR_FAST_LINKUP_POLLING_TIMEOUT_RANGE
*
* @type sai_uint16_t
* @flags CREATE_AND_SET
* @isvlan false
* @default 60
*/
SAI_SWITCH_ATTR_FAST_LINKUP_POLLING_TIMEOUT,

/**
* @brief Linkup guard time range (in secs)
*
* @type sai_u16_range_t
* @flags READ_ONLY
*/
SAI_SWITCH_ATTR_FAST_LINKUP_GUARD_TIMEOUT_RANGE,

/**
* @brief Time (in secs) during which the link must be UP with the BER below the level configured with SAI_SWITCH_ATTR_FAST_LINKUP_BER_THRESHOLD to keep the fast link-up configuration.
*
* If either link failures happens within this time or high BER is measured at the end of this period of time the link should undergo regular link up process
* Supported range can be obtained using SAI_SWITCH_ATTR_FAST_LINKUP_GUARD_TIMEOUT_RANGE
*
* @type sai_uint8_t
* @flags CREATE_AND_SET
* @default 10
*/
SAI_SWITCH_ATTR_FAST_LINKUP_GUARD_TIMEOUT,

/**
* @brief Threshold to control regular link-up happened after fast linkup Time-out
*
* Configures the BER (negative exponent only, mantissa is always 1) which is if measured during
* SAI_SWITCH_ATTR_FAST_LINKUP_GUARD_TIMEOUT causes the full link-up flow. For example, value 12 configured here is 1e^-12
*
* @type sai_uint8_t
* @flags CREATE_AND_SET
* @default 12
*/
SAI_SWITCH_ATTR_FAST_LINKUP_BER_THRESHOLD,

/**
* @brief End of attributes
*/
Expand Down
3 changes: 3 additions & 0 deletions inc/saitypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -1711,6 +1711,9 @@ typedef union _sai_attribute_value_t

/** @validonly meta->attrvaluetype == SAI_ATTR_VALUE_TYPE_TAPS_LIST */
sai_taps_list_t portserdestaps;

/** @validonly meta->attrvaluetype == SAI_ATTR_VALUE_TYPE_UINT16_RANGE */
sai_u16_range_t u16range;
} sai_attribute_value_t;

/**
Expand Down
5 changes: 5 additions & 0 deletions meta/saimetadatatypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ typedef enum _sai_attr_value_type_t
*/
SAI_ATTR_VALUE_TYPE_UINT32_RANGE,

/**
* @brief Attribute value is 16bit unsigned integer range.
*/
SAI_ATTR_VALUE_TYPE_UINT16_RANGE,

/**
* @brief Attribute value is 16 bit unsigned integer range list.
*/
Expand Down
2 changes: 2 additions & 0 deletions meta/saisanitycheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ void check_attr_object_type_provided(
case SAI_ATTR_VALUE_TYPE_PRBS_RX_STATE:
case SAI_ATTR_VALUE_TYPE_CHARDATA:
case SAI_ATTR_VALUE_TYPE_UINT32_RANGE:
case SAI_ATTR_VALUE_TYPE_UINT16_RANGE:
case SAI_ATTR_VALUE_TYPE_UINT16_RANGE_LIST:
case SAI_ATTR_VALUE_TYPE_UINT32_LIST:
case SAI_ATTR_VALUE_TYPE_QOS_MAP_LIST:
Expand Down Expand Up @@ -3026,6 +3027,7 @@ void check_attr_is_primitive(
case SAI_ATTR_VALUE_TYPE_UINT16:
case SAI_ATTR_VALUE_TYPE_INT16:
case SAI_ATTR_VALUE_TYPE_UINT32:
case SAI_ATTR_VALUE_TYPE_UINT16_RANGE:
case SAI_ATTR_VALUE_TYPE_UINT32_RANGE:
case SAI_ATTR_VALUE_TYPE_UINT64:
case SAI_ATTR_VALUE_TYPE_INT64:
Expand Down