mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 13:33:15 +00:00
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>
This commit is contained in:
parent
7140b00cb0
commit
47c1d76a6c
@ -870,16 +870,27 @@ static void netlink_proc_dplane_if_protodown(struct zebra_if *zif,
|
|||||||
|
|
||||||
if (zebra_evpn_is_es_bond_member(zif->ifp)) {
|
if (zebra_evpn_is_es_bond_member(zif->ifp)) {
|
||||||
/* Check it's not already being sent to the dplane first */
|
/* 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;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!protodown
|
if (!protodown &&
|
||||||
&& CHECK_FLAG(zif->flags, ZIF_FLAG_UNSET_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;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (IS_ZEBRA_DEBUG_EVPN_MH_ES || IS_ZEBRA_DEBUG_KERNEL)
|
if (IS_ZEBRA_DEBUG_EVPN_MH_ES || IS_ZEBRA_DEBUG_KERNEL)
|
||||||
zlog_debug(
|
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");
|
zif->ifp->name, old_protodown ? "on" : "off");
|
||||||
|
|
||||||
if (old_protodown)
|
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)
|
void if_netlink_set_frr_protodown_r_bit(uint8_t bit)
|
||||||
{
|
{
|
||||||
if (IS_ZEBRA_DEBUG_KERNEL)
|
if (IS_ZEBRA_DEBUG_KERNEL)
|
||||||
zlog_debug("FRR protodown reason bit change %u -> %u",
|
zlog_debug(
|
||||||
frr_protodown_r_bit, bit);
|
"Protodown reason bit index changed: bit-index %u -> bit-index %u",
|
||||||
|
frr_protodown_r_bit, bit);
|
||||||
|
|
||||||
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)
|
void if_netlink_unset_frr_protodown_r_bit(void)
|
||||||
{
|
{
|
||||||
if (IS_ZEBRA_DEBUG_KERNEL)
|
if (IS_ZEBRA_DEBUG_KERNEL)
|
||||||
zlog_debug("FRR protodown reason bit change %u -> %u",
|
zlog_debug(
|
||||||
frr_protodown_r_bit,
|
"Protodown reason bit index changed: bit-index %u -> bit-index %u",
|
||||||
FRR_PROTODOWN_REASON_DEFAULT_BIT);
|
frr_protodown_r_bit, FRR_PROTODOWN_REASON_DEFAULT_BIT);
|
||||||
|
|
||||||
frr_protodown_r_bit = FRR_PROTODOWN_REASON_DEFAULT_BIT;
|
frr_protodown_r_bit = FRR_PROTODOWN_REASON_DEFAULT_BIT;
|
||||||
}
|
}
|
||||||
|
@ -3470,7 +3470,8 @@ void zebra_evpn_mh_json(json_object *json)
|
|||||||
json_object_new_string("startupDelay"));
|
json_object_new_string("startupDelay"));
|
||||||
if (CHECK_FLAG(zmh_info->protodown_rc,
|
if (CHECK_FLAG(zmh_info->protodown_rc,
|
||||||
ZEBRA_PROTODOWN_EVPN_UPLINK_DOWN))
|
ZEBRA_PROTODOWN_EVPN_UPLINK_DOWN))
|
||||||
json_object_array_add(json_array,
|
json_object_array_add(
|
||||||
|
json_array,
|
||||||
json_object_new_string("uplinkDown"));
|
json_object_new_string("uplinkDown"));
|
||||||
json_object_object_add(json, "protodownReasons", json_array);
|
json_object_object_add(json, "protodownReasons", json_array);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user