Add STP loop guard support#88
Open
salahadell wants to merge 1 commit intosonic-net:masterfrom
Open
Conversation
Signed-off-by: Salah Adel <salah-adel2011@hotmail.com>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Apr 26, 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.
Summary
Add STP Loop Guard support to
sonic-stpand wire it through manager, runtime state handling, and APP_DB sync.Motivation
When expected BPDUs are lost on non-designated ports, the port should not transition unsafely toward forwarding, potentially creating Layer-2 loops, and broadcast storms.
Loop Guard keeps the port in loop-inconsistent state until recovery conditions are met.
Changes
Behavior
LOOP-INC.LOOP-INCclears stale state and triggers immediate STP state re-evaluation.Files Updated
include/stp.hinclude/stp_ipc.hinclude/stp_dbsync.hstp/stp.cstp/stp_mgr.cstp/stp_util.cstp/stp_data.cstp/stp_debug.cstpsync/stp_sync.cppValidation
LOOP-INCwhen BPDUs stopped.Related PRs