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

Port Error Event Callback #2048

Closed
wants to merge 0 commits into from

Conversation

JaiOCP
Copy link
Contributor

@JaiOCP JaiOCP commented Jul 10, 2024

Callback for various errors observed by port.

inc/saiport.h Outdated
/** Link Training set failed */
SAI_PORT_ERROR_EVENT_LINK_TRAINING_FAILED,

/** Port PCS Errors */
Copy link
Contributor

Choose a reason for hiding this comment

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

@JaiOC PCS errors means? Is it a counter value or some error indication? if later, what specific eror? PCS lane alignment error?

inc/saiport.h Outdated
Comment on lines 2586 to 2530
* @brief Enable/Disable Port UNRELIABLE loss of signal
*
* @type bool
* @flags CREATE_AND_SET
* @default false
*/
SAI_PORT_ATTR_UNRELIABLE_LOS_ENABLE,

Copy link
Contributor

Choose a reason for hiding this comment

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

@JaiOCP This Attribute does not seem to aligned with the PR description for error events. This is more of capability of the PHY which can support unreliable LOS enable. So, can we take this in a separate PR?

@JaiOCP
Copy link
Contributor Author

JaiOCP commented Jul 10, 2024 via email

inc/saiport.h Outdated
SAI_PORT_ERROR_EVENT_LOCAL_FAULT,

/** Pre-emphasis failed */
SAI_PORT_ERROR_EVENT_PREEMPHASIS_FAILED,

Choose a reason for hiding this comment

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

Why should this event be sent via notification ? Or we want after falure on set to send it asynchroneously via notification from SAI to SWSS ?

@prgeor
Copy link
Contributor

prgeor commented Jul 11, 2024

@JaiOCP Will this error event be notified to OA via port_change_event just like link up/down notification?

inc/saiport.h Outdated
Comment on lines 103 to 106
SAI_PORT_ERROR_EVENT_REMOTE_FAULT,

/** Local-fault */
SAI_PORT_ERROR_EVENT_LOCAL_FAULT,
Copy link
Contributor

Choose a reason for hiding this comment

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

@JaiOCP need a way to know if LF/RF is ASSERTED or DE-ASSERTED

inc/saiport.h Outdated
Comment on lines 112 to 124
SAI_PORT_ERROR_EVENT_FEC_FAILED,

/** Speed set failed */
SAI_PORT_ERROR_EVENT_SPEED_FAILED,

/** Interface type set failed */
SAI_PORT_ERROR_EVENT_IF_TYPE_FAILED,

/** Media type set failed */
SAI_PORT_ERROR_EVENT_MEDIA_TYPE_FAILED,

/** Link Training set failed */
SAI_PORT_ERROR_EVENT_LINK_TRAINING_FAILED,
Copy link
Contributor

Choose a reason for hiding this comment

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

@JaiOCP can event notification provide the data to know if these error are currently asserted or not

inc/saiport.h Outdated
Comment on lines 112 to 124
SAI_PORT_ERROR_EVENT_FEC_FAILED,

/** Speed set failed */
SAI_PORT_ERROR_EVENT_SPEED_FAILED,

/** Interface type set failed */
SAI_PORT_ERROR_EVENT_IF_TYPE_FAILED,

/** Media type set failed */
SAI_PORT_ERROR_EVENT_MEDIA_TYPE_FAILED,

/** Link Training set failed */
SAI_PORT_ERROR_EVENT_LINK_TRAINING_FAILED,
Copy link
Contributor

Choose a reason for hiding this comment

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

@JaiOCP can event notification provide the data to know if these error are currently asserted or not

inc/saiport.h Outdated
Comment on lines 111 to 122
/** FEC set failed */
SAI_PORT_ERROR_EVENT_FEC_FAILED,

/** Speed set failed */
SAI_PORT_ERROR_EVENT_SPEED_FAILED,

/** Interface type set failed */
SAI_PORT_ERROR_EVENT_IF_TYPE_FAILED,

/** Media type set failed */
SAI_PORT_ERROR_EVENT_MEDIA_TYPE_FAILED,

Copy link
Contributor

Choose a reason for hiding this comment

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

@JaiOCP can you please elaborate more on these failures. Are these failures during AN ?

Copy link
Contributor

@prgeor prgeor left a comment

Choose a reason for hiding this comment

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

@JaiOCP Should we take these error notification as part of link up and link down. Also see during port init there will be notification for port that was down to begin with.

@JaiOCP
Copy link
Contributor Author

JaiOCP commented Jul 30, 2024

Closing this PR.
Based on the offline discussion, port error events will be moved under the port_oper_status_t. This will help resolve the race condition of oper status events and error events going to orchagent in any order. Now all the events will be tracked via port_oper_status. This will also resolve the issue of nowing when the error state is cleared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants