Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__func__ everywhere #5918

Merged
merged 2 commits into from
Mar 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions bgpd/bgp_evpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,9 @@ static int bgp_zebra_send_remote_macip(struct bgp *bgp, struct bgpevpn *vpn,
/* Don't try to register if Zebra doesn't know of this instance. */
if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("%s: No zebra instance to talk to, not installing remote macip",
__PRETTY_FUNCTION__);
zlog_debug(
"%s: No zebra instance to talk to, not installing remote macip",
__func__);
return 0;
}
s = zclient->obuf;
Expand Down Expand Up @@ -662,8 +663,9 @@ static int bgp_zebra_send_remote_vtep(struct bgp *bgp, struct bgpevpn *vpn,
/* Don't try to register if Zebra doesn't know of this instance. */
if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bgp)) {
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("%s: No zebra instance to talk to, not installing remote vtep",
__PRETTY_FUNCTION__);
zlog_debug(
"%s: No zebra instance to talk to, not installing remote vtep",
__func__);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ static int bgp_connect_success(struct peer *peer)
if (bgp_getsockname(peer) < 0) {
flog_err_sys(EC_LIB_SOCKET,
"%s: bgp_getsockname(): failed for peer %s, fd %d",
__FUNCTION__, peer->host, peer->fd);
__func__, peer->host, peer->fd);
bgp_notify_send(
peer, BGP_NOTIFY_FSM_ERR,
BGP_NOTIFY_SUBCODE_UNSPECIFIC); /* internal error */
Expand Down
25 changes: 14 additions & 11 deletions bgpd/bgp_nht.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ int bgp_find_or_add_nexthop(struct bgp *bgp_route, struct bgp *bgp_nexthop,
if (BGP_DEBUG(nht, NHT)) {
zlog_debug(
"%s: Attempting to register with unknown AFI %d (not %d or %d)",
__FUNCTION__, afi, AFI_IP, AFI_IP6);
__func__, afi, AFI_IP, AFI_IP6);
}
return 0;
}
Expand Down Expand Up @@ -338,7 +338,7 @@ void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id)
if (!zapi_nexthop_update_decode(zclient->ibuf, &nhr)) {
if (BGP_DEBUG(nht, NHT))
zlog_debug("%s[%s]: Failure to decode nexthop update",
__PRETTY_FUNCTION__, bgp->name_pretty);
__func__, bgp->name_pretty);
return;
}

Expand Down Expand Up @@ -563,7 +563,7 @@ static int make_prefix(int afi, struct bgp_path_info *pi, struct prefix *p)
if (BGP_DEBUG(nht, NHT)) {
zlog_debug(
"%s: Attempting to make prefix with unknown AFI %d (not %d or %d)",
__FUNCTION__, afi, AFI_IP, AFI_IP6);
__func__, afi, AFI_IP, AFI_IP6);
}
break;
}
Expand Down Expand Up @@ -591,15 +591,17 @@ static void sendmsg_zebra_rnh(struct bgp_nexthop_cache *bnc, int command)
/* Don't try to register if Zebra doesn't know of this instance. */
if (!IS_BGP_INST_KNOWN_TO_ZEBRA(bnc->bgp)) {
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("%s: No zebra instance to talk to, not installing NHT entry",
__PRETTY_FUNCTION__);
zlog_debug(
"%s: No zebra instance to talk to, not installing NHT entry",
__func__);
return;
}

