diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-05-12 12:03:59 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-05-12 12:03:59 -0400 | 
| commit | a4544597f4f571d8848aacd690bc802a14062108 (patch) | |
| tree | 79b49368d023fbe514f06ec859079c1c4e6e7589 /ospfd | |
| parent | 7d7be47ef0a7b0c004be8e768e2b47ab50a921e0 (diff) | |
ospfd: Use _func__ instead of __PRETTY_FUNCTION__
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospfd')
| -rw-r--r-- | ospfd/ospf_asbr.c | 6 | ||||
| -rw-r--r-- | ospfd/ospf_flood.c | 10 | ||||
| -rw-r--r-- | ospfd/ospf_gr_helper.c | 53 | ||||
| -rw-r--r-- | ospfd/ospf_nsm.c | 2 | ||||
| -rw-r--r-- | ospfd/ospf_packet.c | 2 | ||||
| -rw-r--r-- | ospfd/ospf_spf.c | 2 | 
6 files changed, 32 insertions, 43 deletions
diff --git a/ospfd/ospf_asbr.c b/ospfd/ospf_asbr.c index b022133dcd..bda00e0c9e 100644 --- a/ospfd/ospf_asbr.c +++ b/ospfd/ospf_asbr.c @@ -692,8 +692,7 @@ struct ospf_lsa *ospf_originate_summary_lsa(struct ospf *ospf,  		if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR))  			zlog_debug(  				"%s: LSA is in MAX-AGE so refreshing LSA(%pI4/%d)", -				__PRETTY_FUNCTION__, &aggr->p.prefix, -				aggr->p.prefixlen); +				__func__, &aggr->p.prefix, aggr->p.prefixlen);  		ospf_external_lsa_refresh(ospf, lsa, &ei_aggr,  					  LSA_REFRESH_FORCE, 1); @@ -711,8 +710,7 @@ struct ospf_lsa *ospf_originate_summary_lsa(struct ospf *ospf,  		if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR))  			zlog_debug(  				"%s: External route prefix is same as aggr so refreshing LSA(%pI4/%d)", -				__PRETTY_FUNCTION__, &aggr->p.prefix, -				aggr->p.prefixlen); +				__func__, &aggr->p.prefix, aggr->p.prefixlen);  		ospf_external_lsa_refresh(ospf, lsa, &ei_aggr,  					  LSA_REFRESH_FORCE, 1);  		SET_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_ORIGINATED); diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index caba03c1b5..7eb587899b 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -388,8 +388,7 @@ int ospf_flood(struct ospf *ospf, struct ospf_neighbor *nbr,  			if (IS_DEBUG_OSPF_GR_HELPER)  				zlog_debug(  					"%s, Received a maxage GRACE-LSA from router %pI4", -					__PRETTY_FUNCTION__, -					&new->data->adv_router); +					__func__, &new->data->adv_router);  			if (current) {  				ospf_process_maxage_grace_lsa(ospf, new, nbr); @@ -397,22 +396,21 @@ int ospf_flood(struct ospf *ospf, struct ospf_neighbor *nbr,  				if (IS_DEBUG_OSPF_GR_HELPER)  					zlog_debug(  						"%s, Grace LSA doesn't exist in lsdb, so discarding grace lsa", -						__PRETTY_FUNCTION__); +						__func__);  				return -1;  			}  		} else {  			if (IS_DEBUG_OSPF_GR_HELPER)  				zlog_debug(  					"%s, Received a GRACE-LSA from router %pI4", -					__PRETTY_FUNCTION__, -					&new->data->adv_router); +					__func__, &new->data->adv_router);  			if (ospf_process_grace_lsa(ospf, new, nbr)  			    == OSPF_GR_NOT_HELPER) {  				if (IS_DEBUG_OSPF_GR_HELPER)  					zlog_debug(  						"%s, Not moving to HELPER role, So discarding grace LSA", -						__PRETTY_FUNCTION__); +						__func__);  				return -1;  			}  		} diff --git a/ospfd/ospf_gr_helper.c b/ospfd/ospf_gr_helper.c index a86e1b8401..d818878cf5 100644 --- a/ospfd/ospf_gr_helper.c +++ b/ospfd/ospf_gr_helper.c @@ -164,7 +164,7 @@ void ospf_gr_helper_init(struct ospf *ospf)  	int rc;  	if (IS_DEBUG_OSPF_GR_HELPER) -		zlog_debug("%s, GR Helper init.", __PRETTY_FUNCTION__); +		zlog_debug("%s, GR Helper init.", __func__);  	ospf->is_helper_supported = OSPF_GR_FALSE;  	ospf->strict_lsa_check = OSPF_GR_TRUE; @@ -201,7 +201,7 @@ void ospf_gr_helper_stop(struct ospf *ospf)  {  	if (IS_DEBUG_OSPF_GR_HELPER) -		zlog_debug("%s, GR helper deinit.", __PRETTY_FUNCTION__); +		zlog_debug("%s, GR helper deinit.", __func__);  	ospf_enable_rtr_hash_destroy(ospf); @@ -305,7 +305,7 @@ static int ospf_extract_grace_lsa_fields(struct ospf_lsa *lsa,  			if (IS_DEBUG_OSPF_GR_HELPER)  				zlog_debug(  					"%s, Malformed packet.Invalid TLV type:%d", -					__PRETTY_FUNCTION__, ntohs(tlvh->type)); +					__func__, ntohs(tlvh->type));  			return OSPF_GR_FAILURE;  		}  	} @@ -370,16 +370,14 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,  					    &restart_reason);  	if (ret != OSPF_GR_SUCCESS) {  		if (IS_DEBUG_OSPF_GR_HELPER) -			zlog_debug("%s, Wrong Grace LSA packet.", -				   __PRETTY_FUNCTION__); +			zlog_debug("%s, Wrong Grace LSA packet.", __func__);  		return OSPF_GR_NOT_HELPER;  	}  	if (IS_DEBUG_OSPF_GR_HELPER)  		zlog_debug(  			"%s, Grace LSA received from %pI4, grace interval:%u, restartreason :%s", -			__PRETTY_FUNCTION__, &restart_addr, -			grace_interval, +			__func__, &restart_addr, grace_interval,  			ospf_restart_reason2str(restart_reason));  	/* Incase of broadcast links, if RESTARTER is DR_OTHER, @@ -393,8 +391,7 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,  			if (IS_DEBUG_OSPF_GR_HELPER)  				zlog_debug(  					"%s, Restarter is not a nbr(%pI4) for this router.", -					__PRETTY_FUNCTION__, -					&restart_addr); +					__func__, &restart_addr);  			return OSPF_GR_NOT_HELPER;  		}  	} else @@ -411,7 +408,7 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,  			if (IS_DEBUG_OSPF_GR_HELPER)  				zlog_debug(  					"%s, HELPER support is disabled, So not a HELPER", -					__PRETTY_FUNCTION__); +					__func__);  			restarter->gr_helper_info.rejected_reason =  				OSPF_HELPER_SUPPORT_DISABLED;  			return OSPF_GR_NOT_HELPER; @@ -426,7 +423,7 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,  		if (IS_DEBUG_OSPF_GR_HELPER)  			zlog_debug(  				"%s, This Neighbour %pI4 is not in FULL state.", -				__PRETTY_FUNCTION__, &restarter->src); +				__func__, &restarter->src);  		restarter->gr_helper_info.rejected_reason =  			OSPF_HELPER_NOT_A_VALID_NEIGHBOUR;  		return OSPF_GR_NOT_HELPER; @@ -440,7 +437,7 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,  		if (IS_DEBUG_OSPF_GR_HELPER)  			zlog_debug(  				"%s, Router supports only planned restarts but received the GRACE LSA for an unplanned restart.", -				__PRETTY_FUNCTION__); +				__func__);  		restarter->gr_helper_info.rejected_reason =  			OSPF_HELPER_PLANNED_ONLY_RESTART;  		return OSPF_GR_NOT_HELPER; @@ -454,7 +451,7 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,  		if (IS_DEBUG_OSPF_GR_HELPER)  			zlog_debug(  				"%s, Changed LSA in Rxmt list. So not Helper.", -				__PRETTY_FUNCTION__); +				__func__);  		restarter->gr_helper_info.rejected_reason =  			OSPF_HELPER_TOPO_CHANGE_RTXMT_LIST;  		return OSPF_GR_NOT_HELPER; @@ -465,8 +462,7 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,  		if (IS_DEBUG_OSPF_GR_HELPER)  			zlog_debug(  				"%s, Grace LSA age(%d) is more than the graceinterval(%d)", -				__PRETTY_FUNCTION__, lsa->data->ls_age, -				grace_interval); +				__func__, lsa->data->ls_age, grace_interval);  		restarter->gr_helper_info.rejected_reason =  			OSPF_HELPER_LSA_AGE_MORE;  		return OSPF_GR_NOT_HELPER; @@ -482,7 +478,7 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,  		if (IS_DEBUG_OSPF_GR_HELPER)  			zlog_debug(  				"%s, Received grace period %d is larger than supported grace %d", -				__PRETTY_FUNCTION__, grace_interval, +				__func__, grace_interval,  				ospf->supported_grace_time);  		actual_grace_interval = ospf->supported_grace_time;  	} @@ -497,12 +493,12 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,  		if (IS_DEBUG_OSPF_GR_HELPER)  			zlog_debug(  				"%s, Router is already acting as a HELPER for this nbr,so restart the grace timer", -				__PRETTY_FUNCTION__); +				__func__);  	} else {  		if (IS_DEBUG_OSPF_GR_HELPER)  			zlog_debug(  				"%s, This Router becomes a HELPER for the neighbour %pI4", -				__PRETTY_FUNCTION__, &restarter->src); +				__func__, &restarter->src);  	}  	/* Became a Helper to the RESTART neighbour. @@ -518,8 +514,8 @@ int ospf_process_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,  	ospf->active_restarter_cnt++;  	if (IS_DEBUG_OSPF_GR_HELPER) -		zlog_debug("%s, Grace timer started.interval:%d", -			   __PRETTY_FUNCTION__, actual_grace_interval); +		zlog_debug("%s, Grace timer started.interval:%d", __func__, +			   actual_grace_interval);  	/* Start the grace timer */  	thread_add_timer(master, ospf_handle_grace_timer_expiry, restarter, @@ -607,8 +603,7 @@ void ospf_helper_handle_topo_chg(struct ospf *ospf, struct ospf_lsa *lsa)  	if (IS_DEBUG_OSPF_GR_HELPER)  		zlog_debug(  			"%s, Topo change detected due to lsa LSID:%pI4 type:%d", -			__PRETTY_FUNCTION__, &lsa->data->id, -			lsa->data->type); +			__func__, &lsa->data->id, lsa->data->type);  	lsa->to_be_acknowledged = OSPF_GR_TRUE; @@ -671,8 +666,7 @@ void ospf_gr_helper_exit(struct ospf_neighbor *nbr,  	if (IS_DEBUG_OSPF_GR_HELPER)  		zlog_debug("%s, Exiting from HELPER support to %pI4, due to %s", -			   __PRETTY_FUNCTION__, &nbr->src, -			   ospf_exit_reason2str(reason)); +			   __func__, &nbr->src, ospf_exit_reason2str(reason));  	/* Reset helper status*/  	nbr->gr_helper_info.gr_helper_status = OSPF_GR_NOT_HELPER; @@ -704,7 +698,7 @@ void ospf_gr_helper_exit(struct ospf_neighbor *nbr,  		if (IS_DEBUG_OSPF_GR_HELPER)  			zlog_debug(  				"%s, Failed GR exit, so bringing down the neighbour", -				__PRETTY_FUNCTION__); +				__func__);  		OSPF_NSM_EVENT_EXECUTE(nbr, NSM_KillNbr);  	} @@ -752,14 +746,13 @@ void ospf_process_maxage_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,  					    &restartReason);  	if (ret != OSPF_GR_SUCCESS) {  		if (IS_DEBUG_OSPF_GR_HELPER) -			zlog_debug("%s, Wrong Grace LSA packet.", -				   __PRETTY_FUNCTION__); +			zlog_debug("%s, Wrong Grace LSA packet.", __func__);  		return;  	}  	if (IS_DEBUG_OSPF_GR_HELPER) -		zlog_debug("%s, GraceLSA received for neighbour %pI4", -			   __PRETTY_FUNCTION__, &restartAddr); +		zlog_debug("%s, GraceLSA received for neighbour %pI4", __func__, +			   &restartAddr);  	/* In case of broadcast links, if RESTARTER is DR_OTHER,  	 * grace LSA might be received from DR, so fetching the @@ -772,7 +765,7 @@ void ospf_process_maxage_grace_lsa(struct ospf *ospf, struct ospf_lsa *lsa,  			if (IS_DEBUG_OSPF_GR_HELPER)  				zlog_debug(  					"%s, Restarter is not a neighbour for this router.", -					__PRETTY_FUNCTION__); +					__func__);  			return;  		}  	} else { diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c index 006c4888ae..b3b9244b22 100644 --- a/ospfd/ospf_nsm.c +++ b/ospfd/ospf_nsm.c @@ -78,7 +78,7 @@ static int ospf_inactivity_timer(struct thread *thread)  	else if (IS_DEBUG_OSPF_GR_HELPER)  		zlog_debug(  			"%s, Acting as HELPER for this neighbour, So inactivitytimer event will not be fired.", -			__PRETTY_FUNCTION__); +			__func__);  	return 0;  } diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index aa98d7dd28..2de6731758 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -4266,7 +4266,7 @@ void ospf_ls_ack_send(struct ospf_neighbor *nbr, struct ospf_lsa *lsa)  	if (IS_GRACE_LSA(lsa)) {  		if (IS_DEBUG_OSPF_GR_HELPER)  			zlog_debug("%s, Sending GRACE ACK to Restarter.", -				   __PRETTY_FUNCTION__); +				   __func__);  	}  	if (listcount(oi->ls_ack_direct.ls_ack) == 0) diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c index 0164bfac67..3849d4b7ea 100644 --- a/ospfd/ospf_spf.c +++ b/ospfd/ospf_spf.c @@ -1994,7 +1994,7 @@ void ospf_spf_calculate_schedule(struct ospf *ospf, ospf_spf_reason_t reason)  void ospf_restart_spf(struct ospf *ospf)  {  	if (IS_DEBUG_OSPF_EVENT) -		zlog_debug("%s: Restart SPF.", __PRETTY_FUNCTION__); +		zlog_debug("%s: Restart SPF.", __func__);  	/* Handling inter area and intra area routes*/  	if (ospf->new_table) {  | 
