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 #1979

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
07089c9
SER Data
JaiOCP Dec 21, 2023
2de4740
SER Data
JaiOCP Dec 22, 2023
53ef4cf
Merge branch 'opencomputeproject:master' into SER
JaiOCP Mar 6, 2024
979dbdd
Add MAC remote loopback to the port loopback enums. (#1934)
mikeberesford Jan 10, 2024
21bda5a
Add attributes to disable L3 rewrites (#1924)
vivekmoorthy Jan 10, 2024
a30f962
Cable diagnostics attribute added (#1894)
prafull-brcm Jan 10, 2024
bb18067
[meta] Add custom range start end values check (#1945)
kcudnik Jan 16, 2024
3dc5268
[meta] Add support for port stat extensions (#1947)
kcudnik Jan 18, 2024
420ef5e
Enable sai_uint16_t in ProcessStructValueType Struct Member (#1949)
zhixiongniu Jan 23, 2024
def7680
Update the Doxyfile for doxygen in Debian Bookworm (#1946)
saiarcot895 Jan 23, 2024
0932fe6
Release notes for SAI version 1.13.3 (#1953)
kannankvs Feb 2, 2024
172dd08
Adding ENI into aspell. (#1962)
r12f Feb 13, 2024
48f1900
Add new match qualifiers for acl table (#1952)
mholankar Feb 16, 2024
6c17f3a
Add BW to acronyms (#1968)
marian-pritsak Feb 27, 2024
deff668
Adding DASH SAI APIs for load balancer fast path scenario. (#1966)
r12f Feb 29, 2024
5238c7f
SAI proposal for icmp echo offload (#1943)
chikkaiah-work Feb 29, 2024
bf56126
Revert "SAI proposal for icmp echo offload (#1943)" (#1969)
kcudnik Feb 29, 2024
418c8f6
Remove depreacated bm directory (#1954)
kcudnik Mar 1, 2024
d65f138
Fix saithrift build issue for Bookworm SONiC (#1974)
Keshavg-marvell Mar 6, 2024
4eb7255
Revert "SER Data"
JaiOCP Mar 7, 2024
a85d4b5
Revert "SER Data"
JaiOCP Mar 7, 2024
3ffbcb4
Merge branch 'SER' of https://github.com/JaiOCP/SAI into SER
JaiOCP Mar 7, 2024
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 @@ -1722,14 +1722,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 info 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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why there is only one field where? Dont create stricte with one wntry

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the original design discussed in 1777 so seems good
Per health event we create a struct
Each health event is only of one type at a time, so we use a union

So let's say we have 2 types of event
struct health_a_data
struct health_b_data

we will put in the union
union health_data {a_data, b_data}

} 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 @@ -127,6 +127,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