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

Nhg stuffs #15332

Merged
merged 10 commits into from
Feb 14, 2024
Merged

Nhg stuffs #15332

merged 10 commits into from
Feb 14, 2024

Conversation

donaldsharp
Copy link
Member

See individual commits but this is a bunch of code cleanup.

When installing a NHG via dplane_nexthop_add, it can only return
REQUEST_QUEUED or REQUEST_FAILURE.  There is no way SUCCESS can
be returned with the way the dplane works at this point in time.
Remove the code that attempts to set the NHE state appropriately
as it is impossible.

Signed-off-by: Donald Sharp <[email protected]>
The documentation was wrong.  Let's adjust it.

Signed-off-by: Donald Sharp <[email protected]>
Basically the same function two times.  Let's consolidate.

Signed-off-by: Donald Sharp <[email protected]>
Convert the dplane results function for nhg's over to
using a switch for the result enum.  Let's specifically
call out the unexpected state and also set the nexthop
group as not installed when installation fails.

Signed-off-by: Donald Sharp <[email protected]>
The nexthop group is marked as valid/invalid and then
installed.  Not installed and then marked valid.
This is just a bit of code removed that might be covering
up other problems that need to be sorted.

Signed-off-by: Donald Sharp <[email protected]>
Let's just let the function figure this out.

Signed-off-by: Donald Sharp <[email protected]>
These functions provided a level of abstraction that forced
us to call multiple functions when a simple data structure
change was all that is needed.  Let's consolidate down
and make things a bit simpler.

Signed-off-by: Donald Sharp <[email protected]>
zebra_if_nhg_dependents_XXX were just simple wrapper
functions that inited/deleted data structures.
These were already function calls themselves.  Let's
remove the abstraction and make the code simpler.

Signed-off-by: Donald Sharp <[email protected]>
The function call in to zebra_interface_nhg_reinstall
is an action that takes place on interface up events
*not* when the connected addresses are added to
a system.  this will prevent this function being
called when new connected interfaces come alive
that is an independent operation of the interface
coming up.

Signed-off-by: Donald Sharp <[email protected]>
The current code is unsetting the fact that the
NHG is installed.  It is installed but we are
reinstalling it.  Let's note this in the code
appropriately as REINSTALL and not remove the
INSTALLED FLAG.

Signed-off-by: Donald Sharp <[email protected]>
Copy link
Member

@pguibert6WIND pguibert6WIND left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, waiting for the freeze to end.

@ton31337 ton31337 merged commit 2fd5e51 into FRRouting:master Feb 14, 2024
11 checks passed
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.

3 participants