Skip to content

Commit

Permalink
bgpd: backpressure - Improve debuggability
Browse files Browse the repository at this point in the history
Improve debuggability in backpressure code.

Ticket :#3980988

Signed-off-by: Rajasekar Raja <[email protected]>
  • Loading branch information
raja-rajasekar committed Jul 15, 2024
1 parent 4395fcd commit 186db96
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3939,13 +3939,15 @@ int bgp_delete(struct bgp *bgp)
struct bgp_dest *dest_next = NULL;
struct bgp_table *dest_table = NULL;
struct graceful_restart_info *gr_info;
uint32_t cnt_before, cnt_after;

assert(bgp);

/*
* Iterate the pending dest list and remove all the dest pertaininig to
* the bgp under delete.
*/
cnt_before = zebra_announce_count(&bm->zebra_announce_head);
for (dest = zebra_announce_first(&bm->zebra_announce_head); dest;
dest = dest_next) {
dest_next = zebra_announce_next(&bm->zebra_announce_head, dest);
Expand All @@ -3957,6 +3959,11 @@ int bgp_delete(struct bgp *bgp)
}
}

cnt_after = zebra_announce_count(&bm->zebra_announce_head);
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("Zebra Announce Fifo cleanup count before %u and after %u during BGP %s deletion",
cnt_before, cnt_after, bgp->name_pretty);

bgp_soft_reconfig_table_task_cancel(bgp, NULL, NULL);

/* make sure we withdraw any exported routes */
Expand Down

0 comments on commit 186db96

Please sign in to comment.