Skip to content

Commit 186db96

Browse files
bgpd: backpressure - Improve debuggability
Improve debuggability in backpressure code. Ticket :#3980988 Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
1 parent 4395fcd commit 186db96

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bgpd/bgpd.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3939,13 +3939,15 @@ int bgp_delete(struct bgp *bgp)
39393939
struct bgp_dest *dest_next = NULL;
39403940
struct bgp_table *dest_table = NULL;
39413941
struct graceful_restart_info *gr_info;
3942+
uint32_t cnt_before, cnt_after;
39423943

39433944
assert(bgp);
39443945

39453946
/*
39463947
* Iterate the pending dest list and remove all the dest pertaininig to
39473948
* the bgp under delete.
39483949
*/
3950+
cnt_before = zebra_announce_count(&bm->zebra_announce_head);
39493951
for (dest = zebra_announce_first(&bm->zebra_announce_head); dest;
39503952
dest = dest_next) {
39513953
dest_next = zebra_announce_next(&bm->zebra_announce_head, dest);
@@ -3957,6 +3959,11 @@ int bgp_delete(struct bgp *bgp)
39573959
}
39583960
}
39593961

3962+
cnt_after = zebra_announce_count(&bm->zebra_announce_head);
3963+
if (BGP_DEBUG(zebra, ZEBRA))
3964+
zlog_debug("Zebra Announce Fifo cleanup count before %u and after %u during BGP %s deletion",
3965+
cnt_before, cnt_after, bgp->name_pretty);
3966+
39603967
bgp_soft_reconfig_table_task_cancel(bgp, NULL, NULL);
39613968

39623969
/* make sure we withdraw any exported routes */

0 commit comments

Comments
 (0)