@@ -6754,7 +6754,7 @@ static void set_clearing_resume_info(struct bgp_clearing_info *cinfo,
67546754 const struct bgp_table *table,
67556755 const struct prefix *p, bool inner_p)
67566756{
6757- if (bgp_debug_neighbor_events ( NULL ))
6757+ if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS_DETAIL ))
67586758 zlog_debug("%s: %sinfo for %s/%s %pFX", __func__,
67596759 inner_p ? "inner " : "", afi2str(table->afi),
67606760 safi2str(table->safi), p);
@@ -6812,7 +6812,7 @@ static struct bgp_dest *clearing_dest_helper(struct bgp_table *table,
68126812 /* Outer/RD table: use current RD if possible, advance
68136813 * otherwise
68146814 */
6815- if (bgp_debug_neighbor_events ( NULL )) {
6815+ if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS_DETAIL )) {
68166816 prefix_rd2str((struct prefix_rd *)pfx, buf, sizeof(buf),
68176817 ASNOTATION_PLAIN);
68186818 zlog_debug("%s: using RESUME%s prefix %s", __func__,
@@ -6822,7 +6822,7 @@ static struct bgp_dest *clearing_dest_helper(struct bgp_table *table,
68226822 dest = bgp_node_match(table, pfx);
68236823 } else {
68246824 /* Normal prefix: look for next prefix */
6825- if (bgp_debug_neighbor_events ( NULL ))
6825+ if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS_DETAIL ))
68266826 zlog_debug("%s: using RESUME%s prefix %pFX", __func__,
68276827 inner_p ? " inner" : "", pfx);
68286828
@@ -6838,7 +6838,7 @@ static struct bgp_dest *clearing_dest_helper(struct bgp_table *table,
68386838 }
68396839 }
68406840
6841- if (bgp_debug_neighbor_events ( NULL )) {
6841+ if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS_DETAIL )) {
68426842 if (outer_level_p) {
68436843 if (dest)
68446844 prefix_rd2str((struct prefix_rd *)(&dest->rn->p), buf, sizeof(buf),
@@ -6896,7 +6896,7 @@ static int walk_batch_table_helper(struct bgp_clearing_info *cinfo,
68966896 UNSET_FLAG(cinfo->flags, (BGP_CLEARING_INFO_FLAG_RESUME |
68976897 BGP_CLEARING_INFO_FLAG_INNER));
68986898
6899- if (bgp_debug_neighbor_events ( NULL ))
6899+ if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS_DETAIL ))
69006900 zlog_debug("%s: table %s/%s, dest %pBD", __func__, afi2str(table->afi),
69016901 safi2str(table->safi), dest);
69026902
@@ -6946,7 +6946,7 @@ static int walk_batch_table_helper(struct bgp_clearing_info *cinfo,
69466946
69476947 if (cinfo->curr_counter >= bm->peer_clearing_batch_max_dests) {
69486948 /* Capture info about last dest seen and break */
6949- if (bgp_debug_neighbor_events ( NULL ))
6949+ if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS_DETAIL ))
69506950 zlog_debug("%s: %s/%s: pfx %pFX reached limit %u", __func__,
69516951 afi2str(table->afi), safi2str(table->safi), &pfx,
69526952 cinfo->curr_counter);
@@ -6960,7 +6960,7 @@ static int walk_batch_table_helper(struct bgp_clearing_info *cinfo,
69606960 }
69616961
69626962 if (examined > 0) {
6963- if (bgp_debug_neighbor_events ( NULL ))
6963+ if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS_DETAIL ))
69646964 zlog_debug("%s: %s/%s: examined %u dests, processed %u paths",
69656965 __func__, afi2str(table->afi),
69666966 safi2str(table->safi), examined, processed);
@@ -6995,7 +6995,7 @@ static int clear_batch_rib_helper(struct bgp_clearing_info *cinfo)
69956995 safi = SAFI_UNICAST;
69966996 }
69976997
6998- if (bgp_debug_neighbor_events ( NULL ))
6998+ if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS_DETAIL ))
69996999 zlog_debug("%s: %s: AFI/SAFI %s/%s", __func__, resume_str, afi2str(afi),
70007000 safi2str(safi));
70017001
@@ -7005,7 +7005,7 @@ static int clear_batch_rib_helper(struct bgp_clearing_info *cinfo)
70057005 /* Identify table to be examined: special handling
70067006 * for some SAFIs
70077007 */
7008- if (bgp_debug_neighbor_events ( NULL ))
7008+ if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS_DETAIL ))
70097009 zlog_debug("%s: examining AFI/SAFI %s/%s", __func__, afi2str(afi),
70107010 safi2str(safi));
70117011
@@ -7033,7 +7033,7 @@ static int clear_batch_rib_helper(struct bgp_clearing_info *cinfo)
70337033 else
70347034 strlcpy(pbuf, "NULL", sizeof(pbuf));
70357035
7036- if (bgp_debug_neighbor_events ( NULL ))
7036+ if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS_DETAIL ))
70377037 zlog_debug("%s: outer table %s/%s starting dest %s",
70387038 __func__, afi2str(outer_table->afi),
70397039 safi2str(outer_table->safi), pbuf);
@@ -7052,7 +7052,7 @@ static int clear_batch_rib_helper(struct bgp_clearing_info *cinfo)
70527052 prefix_rd2str((struct prefix_rd *)(&dest->rn->p), pbuf,
70537053 sizeof(pbuf), ASNOTATION_PLAIN);
70547054
7055- if (bgp_debug_neighbor_events ( NULL ))
7055+ if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS_DETAIL ))
70567056 zlog_debug("%s: outer table %s/%s, dest %s",
70577057 __func__, afi2str(outer_table->afi),
70587058 safi2str(outer_table->safi), pbuf);
@@ -7107,7 +7107,7 @@ void bgp_clear_route_batch(struct bgp_clearing_info *cinfo)
71077107{
71087108 int ret;
71097109
7110- if (bgp_debug_neighbor_events ( NULL ))
7110+ if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS_DETAIL ))
71117111 zlog_debug("%s: BGP %s, batch %u", __func__,
71127112 cinfo->bgp->name_pretty, cinfo->id);
71137113
@@ -7122,7 +7122,7 @@ void bgp_clear_route_batch(struct bgp_clearing_info *cinfo)
71227122 /* Handle pause/resume for the walk: we've captured key info
71237123 * in cinfo so we can resume later.
71247124 */
7125- if (bgp_debug_neighbor_events ( NULL ))
7125+ if (BGP_DEBUG(neighbor_events, NEIGHBOR_EVENTS_DETAIL ))
71267126 zlog_debug("%s: reschedule cinfo at %s/%s, %pFX", __func__,
71277127 afi2str(cinfo->last_afi),
71287128 safi2str(cinfo->last_safi), &(cinfo->last_pfx));
0 commit comments