summaryrefslogtreecommitdiff
path: root/lib/routemap.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-12-17 22:25:27 -0500
committerDonald Sharp <sharpd@nvidia.com>2020-12-18 14:08:33 -0500
commitaf87aff65d0c3d07622d2e8726a112fd5c899165 (patch)
tree7be8d280786337bafc8efeead5f2d2e93e33f7a5 /lib/routemap.c
parentdb8db5804d8425cb8e1cbb8af37160153d548891 (diff)
lib: Add some useful debugs to understand what is going on
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/routemap.c')
-rw-r--r--lib/routemap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/routemap.c b/lib/routemap.c
index f4c1648fea..bd97845564 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -2590,6 +2590,11 @@ static void route_map_clear_reference(struct hash_bucket *bucket, void *arg)
tmp_dep_data.rname = arg;
dep_data = hash_release(dep->dep_rmap_hash, &tmp_dep_data);
if (dep_data) {
+ if (rmap_debug)
+ zlog_debug("Clearing reference for %s to %s count: %d",
+ dep->dep_name, tmp_dep_data.rname,
+ dep_data->refcnt);
+
XFREE(MTYPE_ROUTE_MAP_NAME, dep_data->rname);
XFREE(MTYPE_ROUTE_MAP_DEP_DATA, dep_data);
}
@@ -2605,6 +2610,9 @@ static void route_map_clear_all_references(char *rmap_name)
{
int i;
+ if (rmap_debug)
+ zlog_debug("Clearing references for %s", rmap_name);
+
for (i = 1; i < ROUTE_MAP_DEP_MAX; i++) {
hash_iterate(route_map_dep_hash[i], route_map_clear_reference,
(void *)rmap_name);