summaryrefslogtreecommitdiff
path: root/zebra/if_netlink.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@nvidia.com>2022-02-15 18:53:01 -0500
committerStephen Worley <sworley@nvidia.com>2022-03-09 18:02:45 -0500
commit47c1d76a6c79fb0460a7079f9e24228bc9052877 (patch)
tree79ba28e5f4478513aa084a36781deebcde9c7148 /zebra/if_netlink.c
parent7140b00cb0c0f9e9f007f092890f04166a9a66f8 (diff)
zebra: cleanup protodown netlink logs
Cleanup the logs in the netlink code for setting protodown on/off to be more useful to a user parsing them after an issue. Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to 'zebra/if_netlink.c')
-rw-r--r--zebra/if_netlink.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c
index e21ff533ec..f26f798364 100644
--- a/zebra/if_netlink.c
+++ b/zebra/if_netlink.c
@@ -870,16 +870,27 @@ static void netlink_proc_dplane_if_protodown(struct zebra_if *zif,
if (zebra_evpn_is_es_bond_member(zif->ifp)) {
/* Check it's not already being sent to the dplane first */
- if (protodown && CHECK_FLAG(zif->flags, ZIF_FLAG_SET_PROTODOWN))
+ if (protodown &&
+ CHECK_FLAG(zif->flags, ZIF_FLAG_SET_PROTODOWN)) {
+ if (IS_ZEBRA_DEBUG_EVPN_MH_ES || IS_ZEBRA_DEBUG_KERNEL)
+ zlog_debug(
+ "bond mbr %s protodown on recv'd but already sent protodown on to the dplane",
+ zif->ifp->name);
return;
+ }
- if (!protodown
- && CHECK_FLAG(zif->flags, ZIF_FLAG_UNSET_PROTODOWN))
+ if (!protodown &&
+ CHECK_FLAG(zif->flags, ZIF_FLAG_UNSET_PROTODOWN)) {
+ if (IS_ZEBRA_DEBUG_EVPN_MH_ES || IS_ZEBRA_DEBUG_KERNEL)
+ zlog_debug(
+ "bond mbr %s protodown off recv'd but already sent protodown off to the dplane",
+ zif->ifp->name);
return;
+ }
if (IS_ZEBRA_DEBUG_EVPN_MH_ES || IS_ZEBRA_DEBUG_KERNEL)
zlog_debug(
- "bond mbr %s re-instate protdown %s in the dplane",
+ "bond mbr %s reinstate protodown %s in the dplane",
zif->ifp->name, old_protodown ? "on" : "off");
if (old_protodown)
@@ -2227,8 +2238,9 @@ void interface_list(struct zebra_ns *zns)
void if_netlink_set_frr_protodown_r_bit(uint8_t bit)
{
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("FRR protodown reason bit change %u -> %u",
- frr_protodown_r_bit, bit);
+ zlog_debug(
+ "Protodown reason bit index changed: bit-index %u -> bit-index %u",
+ frr_protodown_r_bit, bit);
frr_protodown_r_bit = bit;
}
@@ -2236,9 +2248,9 @@ void if_netlink_set_frr_protodown_r_bit(uint8_t bit)
void if_netlink_unset_frr_protodown_r_bit(void)
{
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("FRR protodown reason bit change %u -> %u",
- frr_protodown_r_bit,
- FRR_PROTODOWN_REASON_DEFAULT_BIT);
+ zlog_debug(
+ "Protodown reason bit index changed: bit-index %u -> bit-index %u",
+ frr_protodown_r_bit, FRR_PROTODOWN_REASON_DEFAULT_BIT);
frr_protodown_r_bit = FRR_PROTODOWN_REASON_DEFAULT_BIT;
}