-
Notifications
You must be signed in to change notification settings - Fork 475
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
Extended port operational status with various error and fault status #2060
Open
prgeor
wants to merge
4
commits into
opencomputeproject:master
Choose a base branch
from
prgeor:mac-fault
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+73
−3
Open
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,39 @@ typedef enum _sai_port_oper_status_t | |
|
||
} sai_port_oper_status_t; | ||
|
||
/** | ||
* @brief Attribute data for #SAI_PORT_ATTR_ERROR_STATUS | ||
* Note enum values must be powers of 2 to be used as Bit mask to query multiple errors | ||
* | ||
* @flags free | ||
*/ | ||
typedef enum _sai_port_error_status_t | ||
{ | ||
/** No errors */ | ||
SAI_PORT_ERROR_STATUS_CLEAR = 0, | ||
|
||
/** MAC Local fault asserted */ | ||
SAI_PORT_ERROR_STATUS_MAC_LOCAL_FAULT = 1 << 0, | ||
|
||
/** MAC Remote fault asserted */ | ||
SAI_PORT_ERROR_STATUS_MAC_REMOTE_FAULT = 1 << 2, | ||
|
||
/** FEC loss of sync asserted */ | ||
SAI_PORT_ERROR_STATUS_FEC_SYNC_LOSS = 1 << 3, | ||
|
||
/** FEC loss of alignment marker asserted */ | ||
SAI_PORT_ERROR_STATUS_FEC_LOSS_ALIGNMENT_MARKER = 1 << 4, | ||
|
||
/** High SER asserted */ | ||
SAI_PORT_ERROR_STATUS_HIGH_SER = 1 << 5, | ||
|
||
/** High BER asserted */ | ||
SAI_PORT_ERROR_STATUS_HIGH_BER = 1 << 6, | ||
|
||
/** Rate of data units with CRC errors passed its threshold */ | ||
SAI_PORT_ERROR_STATUS_CRC_RATE = 1 << 7 | ||
} sai_port_error_status_t; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please add SAI_PORT_ERROR_STATUS_HIGH_SER and SAI_PORT_ERROR_STATUS_HIGH_BER There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @eddyk-nvidia added |
||
|
||
/** | ||
* @brief Defines the operational status of the port | ||
*/ | ||
|
@@ -89,6 +122,8 @@ typedef struct _sai_port_oper_status_notification_t | |
/** Port operational status */ | ||
sai_port_oper_status_t port_state; | ||
|
||
/** Bitmap of various port error or fault status */ | ||
sai_port_error_status_t port_error_status; | ||
prgeor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} sai_port_oper_status_notification_t; | ||
|
||
/** | ||
|
@@ -2537,6 +2572,18 @@ typedef enum _sai_port_attr_t | |
*/ | ||
SAI_PORT_ATTR_UNRELIABLE_LOS, | ||
|
||
/** | ||
* @brief Various port error status | ||
* | ||
* Attribute to query the capability of the Switch to report | ||
* various port error and fault status. The attribute can also | ||
* be used to query the current port error and fault status. | ||
* | ||
* @type sai_port_error_status_t | ||
* @flags READ_ONLY | ||
*/ | ||
SAI_PORT_ATTR_ERROR_STATUS, | ||
|
||
/** | ||
* @brief End of attributes | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are any other values from sai_port_err_status_t needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikeberesford may I know which one you are interested to be added here? I am not sure if I can duplicate the attributes here but I can try...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm personally mostly interested in local/remote fault, just want to make sure the others are not useful or are covered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to Local/Remote fault, SAI_PORT_ERR_STATUS_CRC_RATE would also be good to include here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harshitgulati18 added now