diff options
37 files changed, 300 insertions, 335 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 0e1278b1d..26a22c399 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -3398,8 +3398,9 @@ int bgp_delete(struct bgp *bgp) /* Deregister from Zebra, if needed */ if (IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) { if (BGP_DEBUG(zebra, ZEBRA)) - zlog_debug("%s: deregistering this bgp %s instance from zebra", - __PRETTY_FUNCTION__, bgp->name); + zlog_debug( + "%s: deregistering this bgp %s instance from zebra", + __func__, bgp->name); bgp_zebra_instance_deregister(bgp); } diff --git a/lib/wheel.c b/lib/wheel.c index 214e5e816..f5e5cc52c 100644 --- a/lib/wheel.c +++ b/lib/wheel.c @@ -47,8 +47,8 @@ static int wheel_timer_thread_helper(struct thread *t) curr_slot = wheel->curr_slot % wheel->slots; if (debug_timer_wheel) - zlog_debug("%s: Wheel Slot: %lld(%lld) count: %d", - __PRETTY_FUNCTION__, wheel->curr_slot, curr_slot, + zlog_debug("%s: Wheel Slot: %lld(%lld) count: %d", __func__, + wheel->curr_slot, curr_slot, listcount(wheel->wheel_slot_lists[curr_slot])); for (ALL_LIST_ELEMENTS(wheel->wheel_slot_lists[curr_slot], node, diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index b0d501dab..ead186b6f 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -763,11 +763,13 @@ void ospf6_abr_old_path_update(struct ospf6_route *old_route, } if (IS_OSPF6_DEBUG_ABR || IS_OSPF6_DEBUG_EXAMIN(INTER_PREFIX)) - zlog_debug("%s: paths %u nh %u", __PRETTY_FUNCTION__, - old_route->paths ? - listcount(old_route->paths) : 0, - old_route->nh_list ? - listcount(old_route->nh_list) : 0); + zlog_debug("%s: paths %u nh %u", __func__, + old_route->paths + ? listcount(old_route->paths) + : 0, + old_route->nh_list + ? listcount(old_route->nh_list) + : 0); if (table->hook_add) (*table->hook_add)(old_route); @@ -823,9 +825,10 @@ void ospf6_abr_old_route_remove(struct ospf6_lsa *lsa, prefix2str(&old->prefix, buf, sizeof(buf)); zlog_debug("%s: old %s updated nh %u", - __PRETTY_FUNCTION__, buf, - old->nh_list ? - listcount(old->nh_list) : 0); + __func__, buf, + old->nh_list ? listcount( + old->nh_list) + : 0); } if (table->hook_add) @@ -879,8 +882,8 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) if (lsa->header->type == htons(OSPF6_LSTYPE_INTER_PREFIX)) { if (IS_OSPF6_DEBUG_EXAMIN(INTER_PREFIX)) { is_debug++; - zlog_debug("%s: Examin %s in area %s", - __PRETTY_FUNCTION__, lsa->name, oa->name); + zlog_debug("%s: Examin %s in area %s", __func__, + lsa->name, oa->name); } prefix_lsa = @@ -899,8 +902,8 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) } else if (lsa->header->type == htons(OSPF6_LSTYPE_INTER_ROUTER)) { if (IS_OSPF6_DEBUG_EXAMIN(INTER_ROUTER)) { is_debug++; - zlog_debug("%s: Examin %s in area %s", - __PRETTY_FUNCTION__, lsa->name, oa->name); + zlog_debug("%s: Examin %s in area %s", __func__, + lsa->name, oa->name); } router_lsa = @@ -947,9 +950,10 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) old = route; if (is_debug) - zlog_debug("%s: old entry found in paths, adv_router %s", - __PRETTY_FUNCTION__, - adv_router); + zlog_debug( + "%s: old entry found in paths, adv_router %s", + __func__, + adv_router); break; } @@ -974,8 +978,8 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) } if (OSPF6_LSA_IS_MAXAGE(lsa)) { if (is_debug) - zlog_debug("%s: LSA %s is MaxAge, ignore", - __PRETTY_FUNCTION__, lsa->name); + zlog_debug("%s: LSA %s is MaxAge, ignore", __func__, + lsa->name); if (old) ospf6_abr_old_route_remove(lsa, old, table); return; @@ -1054,21 +1058,21 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) || CHECK_FLAG(abr_entry->flag, OSPF6_ROUTE_REMOVE) || !CHECK_FLAG(abr_entry->path.router_bits, OSPF6_ROUTER_BIT_B)) { if (is_debug) - zlog_debug("%s: ABR router entry does not exist, ignore", - __PRETTY_FUNCTION__); + zlog_debug( + "%s: ABR router entry does not exist, ignore", + __func__); if (old) { if (old->type == OSPF6_DEST_TYPE_ROUTER && oa->intra_brouter_calc) { if (is_debug) zlog_debug( - "%s: intra_brouter_calc is on, skip brouter remove: %s (%p)", - __PRETTY_FUNCTION__, buf, - (void *)old); + "%s: intra_brouter_calc is on, skip brouter remove: %s (%p)", + __func__, buf, (void *)old); } else { if (is_debug) - zlog_debug("%s: remove old entry: %s %p ", - __PRETTY_FUNCTION__, buf, - (void *)old); + zlog_debug( + "%s: remove old entry: %s %p ", + __func__, buf, (void *)old); ospf6_route_remove(old, table); } } @@ -1143,11 +1147,10 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) if ((ospf6_route_cmp(route, old_route) != 0)) { if (is_debug) { prefix2str(&prefix, buf, sizeof(buf)); - zlog_debug("%s: old %p %s cost %u new route cost %u are not same", - __PRETTY_FUNCTION__, - (void *)old_route, buf, - old_route->path.cost, - route->path.cost); + zlog_debug( + "%s: old %p %s cost %u new route cost %u are not same", + __func__, (void *)old_route, buf, + old_route->path.cost, route->path.cost); } /* Check new route's adv. router is same in one of @@ -1186,14 +1189,15 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) inet_ntop(AF_INET, &ecmp_path->origin.adv_router, adv_router, sizeof(adv_router)); - zlog_debug("%s: route %s cost %u another path %s added with nh %u, effective paths %u nh %u", - __PRETTY_FUNCTION__, buf, - old_route->path.cost, - adv_router, - listcount(ecmp_path->nh_list), - old_route->paths ? - listcount(old_route->paths) : 0, - listcount(old_route->nh_list)); + zlog_debug( + "%s: route %s cost %u another path %s added with nh %u, effective paths %u nh %u", + __func__, buf, old_route->path.cost, + adv_router, + listcount(ecmp_path->nh_list), + old_route->paths + ? listcount(old_route->paths) + : 0, + listcount(old_route->nh_list)); } } else { /* adv. router exists in the list, update the nhs */ @@ -1202,10 +1206,11 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) } if (is_debug) - zlog_debug("%s: Update route: %s %p old cost %u new cost %u nh %u", - __PRETTY_FUNCTION__, buf, (void *)old_route, - old_route->path.cost, route->path.cost, - listcount(route->nh_list)); + zlog_debug( + "%s: Update route: %s %p old cost %u new cost %u nh %u", + __func__, buf, (void *)old_route, + old_route->path.cost, route->path.cost, + listcount(route->nh_list)); /* For Inter-Prefix route: Update RIB/FIB, * For Inter-Router trigger summary update @@ -1222,9 +1227,10 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) if (is_debug) { inet_ntop(AF_INET, &route->path.origin.adv_router, adv_router, sizeof(adv_router)); - zlog_debug("%s: Install route: %s cost %u nh %u adv_router %s ", - __PRETTY_FUNCTION__, buf, route->path.cost, - listcount(route->nh_list), adv_router); + zlog_debug( + "%s: Install route: %s cost %u nh %u adv_router %s ", + __func__, buf, route->path.cost, + listcount(route->nh_list), adv_router); } path = ospf6_path_dup(&route->path); diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 486e4d8d2..805e411c7 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -166,7 +166,7 @@ int ospf6_orig_as_external_lsa(struct thread *thread) if (IS_OSPF6_DEBUG_ASBR) zlog_debug( "%s: Send update of AS-External LSA %s seq 0x%x", - __PRETTY_FUNCTION__, lsa->name, + __func__, lsa->name, ntohl(lsa->header->seqnum)); ospf6_flood_interface(NULL, lsa, oi); @@ -245,7 +245,7 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, sizeof(buf)); zlog_debug( "%s: route %s cost old %u new %u is not same, replace route", - __PRETTY_FUNCTION__, buf, o_path->cost, + __func__, buf, o_path->cost, route->path.cost); } @@ -309,7 +309,7 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, sizeof(buf)); zlog_debug( "%s: route %s old cost %u new cost %u, delete old entry.", - __PRETTY_FUNCTION__, buf, + __func__, buf, old_route->path.cost, route->path.cost); } @@ -340,8 +340,7 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, sizeof(buf)); zlog_debug( "%s: old route %s path cost %u e2 %u", - __PRETTY_FUNCTION__, buf, - old_route->path.cost, + __func__, buf, old_route->path.cost, old_route->path.u.cost_e2); } route_found = true; @@ -378,13 +377,11 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, sizeof(buf)); zlog_debug( "%s: route %s another path added with nh %u, effective paths %u nh %u", - __PRETTY_FUNCTION__, buf, + __func__, buf, listcount(ecmp_path->nh_list), - old_route->paths - ? listcount( - old_route - ->paths) - : 0, + old_route->paths ? listcount( + old_route->paths) + : 0, listcount(old_route->nh_list)); } } else { @@ -410,9 +407,9 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, AS_EXTERNAL)) { prefix2str(&old_route->prefix, buf, sizeof(buf)); - zlog_debug("%s: ls_prfix %s asbr_entry not found.", - __PRETTY_FUNCTION__, - buf); + zlog_debug( + "%s: ls_prfix %s asbr_entry not found.", + __func__, buf); } continue; } @@ -422,12 +419,15 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL)) { prefix2str(&route->prefix, buf, sizeof(buf)); - zlog_debug("%s: route %s with effective paths %u nh %u", - __PRETTY_FUNCTION__, buf, - old_route->paths ? - listcount(old_route->paths) : 0, - old_route->nh_list ? - listcount(old_route->nh_list) : 0); + zlog_debug( + "%s: route %s with effective paths %u nh %u", + __func__, buf, + old_route->paths + ? listcount(old_route->paths) + : 0, + old_route->nh_list + ? listcount(old_route->nh_list) + : 0); } /* Update RIB/FIB */ @@ -621,9 +621,8 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, prefix2str(&prefix, buf, sizeof(buf)); zlog_debug( "%s: Current route %s cost %u e2 %u, route to del cost %u e2 %u", - __PRETTY_FUNCTION__, buf, route->path.cost, - route->path.u.cost_e2, route_to_del->path.cost, - route_to_del->path.u.cost_e2); + __func__, buf, route->path.cost, route->path.u.cost_e2, + route_to_del->path.cost, route_to_del->path.u.cost_e2); } for (ospf6_route_lock(route); @@ -670,8 +669,8 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, sizeof(buf)); zlog_debug( "%s: route %s to delete is not same, cost %u del cost %u. skip", - __PRETTY_FUNCTION__, - buf, route->path.cost, + __func__, buf, + route->path.cost, route_to_del->path .cost); } @@ -682,8 +681,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, prefix2str(&prefix, buf, sizeof(buf)); zlog_debug( "%s: route %s path found with cost %u nh %u to remove.", - __PRETTY_FUNCTION__, buf, - route->path.cost, + __func__, buf, route->path.cost, listcount(o_path->nh_list)); } @@ -726,14 +724,15 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, sizeof(buf)); zlog_debug( "%s: AS-External %u route %s update paths %u nh %u", - __PRETTY_FUNCTION__, + __func__, (route->path.type == OSPF6_PATH_TYPE_EXTERNAL1) ? 1 : 2, buf, listcount(route->paths), - route->nh_list ? - listcount(route->nh_list) : 0); + route->nh_list ? listcount( + route->nh_list) + : 0); } if (listcount(route->paths)) { @@ -785,8 +784,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, prefix2str(&prefix, buf, sizeof(buf)); zlog_debug( "%s: route %s to delete is not same, cost %u del cost %u. skip", - __PRETTY_FUNCTION__, buf, - route->path.cost, + __func__, buf, route->path.cost, route_to_del->path.cost); } continue; @@ -802,7 +800,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, prefix2str(&route->prefix, buf, sizeof(buf)); zlog_debug( "%s: AS-External %u route remove %s cost %u(%u) nh %u", - __PRETTY_FUNCTION__, + __func__, route->path.type == OSPF6_PATH_TYPE_EXTERNAL1 ? 1 : 2, diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index 891421b7e..85d02c186 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -373,7 +373,7 @@ void ospf6_flood_interface(struct ospf6_neighbor *from, struct ospf6_lsa *lsa, if (is_debug) zlog_debug( "%s: Send LSA %s (age %d) update now", - __PRETTY_FUNCTION__, lsa->name, + __func__, lsa->name, ntohs(lsa->header->age)); ospf6_lsupdate_send_neighbor_now(on, lsa); continue; diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index 192e6356b..9c239b75f 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -1022,8 +1022,9 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread) */ if (oa->intra_prefix_originate) { if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) - zlog_debug("%s: Re-originate intra prefix LSA, Current full nbrs %u", - __PRETTY_FUNCTION__, oa->full_nbrs); + zlog_debug( + "%s: Re-originate intra prefix LSA, Current full nbrs %u", + __func__, oa->full_nbrs); if (old) ospf6_lsa_purge_multi_ls_id(oa, old); oa->intra_prefix_originate = 0; @@ -1401,9 +1402,10 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa, if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) { prefix2str(&old_route->prefix, buf, sizeof(buf)); - zlog_debug("%s: route %s cost old %u new %u is not same, replace route", - __PRETTY_FUNCTION__, buf, - o_path->cost, route->path.cost); + zlog_debug( + "%s: route %s cost old %u new %u is not same, replace route", + __func__, buf, o_path->cost, + route->path.cost); } /* Remove selected current path's nh from @@ -1458,10 +1460,11 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa, if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) { prefix2str(&old_route->prefix, buf, sizeof(buf)); - zlog_debug("%s: route %s old cost %u new cost %u, delete old entry.", - __PRETTY_FUNCTION__, buf, - old_route->path.cost, - route->path.cost); + zlog_debug( + "%s: route %s old cost %u new cost %u, delete old entry.", + __func__, buf, + old_route->path.cost, + route->path.cost); } if (oa->route_table->hook_remove) ospf6_route_remove(old_route, @@ -1516,13 +1519,13 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa, sizeof(buf)); zlog_debug( "%s: route %s %p another path added with nh %u, effective paths %u nh %u", - __PRETTY_FUNCTION__, buf, + __func__, buf, (void *)old_route, listcount(ecmp_path->nh_list), - old_route->paths ? - listcount(old_route->paths) : 0, + old_route->paths ? listcount( + old_route->paths) + : 0, listcount(old_route->nh_list)); - } } else { list_delete_all_node(o_path->nh_list); @@ -1540,9 +1543,9 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa, oa->spf_table); if (ls_entry == NULL) { if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) - zlog_debug("%s: ls_prfix %s ls_entry not found.", - __PRETTY_FUNCTION__, - buf); + zlog_debug( + "%s: ls_prfix %s ls_entry not found.", + __func__, buf); continue; } lsa = ospf6_lsdb_lookup(o_path->origin.type, @@ -1559,9 +1562,9 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa, o_path->origin.id, &adv_prefix); prefix2str(&adv_prefix, buf, sizeof(buf)); - zlog_debug("%s: adv_router %s lsa not found", - __PRETTY_FUNCTION__, - buf); + zlog_debug( + "%s: adv_router %s lsa not found", + __func__, buf); } continue; } @@ -1587,12 +1590,13 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa, if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) { prefix2str(&route->prefix, buf, sizeof(buf)); - zlog_debug("%s: route %s %p with final effective paths %u nh%u", - __PRETTY_FUNCTION__, buf, - (void *)old_route, - old_route->paths ? - listcount(old_route->paths) : 0, - listcount(old_route->nh_list)); + zlog_debug( + "%s: route %s %p with final effective paths %u nh%u", + __func__, buf, (void *)old_route, + old_route->paths + ? listcount(old_route->paths) + : 0, + listcount(old_route->nh_list)); } /* used in intra_route_calculation() to add to @@ -1784,7 +1788,7 @@ static void ospf6_intra_prefix_lsa_remove_update_route(struct ospf6_lsa *lsa, prefix2str(&route->prefix, buf, sizeof(buf)); zlog_debug( "%s: route %s path found with cost %u nh %u to remove.", - __PRETTY_FUNCTION__, buf, o_path->cost, + __func__, buf, o_path->cost, listcount(o_path->nh_list)); } @@ -1820,11 +1824,10 @@ static void ospf6_intra_prefix_lsa_remove_update_route(struct ospf6_lsa *lsa, if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) { prefix2str(&route->prefix, buf, sizeof(buf)); - zlog_debug("%s: route %s update paths %u nh %u", - __PRETTY_FUNCTION__, buf, - route->paths ? listcount(route->paths) : 0, - route->nh_list ? listcount(route->nh_list) - : 0); + zlog_debug( + "%s: route %s update paths %u nh %u", __func__, + buf, route->paths ? listcount(route->paths) : 0, + route->nh_list ? listcount(route->nh_list) : 0); } /* Update Global Route table and diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index 524017a31..b0fe890d3 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -1089,7 +1089,7 @@ void ospf6_remove_temp_router_lsa(struct ospf6_area *area) if (IS_OSPF6_DEBUG_SPF(PROCESS)) zlog_debug( "%s Remove LSA %s lsa->lock %u lsdb count %u", - __PRETTY_FUNCTION__, lsa->name, lsa->lock, + __func__, lsa->name, lsa->lock, area->temp_router_lsa_lsdb->count); ospf6_lsdb_remove(lsa, area->temp_router_lsa_lsdb); } diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c index 620691a98..8b605b3ba 100644 --- a/ospfd/ospf_spf.c +++ b/ospfd/ospf_spf.c @@ -1345,7 +1345,7 @@ static int ospf_spf_calculate_timer(struct thread *thread) if (IS_DEBUG_OSPF_EVENT) zlog_debug( "%s: ospf install new route, vrf %s id %u new_table count %lu", - __PRETTY_FUNCTION__, ospf_vrf_id_to_name(ospf->vrf_id), + __func__, ospf_vrf_id_to_name(ospf->vrf_id), ospf->vrf_id, new_table->count); /* Update routing table. */ monotime(&start_time); diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index fb4082e50..fd2ab0726 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -619,8 +619,7 @@ DEFUN (ospf_network_area, if (IS_DEBUG_OSPF_EVENT) zlog_debug( "%s ospf vrf %s num of %u ip osp area x config", - __PRETTY_FUNCTION__, - ospf->name ? ospf->name : "NIL", + __func__, ospf->name ? ospf->name : "NIL", ospf->if_ospf_cli_count); return CMD_WARNING_CONFIG_FAILED; } diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 1cea79d64..385a7ece7 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -957,8 +957,8 @@ static int ospf_distribute_list_update_timer(struct thread *thread) if (IS_DEBUG_OSPF_EVENT) { zlog_debug( "%s: ospf distribute-list update arg_type %d vrf %s id %d", - __PRETTY_FUNCTION__, arg_type, - ospf_vrf_id_to_name(ospf->vrf_id), ospf->vrf_id); + __func__, arg_type, ospf_vrf_id_to_name(ospf->vrf_id), + ospf->vrf_id); } /* foreach all external info. */ diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 2a0f8cdc0..f3fe9e17b 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -2060,8 +2060,8 @@ static int ospf_vrf_enable(struct vrf *vrf) int ret = 0; if (IS_DEBUG_OSPF_EVENT) - zlog_debug("%s: VRF %s id %u enabled", __PRETTY_FUNCTION__, - vrf->name, vrf->vrf_id); + zlog_debug("%s: VRF %s id %u enabled", __func__, vrf->name, + vrf->vrf_id); ospf = ospf_lookup_by_name(vrf->name); if (ospf) { @@ -2075,8 +2075,7 @@ static int ospf_vrf_enable(struct vrf *vrf) if (IS_DEBUG_OSPF_EVENT) zlog_debug( "%s: ospf linked to vrf %s vrf_id %u (old id %u)", - __PRETTY_FUNCTION__, vrf->name, ospf->vrf_id, - old_vrf_id); + __func__, vrf->name, ospf->vrf_id, old_vrf_id); if (old_vrf_id != ospf->vrf_id) { frr_with_privs(&ospfd_privs) { diff --git a/pbrd/pbr_map.c b/pbrd/pbr_map.c index 9f4a75fa4..e45e62964 100644 --- a/pbrd/pbr_map.c +++ b/pbrd/pbr_map.c @@ -327,8 +327,7 @@ void pbr_map_vrf_update(const struct pbr_vrf *pbr_vrf) enabled ? "enabled" : "disabled"); RB_FOREACH (pbrm, pbr_map_entry_head, &pbr_maps) { - DEBUGD(&pbr_dbg_map, "%s: Looking at %s", __PRETTY_FUNCTION__, - pbrm->name); + DEBUGD(&pbr_dbg_map, "%s: Looking at %s", __func__, pbrm->name); for (ALL_LIST_ELEMENTS_RO(pbrm->seqnumbers, node, pbrms)) pbrms_vrf_update(pbrms, pbr_vrf); } @@ -417,8 +416,7 @@ struct pbr_map_sequence *pbrms_lookup_unique(uint32_t unique, ifindex_t ifindex, for (ALL_LIST_ELEMENTS_RO(pbrm->seqnumbers, snode, pbrms)) { DEBUGD(&pbr_dbg_map, "%s: Comparing %u to %u", - __PRETTY_FUNCTION__, pbrms->unique, - unique); + __func__, pbrms->unique, unique); if (pbrms->unique == unique) return pbrms; } @@ -611,8 +609,7 @@ void pbr_map_schedule_policy_from_nhg(const char *nh_group) struct listnode *node; RB_FOREACH (pbrm, pbr_map_entry_head, &pbr_maps) { - DEBUGD(&pbr_dbg_map, "%s: Looking at %s", __PRETTY_FUNCTION__, - pbrm->name); + DEBUGD(&pbr_dbg_map, "%s: Looking at %s", __func__, pbrm->name); for (ALL_LIST_ELEMENTS_RO(pbrm->seqnumbers, node, pbrms)) { DEBUGD(&pbr_dbg_map, "\tNH Grp name: %s", pbrms->nhgrp_name ? @@ -643,16 +640,15 @@ void pbr_map_policy_install(const char *name) struct listnode *node, *inode; struct pbr_map_interface *pmi; - DEBUGD(&pbr_dbg_map, "%s: for %s", __PRETTY_FUNCTION__, name); + DEBUGD(&pbr_dbg_map, "%s: for %s", __func__, name); pbrm = pbrm_find(name); if (!pbrm) return; for (ALL_LIST_ELEMENTS_RO(pbrm->seqnumbers, node, pbrms)) { DEBUGD(&pbr_dbg_map, - "%s: Looking at what to install %s(%u) %d %d", - __PRETTY_FUNCTION__, name, pbrms->seqno, pbrm->valid, - pbrms->nhs_installed); + "%s: Looking at what to install %s(%u) %d %d", __func__, + name, pbrms->seqno, pbrm->valid, pbrms->nhs_installed); if (pbrm->valid && pbrms->nhs_installed && pbrm->incoming->count) { diff --git a/pbrd/pbr_nht.c b/pbrd/pbr_nht.c index c0c417a74..ecd375333 100644 --- a/pbrd/pbr_nht.c +++ b/pbrd/pbr_nht.c @@ -431,13 +431,13 @@ static afi_t pbr_nht_which_afi(struct nexthop_group nhg, if (!bh && v6 && v4) DEBUGD(&pbr_dbg_nht, - "%s: Saw both V6 and V4 nexthops...using %s", - __PRETTY_FUNCTION__, afi2str(install_afi)); + "%s: Saw both V6 and V4 nexthops...using %s", __func__, + afi2str(install_afi)); if (bh && (v6 || v4)) DEBUGD(&pbr_dbg_nht, "%s: Saw blackhole nexthop(s) with %s%s%s nexthop(s), using AFI_MAX.", - __PRETTY_FUNCTION__, v4 ? "v4" : "", - (v4 && v6) ? " and " : "", v6 ? "v6" : ""); + __func__, v4 ? "v4" : "", (v4 && v6) ? " and " : "", + v6 ? "v6" : ""); return install_afi; } @@ -485,7 +485,7 @@ void pbr_nht_change_group(const char *name) if (!pnhgc) { DEBUGD(&pbr_dbg_nht, "%s: Could not find nexthop-group cache w/ name '%s'", - __PRETTY_FUNCTION__, name); + __func__, name); return; } @@ -579,7 +579,7 @@ struct pbr_nexthop_group_cache *pbr_nht_add_group(const char *name) if (!pbr_nht_get_next_tableid(true)) { zlog_warn( "%s: Exhausted all table identifiers; cannot create nexthop-group cache for nexthop-group '%s'", - __PRETTY_FUNCTION__, name); + __func__, name); return NULL; } @@ -587,14 +587,13 @@ struct pbr_nexthop_group_cache *pbr_nht_add_group(const char *name) if (!nhgc) { DEBUGD(&pbr_dbg_nht, "%s: Could not find nhgc with name: %s\n", - __PRETTY_FUNCTION__, name); + __func__, name); return NULL; } snprintf(lookup.name, sizeof(lookup.name), "%s", name); pnhgc = hash_get(pbr_nhg_hash, &lookup, pbr_nhgc_alloc); - DEBUGD(&pbr_dbg_nht, "%s: Retrieved NHGC @ %p", __PRETTY_FUNCTION__, - pnhgc); + DEBUGD(&pbr_dbg_nht, "%s: Retrieved NHGC @ %p", __func__, pnhgc); for (ALL_NEXTHOPS(nhgc->nhg, nhop)) { struct pbr_nexthop_cache lookupc; diff --git a/pimd/pim_bfd.c b/pimd/pim_bfd.c index f5fc1eebf..84f6733ea 100644 --- a/pimd/pim_bfd.c +++ b/pimd/pim_bfd.c @@ -240,16 +240,15 @@ static int pim_bfd_interface_dest_update(ZAPI_CALLBACK_ARGS) if (!pim_ifp->bfd_info) { if (PIM_DEBUG_PIM_TRACE) zlog_debug("%s: pim interface %s BFD is disabled ", - __PRETTY_FUNCTION__, ifp->name); + __func__, ifp->name); return 0; } if (PIM_DEBUG_PIM_TRACE) { char buf[PREFIX2STR_BUFFER]; prefix2str(&p, buf, sizeof(buf)); - zlog_debug("%s: interface %s bfd destination %s %s", - __PRETTY_FUNCTION__, ifp->name, buf, - bfd_get_status_str(status)); + zlog_debug("%s: interface %s bfd destination %s %s", __func__, + ifp->name, buf, bfd_get_status_str(status)); } for (ALL_LIST_ELEMENTS(pim_ifp->pim_neighbor_list, neigh_node, @@ -265,7 +264,7 @@ static int pim_bfd_interface_dest_update(ZAPI_CALLBACK_ARGS) pim_inet4_dump("<nht_nbr?>", neigh->source_addr, str, sizeof(str)); zlog_debug("%s: bfd status is same for nbr %s", - __PRETTY_FUNCTION__, str); + __func__, str); } continue; } @@ -275,8 +274,7 @@ static int pim_bfd_interface_dest_update(ZAPI_CALLBACK_ARGS) bfd_info->last_update = tv.tv_sec; if (PIM_DEBUG_PIM_TRACE) { - zlog_debug("%s: status %s old_status %s", - __PRETTY_FUNCTION__, + zlog_debug("%s: status %s old_status %s", __func__, bfd_get_status_str(status), bfd_get_status_str(old_status)); } @@ -328,8 +326,7 @@ static int pim_bfd_nbr_replay(ZAPI_CALLBACK_ARGS) sizeof(str)); zlog_debug( "%s: Replaying Pim Neigh %s to BFD vrf_id %u", - __PRETTY_FUNCTION__, str, - vrf->vrf_id); + __func__, str, vrf->vrf_id); } pim_bfd_reg_dereg_nbr(neigh, ZEBRA_BFD_DEST_UPDATE); diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c index 91fbddf93..bcf11aedb 100644 --- a/pimd/pim_bsm.c +++ b/pimd/pim_bsm.c @@ -335,7 +335,7 @@ static int pim_on_g2rp_timer(struct thread *t) rn = route_node_lookup(pim->rp_table, &bsgrp_node->group); if (!rn) { - zlog_warn("%s: Route node doesn't exist", __PRETTY_FUNCTION__); + zlog_warn("%s: Route node doesn't exist", __func__); return 0; } @@ -910,8 +910,8 @@ bool pim_bsm_new_nbr_fwd(struct pim_neighbor *neigh, struct interface *ifp) if (PIM_DEBUG_BSM) { pim_inet4_dump("<src?>", neigh->source_addr, neigh_src_str, sizeof(neigh_src_str)); - zlog_debug("%s: New neighbor %s seen on %s", - __PRETTY_FUNCTION__, neigh_src_str, ifp->name); + zlog_debug("%s: New neighbor %s seen on %s", __func__, + neigh_src_str, ifp->name); } pim_ifp = ifp->info; @@ -921,13 +921,13 @@ bool pim_bsm_new_nbr_fwd(struct pim_neighbor *neigh, struct interface *ifp) if (PIM_DEBUG_BSM) zlog_debug( "%s: It is not DR, so don't forward BSM packet", - __PRETTY_FUNCTION__); + __func__); } if (!pim_ifp->bsm_enable) { if (PIM_DEBUG_BSM) - zlog_debug("%s: BSM proc not enabled on %s", - __PRETTY_FUNCTION__, ifp->name); + zlog_debug("%s: BSM proc not enabled on %s", __func__, + ifp->name); return ret; } @@ -936,20 +936,20 @@ bool pim_bsm_new_nbr_fwd(struct pim_neighbor *neigh, struct interface *ifp) if (!scope->bsm_list->count) { if (PIM_DEBUG_BSM) zlog_debug("%s: BSM list for the scope is empty", - __PRETTY_FUNCTION__); + __func__); return ret; } if (!pim_ifp->ucast_bsm_accept) { dst_addr = qpim_all_pim_routers_addr; if (PIM_DEBUG_BSM) - zlog_debug("%s: Sending BSM mcast to %s", - __PRETTY_FUNCTION__, neigh_src_str); + zlog_debug("%s: Sending BSM mcast to %s", __func__, + neigh_src_str); } else { dst_addr = neigh->source_addr; if (PIM_DEBUG_BSM) - zlog_debug("%s: Sending BSM ucast to %s", - __PRETTY_FUNCTION__, neigh_src_str); + zlog_debug("%s: Sending BSM ucast to %s", __func__, + neigh_src_str); } pim_mtu = ifp->mtu - MAX_IP_HDR_LEN; pim_hello_require(ifp); @@ -962,7 +962,7 @@ bool pim_bsm_new_nbr_fwd(struct pim_neighbor *neigh, struct interface *ifp) if (PIM_DEBUG_BSM) zlog_debug( "%s: pim_bsm_frag_send failed", - __PRETTY_FUNCTION__); + __func__); } } else { /* Pim header needs to be constructed */ @@ -974,7 +974,7 @@ bool pim_bsm_new_nbr_fwd(struct pim_neighbor *neigh, struct interface *ifp) if (PIM_DEBUG_BSM) zlog_debug( "%s: pim_bsm_frag_send failed", - __PRETTY_FUNCTION__); + __func__); } } } diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 85ce41ef3..a3e5151a7 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -3927,7 +3927,7 @@ static void clear_mroute(struct pim_instance *pim) /* clean up all upstreams*/ while ((up = rb_pim_upstream_first(&pim->upstream_head))) { - pim_upstream_del(pim, up, __PRETTY_FUNCTION__); + pim_upstream_del(pim, up, __func__); } } diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index 16eea1d6d..cb31878e0 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -514,7 +514,7 @@ void pim_if_addr_add(struct connected *ifc) char buf[BUFSIZ]; prefix2str(ifc->address, buf, BUFSIZ); zlog_debug("%s: %s ifindex=%d connected IP address %s %s", - __PRETTY_FUNCTION__, ifp->name, ifp->ifindex, buf, + __func__, ifp->name, ifp->ifindex, buf, CHECK_FLAG(ifc->flags, ZEBRA_IFA_SECONDARY) ? "secondary" : "primary"); @@ -522,7 +522,7 @@ void pim_if_addr_add(struct connected *ifc) ifaddr = ifc->address->u.prefix4; - detect_address_change(ifp, 0, __PRETTY_FUNCTION__); + detect_address_change(ifp, 0, __func__); // if (ifc->address->family != AF_INET) // return; @@ -570,8 +570,8 @@ void pim_if_addr_add(struct connected *ifc) source_str, sizeof(source_str)); zlog_warn( "%s: igmp_join_sock() failure for IGMP group %s source %s on interface %s", - __PRETTY_FUNCTION__, group_str, - source_str, ifp->name); + __func__, group_str, source_str, + ifp->name); /* warning only */ } else ij->sock_fd = join_fd; @@ -876,7 +876,7 @@ struct in_addr pim_find_primary_addr(struct interface *ifp) if (PIM_INADDR_IS_ANY(p->u.prefix4)) { zlog_warn( "%s: null IPv4 address connected to interface %s", - __PRETTY_FUNCTION__, ifp->name); + __func__, ifp->name); continue; } @@ -1128,8 +1128,8 @@ struct pim_neighbor *pim_if_find_neighbor(struct interface *ifp, pim_ifp = ifp->info; if (!pim_ifp) { - zlog_warn("%s: multicast not enabled on interface %s", - __PRETTY_FUNCTION__, ifp->name); + zlog_warn("%s: multicast not enabled on interface %s", __func__, + ifp->name); return 0; } @@ -1154,7 +1154,7 @@ struct pim_neighbor *pim_if_find_neighbor(struct interface *ifp, pim_inet4_dump("<addr?>", addr, addr_str, sizeof(addr_str)); zlog_debug( "%s: neighbor not found for address %s on interface %s", - __PRETTY_FUNCTION__, addr_str, ifp->name); + __func__, addr_str, ifp->name); } return NULL; @@ -1379,8 +1379,8 @@ static void pim_if_igmp_join_del_all(struct interface *ifp) pim_ifp = ifp->info; if (!pim_ifp) { - zlog_warn("%s: multicast not enabled on interface %s", - __PRETTY_FUNCTION__, ifp->name); + zlog_warn("%s: multicast not enabled on interface %s", __func__, + ifp->name); return; } diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index f3975a387..ead9d6dbc 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -188,15 +188,15 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch) ref count will take care of it. */ if (ch->upstream->ref_count > 0) - pim_upstream_del(pim_ifp->pim, ch->upstream, - __PRETTY_FUNCTION__); + pim_upstream_del(pim_ifp->pim, ch->upstream, __func__); else { if (PIM_DEBUG_PIM_TRACE) - zlog_debug("%s: Avoiding deletion of upstream with ref_count %d " - "from ifchannel(%s): %s", __PRETTY_FUNCTION__, - ch->upstream->ref_count, ch->interface->name, - ch->sg_str); + zlog_debug( + "%s: Avoiding deletion of upstream with ref_count %d " + "from ifchannel(%s): %s", + __func__, ch->upstream->ref_count, + ch->interface->name, ch->sg_str); } ch->upstream = NULL; @@ -213,8 +213,8 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch) RB_REMOVE(pim_ifchannel_rb, &pim_ifp->ifchannel_rb, ch); if (PIM_DEBUG_PIM_TRACE) - zlog_debug("%s: ifchannel entry %s is deleted ", - __PRETTY_FUNCTION__, ch->sg_str); + zlog_debug("%s: ifchannel entry %s is deleted ", __func__, + ch->sg_str); XFREE(MTYPE_PIM_IFCHANNEL, ch); } @@ -263,7 +263,7 @@ void pim_ifchannel_ifjoin_switch(const char *caller, struct pim_ifchannel *ch, if (PIM_DEBUG_PIM_EVENTS) { zlog_debug( "%s calledby %s: non-transition on state %d (%s)", - __PRETTY_FUNCTION__, caller, new_state, + __func__, caller, new_state, pim_ifchannel_ifjoin_name(new_state, 0)); } return; @@ -286,8 +286,7 @@ void pim_ifchannel_ifjoin_switch(const char *caller, struct pim_ifchannel *ch, if (PIM_DEBUG_PIM_TRACE) zlog_debug( "%s %s: Prune(S,G)=%s from %s", - __FILE__, - __PRETTY_FUNCTION__, + __FILE__, __func__, child->sg_str, up->sg_str); if (!c_oil) @@ -313,8 +312,7 @@ void pim_ifchannel_ifjoin_switch(const char *caller, struct pim_ifchannel *ch, if (PIM_DEBUG_PIM_TRACE) zlog_debug( "%s %s: Join(S,G)=%s from %s", - __FILE__, - __PRETTY_FUNCTION__, + __FILE__, __func__, child->sg_str, up->sg_str); @@ -1050,16 +1048,15 @@ int pim_ifchannel_local_membership_add(struct interface *ifp, if (!pim_ifp) { if (PIM_DEBUG_EVENTS) zlog_debug("%s:%s Expected pim interface setup for %s", - __PRETTY_FUNCTION__, - pim_str_sg_dump(sg), ifp->name); + __func__, pim_str_sg_dump(sg), ifp->name); return 0; } if (!PIM_IF_TEST_PIM(pim_ifp->options)) { if (PIM_DEBUG_EVENTS) - zlog_debug("%s:%s PIM is not configured on this interface %s", - __PRETTY_FUNCTION__, - pim_str_sg_dump(sg), ifp->name); + zlog_debug( + "%s:%s PIM is not configured on this interface %s", + __func__, pim_str_sg_dump(sg), ifp->name); return 0; } @@ -1071,8 +1068,7 @@ int pim_ifchannel_local_membership_add(struct interface *ifp, if (PIM_DEBUG_PIM_EVENTS) zlog_debug( "%s: local membership (S,G)=%s ignored as group is SSM", - __PRETTY_FUNCTION__, - pim_str_sg_dump(sg)); + __func__, pim_str_sg_dump(sg)); return 1; } } @@ -1093,9 +1089,8 @@ int pim_ifchannel_local_membership_add(struct interface *ifp, for (ALL_LIST_ELEMENTS_RO(up->sources, up_node, child)) { if (PIM_DEBUG_EVENTS) zlog_debug("%s %s: IGMP (S,G)=%s(%s) from %s", - __FILE__, __PRETTY_FUNCTION__, - child->sg_str, ifp->name, - up->sg_str); + __FILE__, __func__, child->sg_str, + ifp->name, up->sg_str); ch = pim_ifchannel_find(ifp, &child->sg); if (pim_upstream_evaluate_join_desired_interface( @@ -1167,9 +1162,8 @@ void pim_ifchannel_local_membership_del(struct interface *ifp, if (PIM_DEBUG_EVENTS) zlog_debug("%s %s: Prune(S,G)=%s(%s) from %s", - __FILE__, __PRETTY_FUNCTION__, - up->sg_str, ifp->name, - child->sg_str); + __FILE__, __func__, up->sg_str, + ifp->name, child->sg_str); ch = pim_ifchannel_find(ifp, &child->sg); /* @@ -1361,7 +1355,7 @@ void pim_ifchannel_set_star_g_join_state(struct pim_ifchannel *ch, int eom, if (PIM_DEBUG_PIM_TRACE) zlog_debug( - "%s: %s %s eom: %d join %u", __PRETTY_FUNCTION__, + "%s: %s %s eom: %d join %u", __func__, pim_ifchannel_ifjoin_name(ch->ifjoin_state, ch->flags), ch->sg_str, eom, join); if (!ch->sources) diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c index d63269da9..ffd872ce0 100644 --- a/pimd/pim_igmpv3.c +++ b/pimd/pim_igmpv3.c @@ -1133,7 +1133,7 @@ static int group_retransmit_sources(struct igmp_group *group, group_str, sizeof(group_str)); zlog_warn( "%s: group %s on %s: s_flag=1 unable to fit %d sources into buf_size=%zu (max_sources=%d)", - __PRETTY_FUNCTION__, group_str, + __func__, group_str, igmp->interface->name, num_sources_tosend1, sizeof(query_buf1), query_buf1_max_sources); @@ -1177,9 +1177,9 @@ static int group_retransmit_sources(struct igmp_group *group, sizeof(group_str)); zlog_warn( "%s: group %s on %s: s_flag=0 unable to fit %d sources into buf_size=%zu (max_sources=%d)", - __PRETTY_FUNCTION__, group_str, - igmp->interface->name, num_sources_tosend2, - sizeof(query_buf2), query_buf2_max_sources); + __func__, group_str, igmp->interface->name, + num_sources_tosend2, sizeof(query_buf2), + query_buf2_max_sources); } else { /* RFC3376: 4.1.12. IP Destination Addresses for Queries diff --git a/pimd/pim_join.c b/pimd/pim_join.c index f2cd04e45..62bd2360c 100644 --- a/pimd/pim_join.c +++ b/pimd/pim_join.c @@ -445,17 +445,15 @@ int pim_joinprune_send(struct pim_rpf *rpf, struct list *groups) if (rpf->source_nexthop.interface) pim_ifp = rpf->source_nexthop.interface->info; else { - zlog_warn("%s: RPF interface is not present", - __PRETTY_FUNCTION__); + zlog_warn("%s: RPF interface is not present", __func__); return -1; } - on_trace(__PRETTY_FUNCTION__, rpf->source_nexthop.interface, - rpf->rpf_addr.u.prefix4); + on_trace(__func__, rpf->source_nexthop.interface, + rpf->rpf_addr.u.prefix4); if (!pim_ifp) { - zlog_warn("%s: multicast not enabled on interface %s", - __PRETTY_FUNCTION__, + zlog_warn("%s: multicast not enabled on interface %s", __func__, rpf->source_nexthop.interface->name); return -1; } @@ -466,7 +464,7 @@ int pim_joinprune_send(struct pim_rpf *rpf, struct list *groups) pim_inet4_dump("<dst?>", rpf->rpf_addr.u.prefix4, dst_str, sizeof(dst_str)); zlog_debug("%s: upstream=%s is myself on interface %s", - __PRETTY_FUNCTION__, dst_str, + __func__, dst_str, rpf->source_nexthop.interface->name); } return 0; @@ -515,7 +513,7 @@ int pim_joinprune_send(struct pim_rpf *rpf, struct list *groups) sizeof(grp_str)); zlog_debug( "%s: sending (G)=%s to upstream=%s on interface %s", - __PRETTY_FUNCTION__, grp_str, dst_str, + __func__, grp_str, dst_str, rpf->source_nexthop.interface->name); } @@ -530,7 +528,7 @@ int pim_joinprune_send(struct pim_rpf *rpf, struct list *groups) rpf->source_nexthop.interface->name)) { zlog_warn( "%s: could not send PIM message on interface %s", - __PRETTY_FUNCTION__, + __func__, rpf->source_nexthop.interface->name); } @@ -571,8 +569,7 @@ int pim_joinprune_send(struct pim_rpf *rpf, struct list *groups) if (PIM_DEBUG_PIM_TRACE) zlog_debug( "%s: interface %s num_joins %u num_prunes %u", - __PRETTY_FUNCTION__, - rpf->source_nexthop.interface->name, + __func__, rpf->source_nexthop.interface->name, ntohs(grp->joins), ntohs(grp->prunes)); grp = (struct pim_jp_groups *)curr_ptr; @@ -587,7 +584,7 @@ int pim_joinprune_send(struct pim_rpf *rpf, struct list *groups) rpf->source_nexthop.interface->name)) { zlog_warn( "%s: could not send PIM message on interface %s", - __PRETTY_FUNCTION__, + __func__, rpf->source_nexthop.interface->name); } @@ -606,8 +603,7 @@ int pim_joinprune_send(struct pim_rpf *rpf, struct list *groups) rpf->source_nexthop.interface->name)) { zlog_warn( "%s: could not send PIM message on interface %s", - __PRETTY_FUNCTION__, - rpf->source_nexthop.interface->name); + __func__, rpf->source_nexthop.interface->name); } } return 0; diff --git a/pimd/pim_jp_agg.c b/pimd/pim_jp_agg.c index 2662c9eae..5279a0085 100644 --- a/pimd/pim_jp_agg.c +++ b/pimd/pim_jp_agg.c @@ -239,8 +239,8 @@ void pim_jp_agg_upstream_verification(struct pim_upstream *up, bool ignore) if (!up->rpf.source_nexthop.interface) { if (PIM_DEBUG_PIM_TRACE) - zlog_debug("%s: up %s RPF is not present", - __PRETTY_FUNCTION__, up->sg_str); + zlog_debug("%s: up %s RPF is not present", __func__, + up->sg_str); return; } diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index 36b066735..14f8a8312 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -65,10 +65,9 @@ static int pim_mroute_set(struct pim_instance *pim, int enable) &data, data_len); if (err) { zlog_warn( - "%s %s: failure: setsockopt(fd=%d,IPPROTO_IP, MRT_TABLE=%d): errno=%d: %s", - __FILE__, __PRETTY_FUNCTION__, - pim->mroute_socket, data, errno, - safe_strerror(errno)); + "%s %s: failure: setsockopt(fd=%d,IPPROTO_IP, MRT_TABLE=%d): errno=%d: %s", + __FILE__, __func__, pim->mroute_socket, + data, errno, safe_strerror(errno)); return -1; } @@ -86,11 +85,10 @@ static int pim_mroute_set(struct pim_instance *pim, int enable) opt, &data, data_len); if (err) { zlog_warn( - "%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,%s=%d): errno=%d: %s", - __FILE__, __PRETTY_FUNCTION__, - pim->mroute_socket, - enable ? "MRT_INIT" : "MRT_DONE", data, errno, - safe_strerror(errno)); + "%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,%s=%d): errno=%d: %s", + __FILE__, __func__, pim->mroute_socket, + enable ? "MRT_INIT" : "MRT_DONE", data, errno, + safe_strerror(errno)); return -1; } } diff --git a/pimd/pim_msdp_socket.c b/pimd/pim_msdp_socket.c index 50489ca88..7620cd579 100644 --- a/pimd/pim_msdp_socket.c +++ b/pimd/pim_msdp_socket.c @@ -162,14 +162,14 @@ int pim_msdp_sock_listen(struct pim_instance *pim) if (!ifp) { flog_err(EC_LIB_INTERFACE, "%s: Unable to lookup vrf interface: %s", - __PRETTY_FUNCTION__, pim->vrf->name); + __func__, pim->vrf->name); close(sock); return -1; } if (pim_socket_bind(sock, ifp)) { flog_err_sys(EC_LIB_SOCKET, "%s: Unable to bind to socket: %s", - __PRETTY_FUNCTION__, safe_strerror(errno)); + __func__, safe_strerror(errno)); close(sock); return -1; } diff --git a/pimd/pim_msg.c b/pimd/pim_msg.c index fba76d84d..65b6405c8 100644 --- a/pimd/pim_msg.c +++ b/pimd/pim_msg.c @@ -123,7 +123,7 @@ size_t pim_msg_get_jp_group_size(struct list *sources) if (PIM_DEBUG_PIM_PACKETS) zlog_debug( "%s: Considering (%s) children for (S,G,rpt) prune", - __PRETTY_FUNCTION__, up->sg_str); + __func__, up->sg_str); for (ALL_LIST_ELEMENTS_RO(up->sources, up_node, child)) { if (!PIM_UPSTREAM_FLAG_TEST_USE_RPT(child->flags)) { @@ -144,13 +144,12 @@ size_t pim_msg_get_jp_group_size(struct list *sources) if (PIM_DEBUG_PIM_PACKETS) zlog_debug( "%s: SPT Bit and RPF'(%s) != RPF'(S,G): Add Prune (%s,rpt) to compound message", - __PRETTY_FUNCTION__, - up->sg_str, + __func__, up->sg_str, child->sg_str); } else if (PIM_DEBUG_PIM_PACKETS) zlog_debug( "%s: SPT Bit and RPF'(%s) == RPF'(S,G): Not adding Prune for (%s,rpt)", - __PRETTY_FUNCTION__, up->sg_str, + __func__, up->sg_str, child->sg_str); } else if (pim_upstream_empty_inherited_olist(child)) { /* S is supposed to be forwarded along the RPT @@ -163,14 +162,12 @@ size_t pim_msg_get_jp_group_size(struct list *sources) child->flags); if (PIM_DEBUG_PIM_PACKETS) zlog_debug( - "%s: inherited_olist(%s,rpt) is NULL, Add Prune to compound message", - __PRETTY_FUNCTION__, - child->sg_str); + "%s: inherited_olist(%s,rpt) is NULL, Add Prune to compound message", + __func__, child->sg_str); } else if (PIM_DEBUG_PIM_PACKETS) zlog_debug( - "%s: Do not add Prune %s to compound message %s", - __PRETTY_FUNCTION__, child->sg_str, - up->sg_str); + "%s: Do not add Prune %s to compound message %s", + __func__, child->sg_str, up->sg_str); } } return size; diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c index ec40beec7..ca7ca1140 100644 --- a/pimd/pim_neighbor.c +++ b/pimd/pim_neighbor.c @@ -53,8 +53,7 @@ static void dr_election_by_addr(struct interface *ifp) pim_ifp->pim_dr_addr = pim_ifp->primary_address; if (PIM_DEBUG_PIM_TRACE) { - zlog_debug("%s: on interface %s", __PRETTY_FUNCTION__, - ifp->name); + zlog_debug("%s: on interface %s", __func__, ifp->name); } for (ALL_LIST_ELEMENTS_RO(pim_ifp->pim_neighbor_list, node, neigh)) { @@ -79,14 +78,14 @@ static void dr_election_by_pri(struct interface *ifp) dr_pri = pim_ifp->pim_dr_priority; if (PIM_DEBUG_PIM_TRACE) { - zlog_debug("%s: dr pri %u on interface %s", __PRETTY_FUNCTION__, - dr_pri, ifp->name); + zlog_debug("%s: dr pri %u on interface %s", __func__, dr_pri, + ifp->name); } for (ALL_LIST_ELEMENTS_RO(pim_ifp->pim_neighbor_list, node, neigh)) { if (PIM_DEBUG_PIM_TRACE) { zlog_info("%s: neigh pri %u addr %x if dr addr %x", - __PRETTY_FUNCTION__, neigh->dr_priority, + __func__, neigh->dr_priority, ntohl(neigh->source_addr.s_addr), ntohl(pim_ifp->pim_dr_addr.s_addr)); } @@ -389,7 +388,7 @@ static void delete_prefix_list(struct pim_neighbor *neigh) sizeof(addr_str)); zlog_debug( "%s: DUMP_PREFIX_LIST neigh=%x prefix_list=%x prefix=%x addr=%s [%d/%d]", - __PRETTY_FUNCTION__, (unsigned)neigh, + __func__, (unsigned)neigh, (unsigned)neigh->prefix_list, (unsigned)p, addr_str, i, list_size); ++i; diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index 55b7db6a5..8799134ed 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -240,7 +240,7 @@ struct rp_info *pim_rp_find_match_group(struct pim_instance *pim, flog_err( EC_LIB_DEVELOPMENT, "%s: BUG We should have found default group information\n", - __PRETTY_FUNCTION__); + __func__); return best; } @@ -550,7 +550,7 @@ int pim_rp_new(struct pim_instance *pim, struct in_addr rp_addr, prefix2str(&rp_all->group, buf1, sizeof(buf1)); zlog_debug( "%s: NHT Register rp_all addr %s grp %s ", - __PRETTY_FUNCTION__, buf, buf1); + __func__, buf, buf1); } frr_each (rb_pim_upstream, &pim->upstream_head, up) { @@ -676,7 +676,7 @@ int pim_rp_new(struct pim_instance *pim, struct in_addr rp_addr, prefix2str(&nht_p, buf, sizeof(buf)); prefix2str(&rp_info->group, buf1, sizeof(buf1)); zlog_debug("%s: NHT Register RP addr %s grp %s with Zebra ", - __PRETTY_FUNCTION__, buf, buf1); + __func__, buf, buf1); } pim_find_or_track_nexthop(pim, &nht_p, NULL, rp_info, false, NULL); if (!pim_ecmp_nexthop_lookup(pim, &rp_info->rp.source_nexthop, &nht_p, @@ -1394,8 +1394,7 @@ void pim_resolve_rp_nh(struct pim_instance *pim, struct pim_neighbor *nbr) sizeof(str)); zlog_debug( "%s: addr %s new nexthop addr %s interface %s", - __PRETTY_FUNCTION__, str, str1, - ifp1->name); + __func__, str, str1, ifp1->name); } } } diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c index 177dab05c..ae5781f0c 100644 --- a/pimd/pim_sock.c +++ b/pimd/pim_sock.c @@ -69,8 +69,7 @@ void pim_socket_ip_hdr(int fd) if (setsockopt(fd, IPPROTO_IP, IP_HDRINCL, &on, sizeof(on))) zlog_err("%s: Could not turn on IP_HDRINCL option: %s", - __PRETTY_FUNCTION__, safe_strerror(errno)); - + __func__, safe_strerror(errno)); } } diff --git a/pimd/pim_static.c b/pimd/pim_static.c index 7b121c913..91c9b5b93 100644 --- a/pimd/pim_static.c +++ b/pimd/pim_static.c @@ -79,7 +79,7 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif, if (!iif_index || !oif_index || iif_index == -1 || oif_index == -1) { zlog_warn( "%s %s: Unable to add static route: Invalid interface index(iif=%d,oif=%d)", - __FILE__, __PRETTY_FUNCTION__, iif_index, oif_index); + __FILE__, __func__, iif_index, oif_index); return -2; } @@ -88,7 +88,7 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif, /* looped MFC entry */ zlog_warn( "%s %s: Unable to add static route: Looped MFC entry(iif=%d,oif=%d)", - __FILE__, __PRETTY_FUNCTION__, iif_index, oif_index); + __FILE__, __func__, iif_index, oif_index); return -4; } #endif @@ -109,9 +109,8 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif, sizeof(sifaddr_str)); zlog_warn( "%s %s: Unable to add static route: Route already exists (iif=%d,oif=%d,group=%s,source=%s)", - __FILE__, __PRETTY_FUNCTION__, - iif_index, oif_index, gifaddr_str, - sifaddr_str); + __FILE__, __func__, iif_index, + oif_index, gifaddr_str, sifaddr_str); return -3; } @@ -138,9 +137,8 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif, } else { /* input interface changed */ s_route->iif = iif_index; - pim_static_mroute_iif_update(&s_route->c_oil, - iif_index, - __PRETTY_FUNCTION__); + pim_static_mroute_iif_update( + &s_route->c_oil, iif_index, __func__); #ifdef PIM_ENFORCE_LOOPFREE_MFC /* check to make sure the new input was not an @@ -179,7 +177,7 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif, s_route->c_oil.pim = pim; - if (pim_static_mroute_add(&s_route->c_oil, __PRETTY_FUNCTION__)) { + if (pim_static_mroute_add(&s_route->c_oil, __func__)) { char gifaddr_str[INET_ADDRSTRLEN]; char sifaddr_str[INET_ADDRSTRLEN]; pim_inet4_dump("<ifaddr?>", group, gifaddr_str, @@ -188,8 +186,8 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif, sizeof(sifaddr_str)); zlog_warn( "%s %s: Unable to add static route(iif=%d,oif=%d,group=%s,source=%s)", - __FILE__, __PRETTY_FUNCTION__, iif_index, oif_index, - gifaddr_str, sifaddr_str); + __FILE__, __func__, iif_index, oif_index, gifaddr_str, + sifaddr_str); /* Need to put s_route back to the way it was */ if (original_s_route) { @@ -223,7 +221,7 @@ int pim_static_add(struct pim_instance *pim, struct interface *iif, sizeof(sifaddr_str)); zlog_debug( "%s: Static route added(iif=%d,oif=%d,group=%s,source=%s)", - __PRETTY_FUNCTION__, iif_index, oif_index, gifaddr_str, + __func__, iif_index, oif_index, gifaddr_str, sifaddr_str); } @@ -245,7 +243,7 @@ int pim_static_del(struct pim_instance *pim, struct interface *iif, if (!iif_index || !oif_index) { zlog_warn( "%s %s: Unable to remove static route: Invalid interface index(iif=%d,oif=%d)", - __FILE__, __PRETTY_FUNCTION__, iif_index, oif_index); + __FILE__, __func__, iif_index, oif_index); return -2; } @@ -262,10 +260,9 @@ int pim_static_del(struct pim_instance *pim, struct interface *iif, * route, otherwise set the route with the new outputs */ if (s_route->c_oil.oil_ref_count <= 0 - ? pim_mroute_del(&s_route->c_oil, - __PRETTY_FUNCTION__) + ? pim_mroute_del(&s_route->c_oil, __func__) : pim_static_mroute_add(&s_route->c_oil, - __PRETTY_FUNCTION__)) { + __func__)) { char gifaddr_str[INET_ADDRSTRLEN]; char sifaddr_str[INET_ADDRSTRLEN]; pim_inet4_dump("<ifaddr?>", group, gifaddr_str, @@ -274,9 +271,8 @@ int pim_static_del(struct pim_instance *pim, struct interface *iif, sizeof(sifaddr_str)); zlog_warn( "%s %s: Unable to remove static route(iif=%d,oif=%d,group=%s,source=%s)", - __FILE__, __PRETTY_FUNCTION__, - iif_index, oif_index, gifaddr_str, - sifaddr_str); + __FILE__, __func__, iif_index, + oif_index, gifaddr_str, sifaddr_str); s_route->oif_ttls[oif_index] = 1; s_route->c_oil.oil.mfcc_ttls[oif_index] = 1; @@ -301,8 +297,8 @@ int pim_static_del(struct pim_instance *pim, struct interface *iif, sizeof(sifaddr_str)); zlog_debug( "%s: Static route removed(iif=%d,oif=%d,group=%s,source=%s)", - __PRETTY_FUNCTION__, iif_index, - oif_index, gifaddr_str, sifaddr_str); + __func__, iif_index, oif_index, + gifaddr_str, sifaddr_str); } break; @@ -318,8 +314,8 @@ int pim_static_del(struct pim_instance *pim, struct interface *iif, sizeof(sifaddr_str)); zlog_warn( "%s %s: Unable to remove static route: Route does not exist(iif=%d,oif=%d,group=%s,source=%s)", - __FILE__, __PRETTY_FUNCTION__, iif_index, oif_index, - gifaddr_str, sifaddr_str); + __FILE__, __func__, iif_index, oif_index, gifaddr_str, + sifaddr_str); return -3; } diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index ef65f097a..cf333ffcc 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -178,7 +178,7 @@ struct pim_upstream *pim_upstream_del(struct pim_instance *pim, if (PIM_DEBUG_PIM_TRACE) zlog_debug( "%s(%s): Delete %s[%s] ref count: %d , flags: %d c_oil ref count %d (Pre decrement)", - __PRETTY_FUNCTION__, name, up->sg_str, pim->vrf->name, + __func__, name, up->sg_str, pim->vrf->name, up->ref_count, up->flags, up->channel_oil->oil_ref_count); @@ -221,7 +221,7 @@ struct pim_upstream *pim_upstream_del(struct pim_instance *pim, notify_msdp = true; } - pim_mroute_del(up->channel_oil, __PRETTY_FUNCTION__); + pim_mroute_del(up->channel_oil, __func__); upstream_channel_oil_detach(up); for (ALL_LIST_ELEMENTS(up->ifchannels, node, nnode, ch)) @@ -256,8 +256,9 @@ struct pim_upstream *pim_upstream_del(struct pim_instance *pim, if (PIM_DEBUG_PIM_TRACE) { char buf[PREFIX2STR_BUFFER]; prefix2str(&nht_p, buf, sizeof(buf)); - zlog_debug("%s: Deregister upstream %s addr %s with Zebra NHT", - __PRETTY_FUNCTION__, up->sg_str, buf); + zlog_debug( + "%s: Deregister upstream %s addr %s with Zebra NHT", + __func__, up->sg_str, buf); } pim_delete_tracked_nexthop(pim, &nht_p, up, NULL, false); } diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index 13d6a2eea..e791500ed 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -89,8 +89,8 @@ static void dump_if_address(struct interface *ifp) struct connected *ifc; struct listnode *node; - zlog_debug("%s %s: interface %s addresses:", __FILE__, - __PRETTY_FUNCTION__, ifp->name); + zlog_debug("%s %s: interface %s addresses:", __FILE__, __func__, + ifp->name); for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc)) { struct prefix *p = ifc->address; @@ -99,8 +99,7 @@ static void dump_if_address(struct interface *ifp) continue; zlog_debug("%s %s: interface %s address %s %s", __FILE__, - __PRETTY_FUNCTION__, ifp->name, - inet_ntoa(p->u.prefix4), + __func__, ifp->name, inet_ntoa(p->u.prefix4), CHECK_FLAG(ifc->flags, ZEBRA_IFA_SECONDARY) ? "secondary" : "primary"); diff --git a/staticd/static_vty.c b/staticd/static_vty.c index 3903a5a5c..40bcf2b5d 100644 --- a/staticd/static_vty.c +++ b/staticd/static_vty.c @@ -591,7 +591,7 @@ void static_config_install_delayed_routes(struct static_vrf *svrf) if (installed != CMD_SUCCESS) zlog_debug( "%s: Attempt to install %s as a route and it was rejected", - __PRETTY_FUNCTION__, shr->dest_str); + __func__, shr->dest_str); listnode_delete(static_list, shr); static_list_delete(shr); } diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 509c0e101..f372b548f 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -790,8 +790,7 @@ void zsend_rule_notify_owner(struct zebra_pbr_rule *rule, struct stream *s; if (IS_ZEBRA_DEBUG_PACKET) - zlog_debug("%s: Notifying %u", __PRETTY_FUNCTION__, - rule->rule.unique); + zlog_debug("%s: Notifying %u", __func__, rule->rule.unique); for (ALL_LIST_ELEMENTS_RO(zrouter.client_list, node, client)) { if (rule->sock == client->sock) @@ -823,8 +822,7 @@ void zsend_ipset_notify_owner(struct zebra_pbr_ipset *ipset, struct stream *s; if (IS_ZEBRA_DEBUG_PACKET) - zlog_debug("%s: Notifying %u", __PRETTY_FUNCTION__, - ipset->unique); + zlog_debug("%s: Notifying %u", __func__, ipset->unique); for (ALL_LIST_ELEMENTS_RO(zrouter.client_list, node, client)) { if (ipset->sock == client->sock) @@ -853,8 +851,7 @@ void zsend_ipset_entry_notify_owner(struct zebra_pbr_ipset_entry *ipset, struct stream *s; if (IS_ZEBRA_DEBUG_PACKET) - zlog_debug("%s: Notifying %u", __PRETTY_FUNCTION__, - ipset->unique); + zlog_debug("%s: Notifying %u", __func__, ipset->unique); for (ALL_LIST_ELEMENTS_RO(zrouter.client_list, node, client)) { if (ipset->sock == client->sock) @@ -883,8 +880,7 @@ void zsend_iptable_notify_owner(struct zebra_pbr_iptable *iptable, struct stream *s; if (IS_ZEBRA_DEBUG_PACKET) - zlog_debug("%s: Notifying %u", __PRETTY_FUNCTION__, - iptable->unique); + zlog_debug("%s: Notifying %u", __func__, iptable->unique); for (ALL_LIST_ELEMENTS_RO(zrouter.client_list, node, client)) { if (iptable->sock == client->sock) diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c index d60da336f..0d6428026 100644 --- a/zebra/zebra_fpm_netlink.c +++ b/zebra/zebra_fpm_netlink.c @@ -300,8 +300,7 @@ static int netlink_route_info_fill(netlink_route_info_t *ri, int cmd, return 1; if (!re) { - zfpm_debug("%s: Expected non-NULL re pointer", - __PRETTY_FUNCTION__); + zfpm_debug("%s: Expected non-NULL re pointer", __func__); return 0; } diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 097dd7f02..ee90b83eb 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -1418,7 +1418,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug( "\t%s: Onlink and interface: %u[%u] does not exist", - __PRETTY_FUNCTION__, nexthop->ifindex, + __func__, nexthop->ifindex, nexthop->vrf_id); return 0; } @@ -1429,14 +1429,14 @@ static int nexthop_active(afi_t afi, struct route_entry *re, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug( "\t%s: Onlink and interface %s is not operative", - __PRETTY_FUNCTION__, ifp->name); + __func__, ifp->name); return 0; } if (!if_is_operative(ifp)) { if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug( "\t%s: Interface %s is not unnumbered", - __PRETTY_FUNCTION__, ifp->name); + __func__, ifp->name); return 0; } } @@ -1448,7 +1448,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug( "\t:%s: Attempting to install a max prefixlength route through itself", - __PRETTY_FUNCTION__); + __func__); return 0; } @@ -1475,8 +1475,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re, zvrf = zebra_vrf_lookup_by_id(nexthop->vrf_id); if (!table || !zvrf) { if (IS_ZEBRA_DEBUG_RIB_DETAILED) - zlog_debug("\t%s: Table not found", - __PRETTY_FUNCTION__); + zlog_debug("\t%s: Table not found", __func__); return 0; } @@ -1495,7 +1494,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug( "\t%s: Matched against ourself and prefix length is not max bit length", - __PRETTY_FUNCTION__); + __func__); return 0; } @@ -1508,7 +1507,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re, if (IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug( "\t:%s: Resolved against default route", - __PRETTY_FUNCTION__); + __func__); return 0; } @@ -1560,7 +1559,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re, if (!resolved && IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug("\t%s: Recursion failed to find", - __PRETTY_FUNCTION__); + __func__); return resolved; } else if (re->type == ZEBRA_ROUTE_STATIC) { resolved = 0; @@ -1582,14 +1581,13 @@ static int nexthop_active(afi_t afi, struct route_entry *re, if (!resolved && IS_ZEBRA_DEBUG_RIB_DETAILED) zlog_debug( "\t%s: Static route unable to resolve", - __PRETTY_FUNCTION__); + __func__); return resolved; } else { if (IS_ZEBRA_DEBUG_RIB_DETAILED) { zlog_debug( "\t%s: Route Type %s has not turned on recursion", - __PRETTY_FUNCTION__, - zebra_route_string(re->type)); + __func__, zebra_route_string(re->type)); if (re->type == ZEBRA_ROUTE_BGP && !CHECK_FLAG(re->flags, ZEBRA_FLAG_IBGP)) zlog_debug( @@ -1599,8 +1597,7 @@ static int nexthop_active(afi_t afi, struct route_entry *re, } } if (IS_ZEBRA_DEBUG_RIB_DETAILED) - zlog_debug("\t%s: Nexthop did not lookup in table", - __PRETTY_FUNCTION__); + zlog_debug("\t%s: Nexthop did not lookup in table", __func__); return 0; } diff --git a/zebra/zebra_pbr.c b/zebra/zebra_pbr.c index a11f428b5..6728567e6 100644 --- a/zebra/zebra_pbr.c +++ b/zebra/zebra_pbr.c @@ -710,7 +710,7 @@ void zebra_pbr_del_iptable(struct zebra_pbr_iptable *iptable) XFREE(MTYPE_TMP, lookup); } else zlog_debug("%s: IPTable being deleted we know nothing about", - __PRETTY_FUNCTION__); + __func__); } /* diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index 35a4db306..6cfc68eb7 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -643,8 +643,8 @@ zebra_rnh_resolve_nexthop_entry(struct zebra_vrf *zvrf, afi_t afi, char buf[PREFIX_STRLEN]; char buf1[PREFIX_STRLEN]; - zlog_debug("%s: %u:%s Possible Match to %s", - __PRETTY_FUNCTION__, rnh->vrf_id, + zlog_debug("%s: %u:%s Possible Match to %s", __func__, + rnh->vrf_id, prefix2str(&rnh->node->p, buf, sizeof(buf)), srcdest_rnode2str(rn, buf1, sizeof(buf))); } diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index caff99dbe..dce48d39b 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -443,12 +443,11 @@ static void zebra_vxlan_dup_addr_detect_for_mac(struct zebra_vrf *zvrf, if (CHECK_FLAG(mac->flags, ZEBRA_MAC_DUPLICATE)) { if (IS_ZEBRA_DEBUG_VXLAN) zlog_debug( - "%s: duplicate addr MAC %s flags 0x%x skip update to client, learn count %u recover time %u", - __PRETTY_FUNCTION__, - prefix_mac2str(&mac->macaddr, buf, - sizeof(buf)), - mac->flags, mac->dad_count, - zvrf->dad_freeze_time); + "%s: duplicate addr MAC %s flags 0x%x skip update to client, learn count %u recover time %u", + __func__, + prefix_mac2str(&mac->macaddr, buf, sizeof(buf)), + mac->flags, mac->dad_count, + zvrf->dad_freeze_time); /* For duplicate MAC do not update * client but update neigh due to @@ -479,11 +478,10 @@ static void zebra_vxlan_dup_addr_detect_for_mac(struct zebra_vrf *zvrf, if (reset_params) { if (IS_ZEBRA_DEBUG_VXLAN) zlog_debug( - "%s: duplicate addr MAC %s flags 0x%x detection time passed, reset learn count %u" - , __PRETTY_FUNCTION__, - prefix_mac2str(&mac->macaddr, buf, - sizeof(buf)), - mac->flags, mac->dad_count); + "%s: duplicate addr MAC %s flags 0x%x detection time passed, reset learn count %u", + __func__, + prefix_mac2str(&mac->macaddr, buf, sizeof(buf)), + mac->flags, mac->dad_count); mac->dad_count = 0; /* Start dup. addr detection (DAD) start time, @@ -547,8 +545,8 @@ static void zebra_vxlan_dup_addr_detect_for_mac(struct zebra_vrf *zvrf, if (zvrf->dad_freeze && zvrf->dad_freeze_time) { if (IS_ZEBRA_DEBUG_VXLAN) zlog_debug( - "%s: duplicate addr MAC %s flags 0x%x auto recovery time %u start" - , __PRETTY_FUNCTION__, + "%s: duplicate addr MAC %s flags 0x%x auto recovery time %u start", + __func__, prefix_mac2str(&mac->macaddr, buf, sizeof(buf)), mac->flags, zvrf->dad_freeze_time); @@ -9787,12 +9785,11 @@ static int zebra_vxlan_dad_mac_auto_recovery_exp(struct thread *t) return 0; if (IS_ZEBRA_DEBUG_VXLAN) - zlog_debug("%s: duplicate addr mac %s flags 0x%x learn count %u host count %u auto recovery expired", - __PRETTY_FUNCTION__, - prefix_mac2str(&mac->macaddr, buf, sizeof(buf)), - mac->flags, - mac->dad_count, - listcount(mac->neigh_list)); + zlog_debug( + "%s: duplicate addr mac %s flags 0x%x learn count %u host count %u auto recovery expired", + __func__, + prefix_mac2str(&mac->macaddr, buf, sizeof(buf)), + mac->flags, mac->dad_count, listcount(mac->neigh_list)); /* Remove all IPs as duplicate associcated with this MAC */ for (ALL_LIST_ELEMENTS_RO(mac->neigh_list, node, nbr)) { |