Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Link Event Damping] Add link event damping sairedis port attributes. #1314

Merged
merged 1 commit into from
Nov 14, 2023
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
55 changes: 55 additions & 0 deletions lib/sairedis.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,58 @@ typedef enum _sai_redis_switch_attr_t
*/
SAI_REDIS_SWITCH_ATTR_SYNC_OPERATION_RESPONSE_TIMEOUT,
} sai_redis_switch_attr_t;

/**
* @brief Link event damping algorithms.
*/
typedef enum _sai_link_event_damping_algorithm_t
{
/** Link event damping algorithm disabled. */
SAI_LINK_EVENT_DAMPING_ALGORITHM_DISABLED = 0,

/** Additive increase exponential decrease based link event damping algorithm. */
SAI_LINK_EVENT_DAMPING_ALGORITHM_AIED = 1,

} sai_link_event_damping_algorithm_t;

typedef struct _sai_redis_link_event_damping_algo_aied_config_t
{
/** Max link event damping suppression time (in milliseconds). */
sai_uint32_t max_suppress_time;

/** Link event damping suppress threshold. */
sai_uint32_t suppress_threshold;

/** Link event damping reuse threshold. */
sai_uint32_t reuse_threshold;

/** Link event damping decay half time duration (in milliseconds). */
sai_uint32_t decay_half_life;

/** Link event flap penalty. */
sai_uint32_t flap_penalty;

} sai_redis_link_event_damping_algo_aied_config_t;

typedef enum _sai_redis_port_attr_t
{
/**
* @brief Link event damping algorithm.
*
* @type sai_link_event_damping_algorithm_t
* @flags CREATE_AND_SET
* @default SAI_LINK_EVENT_DAMPING_ALGORITHM_DISABLED
*/
SAI_REDIS_PORT_ATTR_LINK_EVENT_DAMPING_ALGORITHM = SAI_PORT_ATTR_CUSTOM_RANGE_START,

/**
* @brief Link event damping AIED configuration.
*
* @type sai_redis_link_event_damping_algo_aied_config_t
* @flags CREATE_AND_SET
* @validonly SAI_REDIS_PORT_ATTR_LINK_EVENT_DAMPING_ALGORITHM = SAI_LINK_EVENT_DAMPING_ALGORITHM_AIED
* @default internal
*/
SAI_REDIS_PORT_ATTR_LINK_EVENT_DAMPING_ALGO_AIED_CONFIG,

} sai_redis_port_attr_t;
2 changes: 2 additions & 0 deletions tests/aspell.en.pws
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ acl
ACL
ACLs
AES
AIED
API
APIs
ASAN
Expand Down Expand Up @@ -437,6 +438,7 @@ updatable
upgradable
util
utils
validonly
versa
veth
vEthernetX
Expand Down