-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
lib,zebra: Append labels on nexthop resolve #4808
Conversation
Add a way to append labels to a nexthop that may already have some labels. This overwrites the label type with the new one. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
When resolving a nexthop, append its nexthops to the one its resolving to. If that one already has some labels on it, it will add to them, thus creating a whole new nexthop group potentially. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
🚧 Basic BGPD CI results: Partial FAILURE, 1 tests failedResults table
For details, please contact louberger |
ci:rerun |
The CI system hit a 504 when it tried to comment back on github. |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-8569/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base1 Static Analyzer issues remaining.See details at |
Maybe this is a dumb question, but ... could you say a bit about just why this needs to be done? Is this related to the nexthop-group work-in-progress, for example? If so, why wouldn't a shared nexthop-group still have the list of resolving nexthops? There's a change here to |
Indeed it is related to the nexthop group work but I also think it makes sense separately which is why I opened this PR. So the To me it makes much more sense to have the labels on it in memory exactly how it appears in the kernel in memory rather than constructing it at the time we send it to the kernel. Before what we would do is iterate up to the The first label copying being done in I hope I explained that somewhat decently. |
@rwestphal This is the patch we discussed. |
* We have to do this since nexthop objects being | ||
* installed need all of them. We can't iterate up the tree | ||
* when we install the route like we used to. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'm still missing something - maybe this comment is throwing me off - why can't we iterate as we ... always have done? We have the recursive nexthop that is being resolved, and we have the resolving nexthops - what is it that we can't iterate over?
So this patch actually creates an issue where if you resolved to a nexthop that was already resolved to another nexthop and all 3 have labels you end up getting 3 labels rather than 2.
Basically they keeping stacking every resolve since we are putting it on the resolved nexthop. Closing this patch for now until I figure this out. |
When we resolve a nexthop appends its labels to the resolved nexthop, whether it already has labels or not. Before, we were iterating up the resolution tree to get all labels right before install.