Repository navigation
introduce SAI_PORT_ATTR_OPER_STATUS_LATCH - #2367
Merged
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Signed-off-by: Wei Dai <daiweix@meta.com> Signed-off-by: Shrikrishna (Shri) Khare <skhare@meta.com>
daiwei1983
force-pushed
the
sai_port_latch
branch
from
October 16, 2026 16:35
84bb5c4 to
48bedd0
Compare
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
JaiOCP
approved these changes
Oct 29, 2026
tjchadaga
approved these changes
Nov 3, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Comparing port state before and after warmboot misses a transient UP→DOWN→UP transition. While the network operating system (NOS) and its adapter are detached, software may not receive or process link-state notifications. Some hardware or adapter implementations can retain an indication that a port changed state, but SAI does not provide a standard attribute for reading the current operational state together with this latched change indication.
Solution
The existing sai_latch_status_t type can represent the port changed result. Add a read-only port attribute, SAI_PORT_ATTR_OPER_STATUS_LATCH with the sai_latch_status_t type in this pull request.
Example use case: FRR
In an Fast ReRoute (FRR) deployment, the primary-to-backup switchover is expected to complete within time SLA. In callback-driven designs, the NOS may use a link-down notification to program the SDK to initiate the switchover; once programmed, hardware performs the fast-path switch. During warmboot, which can last tens of seconds, the NOS may be unavailable to process that notification. For a port that was UP at the start of the interval, the proposed latch can indicate whether it went down at least once, flagging a potential missed FRR trigger. This Boolean indication does not count repeated flaps or prove that FRR failed or missed its target, but it helps assess FRR exposure during warmboot
NOS warmboot flow
FRR is just one example use case of port status latch. A more generic workflow to use latch data and tell whether link flaps across NOS warmboot is summarized below.