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

SER Support #1993

Merged
merged 2 commits into from
Aug 5, 2024
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
129 changes: 128 additions & 1 deletion inc/saitypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -1813,14 +1813,141 @@ typedef enum _sai_object_stage_t
typedef enum _sai_health_data_type_t
{
/** General health data type */
SAI_HEALTH_DATA_TYPE_GENERAL
SAI_HEALTH_DATA_TYPE_GENERAL,

/** SER health data type */
SAI_HEALTH_DATA_TYPE_SER
} sai_health_data_type_t;

typedef enum _sai_ser_type_t
{
/**
* @brief Unknown error type
*/
SAI_SER_TYPE_UNKNOWN = 0,

/**
* @brief Parity error
*/
SAI_SER_TYPE_PARITY = 1,

/**
* @brief ECC single bit error
*/
SAI_SER_TYPE_ECC_SINGLE_BIT = 2,

/**
* @brief ECC double bit error
*/
SAI_SER_TYPE_ECC_DOUBLE_BIT = 3,
} sai_ser_type_t;

typedef enum _sai_ser_correction_type_t
{
/**
* @brief SW takes no action when error happens
*/
SAI_SER_CORRECTION_TYPE_NO_ACTION = 0,

/**
* @brief SW tries to correct but fails
*/
SAI_SER_CORRECTION_TYPE_FAIL_TO_CORRECT = 1,

/**
* @brief SW writes NULL entry to clear the error
*/
SAI_SER_CORRECTION_TYPE_ENTRY_CLEAR = 2,

/**
* @brief Restore entry from SW cache
*/
SAI_SER_CORRECTION_TYPE_SW_CACHE_RESTORE = 3,

/**
* @brief Restore entry from HW cache
*/
SAI_SER_CORRECTION_TYPE_HW_CACHE_RESTORE = 4,

/**
* @brief Memory needs special correction handling
*/
SAI_SER_CORRECTION_TYPE_SPECIAL = 5,
} sai_ser_correction_type_t;

/**
* @brief SAI SER log information type
*
* @flags strict
*/
typedef enum _sai_ser_log_type_t
{
/**
* @brief Error happens on memory
*/
SAI_SER_LOG_TYPE_MEM = 1 << 0,

/**
* @brief Error happens on register
*/
SAI_SER_LOG_TYPE_REG = 1 << 1,

/**
* @brief Parity errors detected more than once
*/
SAI_SER_LOG_TYPE_MULTI = 1 << 2,

/**
* @brief Error corrected by SW
*/
SAI_SER_LOG_TYPE_CORRECTED = 1 << 3,

/**
* @brief Restore entry from HW cache
*/
SAI_SER_LOG_TYPE_ENTRY_INFO = 1 << 4,

/**
* @brief Cache data is valid
*/
SAI_SER_LOG_TYPE_CACHE = 1 << 5,
} sai_ser_log_type_t;

typedef struct _sai_ser_health_data_t
{
/** SER type specific fields */
sai_ser_type_t type;

/** SER correction type specific fields */
sai_ser_correction_type_t correction_type;

/**
* @brief SER correction log info (sai_ser_log_type_t)
*
* For example, if entry info is present and is coming from cache
* SAI_SER_LOG_TYPE_ENTRY_INFO | SAI_SER_LOG_TYPE_CACHE
*
* @flags sai_ser_log_type_t
*/
uint32_t ser_log_type;
} sai_ser_health_data_t;

/**
* @extraparam sai_health_data_type_t data_type
*/
typedef union _sai_health_data_t
{
/** @validonly data_type == SAI_HEALTH_DATA_TYPE_SER */
sai_ser_health_data_t ser;
} sai_health_data_t;

typedef struct _sai_switch_health_data_t
{
/** Type of switch health data */
sai_health_data_type_t data_type;

/** @passparam data_type */
sai_health_data_t data;
} sai_switch_health_data_t;

/**
Expand Down
1 change: 1 addition & 0 deletions meta/acronyms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ SAK - Secure Association Key
SC - Secure Channel
SCI - Secure Channel Identifier
SDK - Software Development Kit
SER - Soft Error Rate
SFI - SerDes Framer Interface
SFLOW - Sampled Flow
SG - (S,G) Source-specific multicast
Expand Down
Loading