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

bgpd: Optimize evaluate paths for a peer going down #17924

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

donaldsharp
Copy link
Member

Currently when a directly connected peer is going down BGP gets a call back for nexthop tracking in addition the interface down events. On the interface down
event BGP goes through and sets up a per peer Q that holds all the bgp path info's associated with that peer and then it goes and processes this in the future. In the meantime zebra is also at work and sends a nexthop removal event to BGP as well. This triggers a complete walk of all path info's associated with the bnc( which happens to be all the path info's already scheduled for removal here shortly). This evaluate paths
is not an inexpensive operation in addition the work for handling this is already being done via the
peer down queue. Let's optimize the bnc handling
of evaluate paths and check to see if the peer is
still up to actually do the work here.

Currently when a directly connected peer is going down
BGP gets a call back for nexthop tracking in addition
the interface down events.  On the interface down
event BGP goes through and sets up a per peer Q that
holds all the bgp path info's associated with that peer
and then it goes and processes this in the future.  In
the meantime zebra is also at work and sends a nexthop
removal event to BGP as well.  This triggers a complete
walk of all path info's associated with the bnc( which
happens to be all the path info's already scheduled
for removal here shortly).  This evaluate paths
is not an inexpensive operation in addition the work
for handling this is already being done via the
peer down queue.  Let's optimize the bnc handling
of evaluate paths and check to see if the peer is
still up to actually do the work here.

Signed-off-by: Donald Sharp <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant