summaryrefslogtreecommitdiff
path: root/isisd/isis_ldp_sync.c
diff options
context:
space:
mode:
authorsri-mohan1 <sri.mohan@samsung.com>2022-08-29 19:05:24 +0530
committersri-mohan1 <sri.mohan@samsung.com>2022-08-29 20:37:32 +0530
commit11106e287fcfa9fdba284062d790fcc01213cfcd (patch)
treee96ddb28be1849200fbb5b3e9f171c434ee76780 /isisd/isis_ldp_sync.c
parent1f46f33f9a8d6c7b8a887e34ad8f7a52f44c1187 (diff)
isisd: changes for code maintainability
these changes are for improving the code maintainability Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
Diffstat (limited to 'isisd/isis_ldp_sync.c')
-rw-r--r--isisd/isis_ldp_sync.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/isisd/isis_ldp_sync.c b/isisd/isis_ldp_sync.c
index fb605eb07a..3568543b4a 100644
--- a/isisd/isis_ldp_sync.c
+++ b/isisd/isis_ldp_sync.c
@@ -82,7 +82,7 @@ int isis_ldp_sync_state_update(struct ldp_igp_sync_if_state state)
return 0;
/* received ldp-sync interface state from LDP */
- ils_debug("ldp_sync: rcvd %s from LDP if %s",
+ ils_debug("%s: rcvd %s from LDP if %s", __func__,
state.sync_start ? "sync-start" : "sync-complete", ifp->name);
if (state.sync_start)
isis_ldp_sync_if_start(circuit, false);
@@ -106,7 +106,7 @@ int isis_ldp_sync_announce_update(struct ldp_igp_sync_announce announce)
if (announce.proto != ZEBRA_ROUTE_LDP)
return 0;
- ils_debug("ldp_sync: rcvd announce from LDP");
+ ils_debug("%s: rcvd announce from LDP", __func__);
/* LDP just started up:
* set cost to LSInfinity
@@ -128,8 +128,7 @@ void isis_ldp_sync_state_req_msg(struct isis_circuit *circuit)
struct ldp_igp_sync_if_state_req request;
struct interface *ifp = circuit->interface;
- ils_debug("ldp_sync: send state request to LDP for %s",
- ifp->name);
+ ils_debug("%s: send state request to LDP for %s", __func__, ifp->name);
memset(&request, 0, sizeof(request));
strlcpy(request.name, ifp->name, sizeof(ifp->name));
@@ -159,7 +158,7 @@ void isis_ldp_sync_if_start(struct isis_circuit *circuit,
if (ldp_sync_info &&
ldp_sync_info->enabled == LDP_IGP_SYNC_ENABLED &&
ldp_sync_info->state != LDP_IGP_SYNC_STATE_NOT_REQUIRED) {
- ils_debug("ldp_sync: start on if %s state: %s",
+ ils_debug("%s: start on if %s state: %s", __func__,
circuit->interface->name, "Holding down until Sync");
ldp_sync_info->state = LDP_IGP_SYNC_STATE_REQUIRED_NOT_UP;
isis_ldp_sync_set_if_metric(circuit, true);
@@ -246,7 +245,8 @@ static int isis_ldp_sync_adj_state_change(struct isis_adjacency *adj)
else
ldp_sync_info->state = LDP_IGP_SYNC_STATE_NOT_REQUIRED;
- ils_debug("ldp_sync: down on if %s", circuit->interface->name);
+ ils_debug("%s: down on if %s", __func__,
+ circuit->interface->name);
ldp_sync_if_down(circuit->ldp_sync_info);
}
@@ -362,8 +362,8 @@ static void isis_ldp_sync_holddown_timer(struct thread *thread)
ldp_sync_info->state = LDP_IGP_SYNC_STATE_REQUIRED_UP;
ldp_sync_info->t_holddown = NULL;
- ils_debug("ldp_sync: holddown timer expired for %s state:sync achieved",
- circuit->interface->name);
+ ils_debug("%s: holddown timer expired for %s state:sync achieved",
+ __func__, circuit->interface->name);
isis_ldp_sync_set_if_metric(circuit, true);
}
@@ -383,7 +383,7 @@ void isis_ldp_sync_holddown_timer_add(struct isis_circuit *circuit)
ldp_sync_info->holddown == LDP_IGP_SYNC_HOLDDOWN_DEFAULT)
return;
- ils_debug("ldp_sync: start holddown timer for %s time %d",
+ ils_debug("%s: start holddown timer for %s time %d", __func__,
circuit->interface->name, ldp_sync_info->holddown);
thread_add_timer(master, isis_ldp_sync_holddown_timer,
@@ -413,7 +413,7 @@ void isis_ldp_sync_handle_client_close(struct zapi_client_close_info *info)
* set cost to LSInfinity
* send request to LDP for LDP-SYNC state for each interface
*/
- zlog_err("ldp_sync: LDP down");
+ zlog_err("%s: LDP down", __func__);
for (ALL_LIST_ELEMENTS_RO(isis->area_list, anode, area)) {
if (!CHECK_FLAG(area->ldp_sync_cmd.flags, LDP_SYNC_FLAG_ENABLE))
@@ -488,7 +488,7 @@ void isis_if_ldp_sync_enable(struct isis_circuit *circuit)
if (circuit->interface->vrf->vrf_id != VRF_DEFAULT)
return;
- ils_debug("ldp_sync: enable if %s", circuit->interface->name);
+ ils_debug("%s: enable if %s", __func__, circuit->interface->name);
if (!CHECK_FLAG(area->ldp_sync_cmd.flags, LDP_SYNC_FLAG_ENABLE))
return;
@@ -507,7 +507,7 @@ void isis_if_ldp_sync_enable(struct isis_circuit *circuit)
isis_ldp_sync_state_req_msg(circuit);
} else {
ldp_sync_info->state = LDP_IGP_SYNC_STATE_NOT_REQUIRED;
- ils_debug("ldp_sync: Sync only runs on P2P links %s",
+ ils_debug("%s: Sync only runs on P2P links %s", __func__,
circuit->interface->name);
}
}
@@ -525,7 +525,7 @@ void isis_if_ldp_sync_disable(struct isis_circuit *circuit)
if (if_is_loopback(circuit->interface))
return;
- ils_debug("ldp_sync: remove if %s", circuit->interface->name);
+ ils_debug("%s: remove if %s", __func__, circuit->interface->name);
if (!CHECK_FLAG(area->ldp_sync_cmd.flags, LDP_SYNC_FLAG_ENABLE))
return;