-
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
Bgp nexthop group optimisations #15488
Draft
pguibert6WIND
wants to merge
69
commits into
FRRouting:master
Choose a base branch
from
pguibert6WIND:bgp_nhg_optimisations
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
79a37d0
Revert "zebra: Attempt to reuse NHG after interface up and route rein…
pguibert6WIND 34b7b5d
Revert "zebra: Reinstall nexthop when interface comes back up"
pguibert6WIND 482815e
Revert "zebra: Properly note that a nhg's nexthop has gone down"
pguibert6WIND 5875425
Revert "zebra: Pass in ZEBRA_ROUTE_MAX instead of true"
pguibert6WIND 3610f69
zebra: rework zebra_nhg_proto_add() parameters
pguibert6WIND 7ad9ee1
zebra, lib: add allow-recursion flag to nexthop-group
pguibert6WIND 11bbd74
zebra: fix submit protocol NHG add/update to nexthop_active() function
pguibert6WIND e286c4b
sharpd: unlock to create unresolved NHGs
pguibert6WIND 2f25645
lib, doc: add recursive support configuration for nexthop-group
pguibert6WIND eca92b2
sharpd: add 'use-protocol-nexthop-group' keyword for route install
pguibert6WIND b9707c4
zebra: extract nhe copy from nexthop_active_update()
pguibert6WIND 12fbdeb
topotests: add nexthop-group allow-recursion test
pguibert6WIND 304274e
lib, zebra, doc: extend ibgp support to nhg in zebra
pguibert6WIND dac471f
zebra, lib: add message flags to nhg_add zapi
pguibert6WIND e3cdb45
lib, doc, sharp, zebra: add color support configuration for nexthops …
pguibert6WIND e252ada
sharpd: add a color option to watch colored nexthop changes
pguibert6WIND ff23eef
topotests: all_protocol_startup, add color test
pguibert6WIND 8a648c0
lib: rename nexthop_group hook framework function calls
pguibert6WIND 33f4f32
lib, doc: add group command under nexthop-group sub node
pguibert6WIND 6544e4e
lib, zebra: add NHG_CHILD_ADD message support
pguibert6WIND 1f37e0b
sharpd, lib: add nexthop-group child group support
pguibert6WIND 8584256
topotests: all_protocol_startup, add nexthop-group test for child groups
pguibert6WIND 9229863
zebra: fix update protocol nexthop-group fib flag value
pguibert6WIND 5ccb711
zebra: do not set FIB flag on nhg's duplicated nexthops
pguibert6WIND 6bca5a3
zebra: fix update nhg's nexthop FIB flag when skipping route install
pguibert6WIND 601e9e3
zebra: update nexthop flags values when route with nhg is added
pguibert6WIND 984a24b
zebra: update nexthop flags values when route with nhg is updated
pguibert6WIND 581358b
topotests: all_protocol_startup, add duplicate nexthop-group test
pguibert6WIND fddafc7
zebra: add list of prefixes attached to protocol nhg
pguibert6WIND b0cca6a
zebra: add prefix evaluation at NHG updates
pguibert6WIND 4d3c66b
zebra: add nexthop-group prefix-list in show command
pguibert6WIND 459095e
zebra: mark the active flag of nexthop in a separate function
pguibert6WIND 4a84a5c
zebra: create nhg_hash_entry on a separate function
pguibert6WIND 1cf1157
zebra: reuse old nhe when only recursive nexthops changed
pguibert6WIND 4a48a5a
topotests: add nexthop group common library
pguibert6WIND d6e9269
topotests: add sharp_recursive_nexthop test
pguibert6WIND 68c68d4
bgpd: add 'debug bgp nexthop-group' command
pguibert6WIND 3fd2ca7
bgpd: add 'bgp nexthop-group' command
pguibert6WIND a8cdd9c
bgpd: rework bgp_debug_zebra_nh() function
pguibert6WIND 2053ce9
bgpd: add nexthop group framework for l3 routes.
pguibert6WIND b941e93
bgpd: add zapi messaging for bgp nexthop groups.
pguibert6WIND 3129743
bgpd: add nexthop group identifier to each bgp path
pguibert6WIND 7a1bcf1
bgpd: add nexthop tracking support for nexthop-groups
pguibert6WIND d288f8e
bgpd: do not use nhg when prefix resolves over default route or itself
pguibert6WIND 0fb01c6
topotests: add bgp_nhg_topo1 test
pguibert6WIND 4d7c5b4
bgpd: move bgp_path_display code from bgp_nexthop.c to bgpd.c
pguibert6WIND 961dc17
bgpd: add 'show bgp nhg' command
pguibert6WIND e997ba3
bgpd: add the bgp_nhg_connected structure and API
pguibert6WIND 90d4d65
bgpd: move bgp nhg_cache nexthop information into nexthops
pguibert6WIND fcbba6e
bgpd: rework detail part of show_bgp_nhg_id_helper() function
pguibert6WIND 06dd256
bgpd: add a parent nhg hash-list ordered by id
pguibert6WIND d005569
bgpd: extend the bgp_nhg_cache parent group API
pguibert6WIND 4f54c0a
bgpd: add bgp_nhg_nexthop attribute in bgp_path_info
pguibert6WIND 395a027
bgpd: add nhg group support for multiple path routes
pguibert6WIND d844bb4
bgpd: handle the bgp failover events in BGP nexthop-groups
pguibert6WIND 8f64478
bgpd: add display of nexthop-group hierarchy
pguibert6WIND 1b8cfa5
bgpd: link all path entries to parent bgp_nhg
pguibert6WIND 9bb3f46
bgpd: prevent from sending useless ROUTE_ADD messages when NHG is used
pguibert6WIND b48be53
bgpd: add support for nexthop counter per peer
pguibert6WIND 2c59ac3
doc: add bgp user documentation about nexthop-group
pguibert6WIND 414998c
doc: add technical information about bgp nexthop-groups
pguibert6WIND 54650e2
topotests: bgp_nhg_zapi_scalability, add route update avoidance
pguibert6WIND a7224b6
topotests: bgp_nhg_topo2, add test to check for bgp nhg cases
pguibert6WIND b914c94
topotests: bgp_peer_type_multipath, fix test checks 1 active nexthop
pguibert6WIND 85ae24d
topotests: bgp_nhg_zapi_scalability, test recursive routes
pguibert6WIND 898ec0f
topotests: bgp_nhg_topo1, move utility function to lib part
pguibert6WIND 2f9b4ac
topotests: bgp_nhg_topo1, add multiple path tests
pguibert6WIND 06e4905
topotests: bgp_nhg_topo2, fix 6pe option not present
pguibert6WIND af27463
topotests: add bgp_nhg_zapi_scalability ebgp test
pguibert6WIND File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ unsigned long conf_bgp_debug_graceful_restart; | |
unsigned long conf_bgp_debug_evpn_mh; | ||
unsigned long conf_bgp_debug_bfd; | ||
unsigned long conf_bgp_debug_cond_adv; | ||
unsigned long conf_bgp_debug_nexthop_group; | ||
|
||
unsigned long term_bgp_debug_as4; | ||
unsigned long term_bgp_debug_neighbor_events; | ||
|
@@ -80,6 +81,7 @@ unsigned long term_bgp_debug_graceful_restart; | |
unsigned long term_bgp_debug_evpn_mh; | ||
unsigned long term_bgp_debug_bfd; | ||
unsigned long term_bgp_debug_cond_adv; | ||
unsigned long term_bgp_debug_nexthop_group; | ||
|
||
struct list *bgp_debug_neighbor_events_peers = NULL; | ||
struct list *bgp_debug_keepalive_peers = NULL; | ||
|
@@ -2040,6 +2042,40 @@ DEFPY (debug_bgp_evpn_mh, | |
return CMD_SUCCESS; | ||
} | ||
|
||
DEFPY (debug_bgp_nexthop_group, | ||
debug_bgp_nexthop_group_cmd, | ||
"[no$no] debug bgp nexthop-group [detail$detail]", | ||
NO_STR | ||
DEBUG_STR | ||
BGP_STR | ||
"Nexthop Group debugging\n" | ||
"Detailed Nexthop Group debugging\n") | ||
{ | ||
if (vty->node == CONFIG_NODE) { | ||
if (no) { | ||
DEBUG_OFF(nexthop_group, NEXTHOP_GROUP); | ||
DEBUG_OFF(nexthop_group, NEXTHOP_GROUP_DETAIL); | ||
} else { | ||
DEBUG_ON(nexthop_group, NEXTHOP_GROUP); | ||
if (detail) | ||
DEBUG_ON(nexthop_group, NEXTHOP_GROUP_DETAIL); | ||
} | ||
} else { | ||
if (no) { | ||
TERM_DEBUG_OFF(nexthop_group, NEXTHOP_GROUP); | ||
TERM_DEBUG_OFF(nexthop_group, NEXTHOP_GROUP_DETAIL); | ||
vty_out(vty, "BGP nexthop group debugging is off\n"); | ||
} else { | ||
TERM_DEBUG_ON(nexthop_group, NEXTHOP_GROUP); | ||
if (detail) | ||
TERM_DEBUG_ON(nexthop_group, NEXTHOP_GROUP_DETAIL); | ||
vty_out(vty, "BGP nexthop group %sdebugging is on\n", | ||
detail ? "detailed " : ""); | ||
} | ||
} | ||
return CMD_SUCCESS; | ||
} | ||
|
||
DEFUN (debug_bgp_labelpool, | ||
debug_bgp_labelpool_cmd, | ||
"debug bgp labelpool", | ||
|
@@ -2177,6 +2213,8 @@ DEFUN (no_debug_bgp, | |
TERM_DEBUG_OFF(evpn_mh, EVPN_MH_RT); | ||
TERM_DEBUG_OFF(bfd, BFD_LIB); | ||
TERM_DEBUG_OFF(cond_adv, COND_ADV); | ||
TERM_DEBUG_OFF(nexthop_group, NEXTHOP_GROUP); | ||
TERM_DEBUG_OFF(nexthop_group, NEXTHOP_GROUP_DETAIL); | ||
|
||
vty_out(vty, "All possible debugging has been turned off\n"); | ||
|
||
|
@@ -2270,6 +2308,11 @@ DEFUN_NOSH (show_debugging_bgp, | |
vty_out(vty, | ||
" BGP conditional advertisement debugging is on\n"); | ||
|
||
if (BGP_DEBUG(nexthop_group, NEXTHOP_GROUP_DETAIL)) | ||
vty_out(vty, " BGP nexthop group detailed debugging is on\n"); | ||
else if (BGP_DEBUG(nexthop_group, NEXTHOP_GROUP)) | ||
vty_out(vty, " BGP nexthop group debugging is on\n"); | ||
|
||
cmd_show_lib_debugs(vty); | ||
|
||
hook_call(bgp_hook_config_write_debug, vty, false); | ||
|
@@ -2408,6 +2451,14 @@ static int bgp_config_write_debug(struct vty *vty) | |
write++; | ||
} | ||
|
||
if (CONF_BGP_DEBUG(nexthop_group, NEXTHOP_GROUP_DETAIL)) { | ||
vty_out(vty, "debug bgp nexthop-group detail\n"); | ||
write++; | ||
} else if (CONF_BGP_DEBUG(nexthop_group, NEXTHOP_GROUP)) { | ||
vty_out(vty, "debug bgp nexthop-group\n"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit -- should this be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it seems ok to keep bgp as it is |
||
write++; | ||
} | ||
|
||
if (hook_call(bgp_hook_config_write_debug, vty, true)) | ||
write++; | ||
|
||
|
@@ -2545,6 +2596,10 @@ void bgp_debug_init(void) | |
/* debug bgp conditional advertisement */ | ||
install_element(ENABLE_NODE, &debug_bgp_cond_adv_cmd); | ||
install_element(CONFIG_NODE, &debug_bgp_cond_adv_cmd); | ||
|
||
/* debug bgp nexthop group [detail] */ | ||
install_element(ENABLE_NODE, &debug_bgp_nexthop_group_cmd); | ||
install_element(CONFIG_NODE, &debug_bgp_nexthop_group_cmd); | ||
} | ||
|
||
/* Return true if this prefix is on the per_prefix_list of prefixes to debug | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Above you print
BGP Nexthop Group debugging is on
(Nexthop capital first), here not, which one is right?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.
let use lower case