if (!bgp_zebra_num_connects()) {
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("%s: We have not connected yet, cannot send nexthops",
__PRETTY_FUNCTION__);
zlog_debug(
"%s: We have not connected yet, cannot send nexthops",
__func__);
}
p = &(bnc->node->p);
if ((command == ZEBRA_NEXTHOP_REGISTER
Expand Down Expand Up @@ -801,9 +803,10 @@ static void evaluate_paths(struct bgp_nexthop_cache *bnc)

if (!CHECK_FLAG(bnc->flags, BGP_NEXTHOP_PEER_NOTIFIED)) {
if (BGP_DEBUG(nht, NHT))
zlog_debug("%s: Updating peer (%s(%s)) status with NHT",
__FUNCTION__, peer->host,
peer->bgp->name_pretty);
zlog_debug(
"%s: Updating peer (%s(%s)) status with NHT",
__func__, peer->host,
peer->bgp->name_pretty);
bgp_fsm_event_update(peer, valid_nexthops);
SET_FLAG(bnc->flags, BGP_NEXTHOP_PEER_NOTIFIED);
}
Expand Down Expand Up @@ -882,7 +885,7 @@ void bgp_nht_register_enhe_capability_interfaces(struct peer *peer)
if (!sockunion2hostprefix(&peer->su, &p)) {
if (BGP_DEBUG(nht, NHT))
zlog_debug("%s: Unable to convert prefix to sockunion",
__PRETTY_FUNCTION__);
__func__);
return;
}

Expand Down
6 changes: 3 additions & 3 deletions bgpd/bgp_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ static int bgp_capability_hostname(struct peer *peer,
flog_warn(
EC_BGP_CAPABILITY_INVALID_DATA,
"%s: Received malformed hostname capability from peer %s",
__FUNCTION__, peer->host);
__func__, peer->host);
return -1;
}

Expand All @@ -720,7 +720,7 @@ static int bgp_capability_hostname(struct peer *peer,
flog_warn(
EC_BGP_CAPABILITY_INVALID_DATA,
"%s: Received invalid domain name len (hostname capability) from peer %s",
__FUNCTION__, peer->host);
__func__, peer->host);
return -1;
}

Expand All @@ -729,7 +729,7 @@ static int bgp_capability_hostname(struct peer *peer,
flog_warn(
EC_BGP_CAPABILITY_INVALID_DATA,
"%s: Received runt domain name (hostname capability) from peer %s",
__FUNCTION__, peer->host);
__func__, peer->host);
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ static int bgp_open_receive(struct peer *peer, bgp_size_t size)
if (bgp_getsockname(peer) < 0) {
flog_err_sys(EC_LIB_SOCKET,
"%s: bgp_getsockname() failed for peer: %s",
__FUNCTION__, peer->host);
__func__, peer->host);
return BGP_Stop;
}

Expand Down
13 changes: 6 additions & 7 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -2926,8 +2926,7 @@ static int bgp_maximum_prefix_restart_timer(struct thread *thread)
peer->host);

if ((peer_clear(peer, NULL) < 0) && bgp_debug_neighbor_events(peer))
zlog_debug("%s: %s peer_clear failed",
__PRETTY_FUNCTION__, peer->host);
zlog_debug("%s: %s peer_clear failed", __func__, peer->host);

return 0;
}
Expand Down Expand Up @@ -3732,7 +3731,7 @@ int bgp_update(struct peer *peer, struct prefix *p, uint32_t addpath_id,
->nexthop,
buf1, INET6_ADDRSTRLEN);
zlog_debug("%s(%s): NH unresolved",
__FUNCTION__, buf1);
__func__, buf1);
}
bgp_path_info_unset_flag(rn, pi,
BGP_PATH_VALID);
Expand Down Expand Up @@ -3880,8 +3879,8 @@ int bgp_update(struct peer *peer, struct prefix *p, uint32_t addpath_id,
inet_ntop(AF_INET,
(const void *)&attr_new->nexthop,
buf1, INET6_ADDRSTRLEN);
zlog_debug("%s(%s): NH unresolved",
__FUNCTION__, buf1);
zlog_debug("%s(%s): NH unresolved", __func__,
buf1);
}
bgp_path_info_unset_flag(rn, new, BGP_PATH_VALID);
}
Expand Down Expand Up @@ -5040,7 +5039,7 @@ void bgp_static_update(struct bgp *bgp, struct prefix *p,
INET6_ADDRSTRLEN);
zlog_debug(
"%s(%s): Route not in table, not advertising",
__FUNCTION__, buf1);
__func__, buf1);
}
bgp_path_info_unset_flag(
rn, pi, BGP_PATH_VALID);
Expand Down Expand Up @@ -5089,7 +5088,7 @@ void bgp_static_update(struct bgp *bgp, struct prefix *p,
INET6_ADDRSTRLEN);
zlog_debug(
"%s(%s): Route not in table, not advertising",
__FUNCTION__, buf1);
__func__, buf1);
}
bgp_path_info_unset_flag(rn, new, BGP_PATH_VALID);
}
Expand Down
Loading