summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-09-17 20:17:14 -0400
committerDonald Sharp <sharpd@nvidia.com>2020-09-17 20:17:14 -0400
commitc7384cf86a1673fbf8deb2689642e2d69b9f9993 (patch)
tree13e3db3f71c2c44fd6901e4ecacf1f02562e5117
parent0cbee799d526fbe0692822d97d7ec227f30ab962 (diff)
lib: Add vrf name to vrf debugs
The vrf name was not being printed out in some vrf debugs. Add this data in so people don't have to remember the vrf id. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--lib/vrf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/vrf.c b/lib/vrf.c
index 825e54baeb..5755cc75f9 100644
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -225,7 +225,8 @@ struct vrf *vrf_get(vrf_id_t vrf_id, const char *name)
void vrf_delete(struct vrf *vrf)
{
if (debug_vrf)
- zlog_debug("VRF %u is to be deleted.", vrf->vrf_id);
+ zlog_debug("VRF %s(%u) is to be deleted.", vrf->name,
+ vrf->vrf_id);
if (vrf_is_enabled(vrf))
vrf_disable(vrf);
@@ -282,7 +283,7 @@ int vrf_enable(struct vrf *vrf)
return 1;
if (debug_vrf)
- zlog_debug("VRF %u is enabled.", vrf->vrf_id);
+ zlog_debug("VRF %s(%u) is enabled.", vrf->name, vrf->vrf_id);
SET_FLAG(vrf->status, VRF_ACTIVE);
@@ -312,7 +313,8 @@ void vrf_disable(struct vrf *vrf)
UNSET_FLAG(vrf->status, VRF_ACTIVE);
if (debug_vrf)
- zlog_debug("VRF %u is to be disabled.", vrf->vrf_id);
+ zlog_debug("VRF %s(%u) is to be disabled.", vrf->name,
+ vrf->vrf_id);
/* Till now, nothing to be done for the default VRF. */
// Pending: see why this statement.