bgpd: Soft-reconfig should not completely stall bestpath processing#19067
Merged
ton31337 merged 1 commit intoFRRouting:masterfrom Jun 24, 2025
Merged
bgpd: Soft-reconfig should not completely stall bestpath processing#19067ton31337 merged 1 commit intoFRRouting:masterfrom
ton31337 merged 1 commit intoFRRouting:masterfrom
Conversation
Currently there is a dest flag `BGP_NODE_SOFT_RECONFIG` that
when set completely stops processing of the path, because it
is assumed that when running through all of those adjacency
in's that the node will be reprocessed.
Imagine this series of events:
a) route-map change that causes a soft-adjacency run to be
triggered for the dest.
b) Schedule all dests associated with the adjacency in's
to be processed in the future
c) Some other event that causes a need for processing of that
node. This can be, but is not limited to:
1) NHT change and we need to reprocess the node
2) Receive a update for a dest that does not have soft
adjacency turned on( but some other path_info for the
node does.
d) Current best path processing sees that the node has a
SOFT_RECONFIG flag on it, this stops processing.
e) The SOFT_RECONFIG task wakes up and re runs the filter
mechanism and decides that the path is filtered. BGP
then stops processing for that node and does nothing.
f) We are left with a situation where the soft-reconfig
has caused a update that should be processed from being
processed.
Modify the code to not abort the best path run when the flag
is set. Just let it happen. Yeah we are doing a bit more
processing but the end state will be correct.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Member
Author
|
This PR is a result of discussing a problem in the bgpd channel on slack. I do not know how to make this problem happen ( it's a tight timing issue ). Let's see if the finder of this bug has a recreate situation that they can test. |
Member
Author
|
Reporter indicated that this fixed the issue |
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.
Currently there is a dest flag
BGP_NODE_SOFT_RECONFIGthat when set completely stops processing of the path, because it is assumed that when running through all of those adjacency in's that the node will be reprocessed.Imagine this series of events:
a) route-map change that causes a soft-adjacency run to be triggered for the dest.
b) Schedule all dests associated with the adjacency in's to be processed in the future
c) Some other event that causes a need for processing of that node. This can be, but is not limited to:
1) NHT change and we need to reprocess the node
2) Receive a update for a dest that does not have soft
adjacency turned on( but some other path_info for the
node does.
d) Current best path processing sees that the node has a SOFT_RECONFIG flag on it, this stops processing.
e) The SOFT_RECONFIG task wakes up and re runs the filter mechanism and decides that the path is filtered. BGP then stops processing for that node and does nothing. f) We are left with a situation where the soft-reconfig has caused a update that should be processed from being processed.
Modify the code to not abort the best path run when the flag is set. Just let it happen. Yeah we are doing a bit more processing but the end state will be correct.