Skip to content

Commit a62e203

Browse files
author
Martin Liao
committed
Create API for fast linkup configuration.
Signed-off-by: Martin Liao <[email protected]>
1 parent f56f534 commit a62e203

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

inc/saiport.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2712,6 +2712,15 @@ typedef enum _sai_port_attr_t
27122712
*/
27132713
SAI_PORT_ATTR_PAM4_EYE_VALUES,
27142714

2715+
/**
2716+
* @brief Enables the fast link-up for a port on port/link recovery. Vendors can use to reduce linkup time on remote link failure
2717+
*
2718+
* @type bool
2719+
* @flags CREATE_AND_SET
2720+
* @default false
2721+
*/
2722+
SAI_PORT_ATTR_FAST_LINKUP_ENABLED,
2723+
27152724
/**
27162725
* @brief End of attributes
27172726
*/

inc/saiswitch.h

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3468,6 +3468,58 @@ typedef enum _sai_switch_attr_t
34683468
*/
34693469
SAI_SWITCH_ATTR_NEXT_HOP_USER_META_DATA_RANGE,
34703470

3471+
/**
3472+
* @brief Linkup polling time range (in secs)
3473+
*
3474+
* @type sai_u16_range_t
3475+
* @flags READ_ONLY
3476+
*/
3477+
SAI_SWITCH_ATTR_FAST_LINKUP_POLLING_TIME_RANGE,
3478+
3479+
/**
3480+
* @brief Time (in sec) during which the fast link-up is attempted.
3481+
*
3482+
* If this timer expires before the link is UP the regular link-up will be performed
3483+
* Supported range can be obtained using SAI_SWITCH_ATTR_FAST_LINKUP_POLLING_TIME_RANGE
3484+
*
3485+
* @type sai_uint16_t
3486+
* @flags CREATE_AND_SET
3487+
* @default 60
3488+
*/
3489+
SAI_SWITCH_ATTR_FAST_LINKUP_POLLING_TIME,
3490+
3491+
/**
3492+
* @brief Linkup guard time range (in secs)
3493+
*
3494+
* @type sai_u16_range_t
3495+
* @flags READ_ONLY
3496+
*/
3497+
SAI_SWITCH_ATTR_FAST_LINKUP_GUARD_TIME_RANGE,
3498+
3499+
/**
3500+
* @brief Time (in secs) during which the link must be UP and have the BER below the level configured with SAI_SWITCH_ATTR_FAST_LINKUP_GUARD_TIME_BER to have the next linkup as fast link-up
3501+
*
3502+
* If either link failures or high BER event happen during the configured time then full link-up flow (not fast) will be used for next link-up.
3503+
* After setting the port's Admin status to UP the regular (non-fast) link-up flow is used
3504+
* Supported range can be obtained using SAI_SWITCH_ATTR_FAST_LINKUP_GUARD_TIME_RANGE
3505+
*
3506+
* @type sai_uint16_t
3507+
* @flags CREATE_AND_SET
3508+
* @default 10
3509+
*/
3510+
SAI_SWITCH_ATTR_FAST_LINKUP_GUARD_TIME,
3511+
3512+
/**
3513+
* @brief Configures the BER (negative exponent only, mantissa is always 1) which is if measured during
3514+
*
3515+
* SAI_SWITCH_ATTR_FAST_LINKUP_GUARD_TIME causes the full link-up flow. For example, "12" configured here is 1e^-12)
3516+
*
3517+
* @type sai_uint8_t
3518+
* @flags CREATE_AND_SET
3519+
* @default 12
3520+
*/
3521+
SAI_SWITCH_ATTR_FAST_LINKUP_BER_THRESHOLD,
3522+
34713523
/**
34723524
* @brief End of attributes
34733525
*/

0 commit comments

Comments
 (0)