Commit fe19afeedb for frr
commit fe19afeedb77d4a1eb420e2f298f26d085cdbd9a
Author: Donald Sharp <sharpd@nvidia.com>
Date: Fri Oct 2 11:52:49 2026 -0400
zebra: Standardize prefix output, %pFX, in debugs
Currently there are two problems with using %pFX
in zebra code:
a) The output of vrf name, vrf id and table was not
being used for every debug. Leading to situations
where if you are debugging and trying to follow
a prefix that is used in multiple vrf's( or even
a table!) to know if it is actually the one
you are interested in
b) The output was not standardized. It had grone
up to be somewhat varied. Solidify on "(%s:%u:%u)%pFX",
vrf_name, vrf_id, table_id, prefix. This allows
very easy grepping.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
diff --git a/zebra/connected.c b/zebra/connected.c
index 810c915f76..dc537097ff 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -346,8 +346,8 @@ void connected_up(struct interface *ifp, struct connected *ifc)
}
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("interface %s vrf %s(%u) connected address %pFX is in %s%s state, not installing connected route",
- ifp->name, ifp->vrf->name, ifp->vrf->vrf_id, &p,
+ zlog_debug("interface %s (%s:%u:%u)%pFX is in %s%s state, not installing connected route",
+ ifp->name, ifp->vrf->name, ifp->vrf->vrf_id, zvrf->table_id, &p,
CHECK_FLAG(ifc->flags, ZEBRA_IFA_TENTATIVE) ? "tentative" : "",
CHECK_FLAG(ifc->flags, ZEBRA_IFA_DADFAILED) ? " DAD failed"
: "");
@@ -375,9 +375,9 @@ void connected_up(struct interface *ifp, struct connected *ifc)
/* Schedule LSP forwarding entries for processing, if appropriate. */
if (zvrf->vrf->vrf_id == VRF_DEFAULT) {
if (IS_ZEBRA_DEBUG_MPLS)
- zlog_debug(
- "%u: IF %s IP %pFX address add/up, scheduling MPLS processing",
- zvrf->vrf->vrf_id, ifp->name, &p);
+ zlog_debug("IF %s (%s:%u:%u)%pFX address add/up, scheduling MPLS processing",
+ ifp->name, zvrf->vrf->name, zvrf->vrf->vrf_id, zvrf->table_id,
+ &p);
mpls_mark_lsps_for_processing(zvrf, &p);
}
}
@@ -486,8 +486,8 @@ void connected_down(struct interface *ifp, struct connected *ifc)
*/
if (CHECK_FLAG(ifc->conf, ZEBRA_IFC_DOWN)) {
if (IS_ZEBRA_DEBUG_RIB)
- zlog_debug("%s: ifc %p, %pFX already DOWN",
- __func__, ifc, ifc->address);
+ zlog_debug("%s: ifc %p, (%s:%u:%u)%pFX already DOWN", __func__, ifc,
+ ifp->vrf->name, ifp->vrf->vrf_id, zvrf->table_id, ifc->address);
return;
}
@@ -580,9 +580,9 @@ void connected_down(struct interface *ifp, struct connected *ifc)
/* Schedule LSP forwarding entries for processing, if appropriate. */
if (zvrf->vrf->vrf_id == VRF_DEFAULT) {
if (IS_ZEBRA_DEBUG_MPLS)
- zlog_debug(
- "%u: IF %s IP %pFX address down, scheduling MPLS processing",
- zvrf->vrf->vrf_id, ifp->name, &p);
+ zlog_debug("IF %s (%s:%u:%u)%pFX address down, scheduling MPLS processing",
+ ifp->name, zvrf->vrf->name, zvrf->vrf->vrf_id, zvrf->table_id,
+ &p);
mpls_mark_lsps_for_processing(zvrf, &p);
}
}
@@ -599,11 +599,13 @@ static void connected_delete_helper(struct connected *ifc, struct prefix *p)
/* Schedule LSP forwarding entries for processing, if appropriate. */
if (ifp->vrf->vrf_id == VRF_DEFAULT) {
+ struct zebra_vrf *zvrf = ifp->vrf->info;
+
if (IS_ZEBRA_DEBUG_MPLS)
- zlog_debug(
- "%u: IF %s IP %pFX address delete, scheduling MPLS processing",
- ifp->vrf->vrf_id, ifp->name, p);
- mpls_mark_lsps_for_processing(ifp->vrf->info, p);
+ zlog_debug("IF %s (%s:%u:%u)%pFX address delete, scheduling MPLS processing",
+ ifp->name, ifp->vrf->name, ifp->vrf->vrf_id,
+ zvrf ? zvrf->table_id : 0, p);
+ mpls_mark_lsps_for_processing(zvrf, p);
}
}
diff --git a/zebra/interface.c b/zebra/interface.c
index ad8e2dc44f..c70cb18abd 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1314,10 +1314,14 @@ static void zebra_if_addr_update_ctx(struct zebra_dplane_ctx *ctx,
op = dplane_ctx_get_op(ctx);
addr = dplane_ctx_get_intf_addr(ctx);
- if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("%s: %s: ifindex %s(%u), addr %pFX", __func__,
- dplane_op2str(dplane_ctx_get_op(ctx)), ifp->name,
- ifp->ifindex, addr);
+ if (IS_ZEBRA_DEBUG_KERNEL) {
+ struct zebra_vrf *zvrf = ifp->vrf ? ifp->vrf->info : NULL;
+
+ zlog_debug("%s: %s: ifindex %s(%u), (%s:%u:%u)%pFX", __func__,
+ dplane_op2str(dplane_ctx_get_op(ctx)), ifp->name, ifp->ifindex,
+ VRF_LOGNAME(ifp->vrf), ifp->vrf ? ifp->vrf->vrf_id : VRF_UNKNOWN,
+ zvrf ? zvrf->table_id : 0, addr);
+ }
if (dplane_ctx_intf_is_tentative(ctx))
SET_FLAG(flags, ZEBRA_IFA_TENTATIVE);
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index 14cd63a5eb..31bdfd2526 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -610,11 +610,13 @@ void zebra_interface_address_add_update(struct interface *ifp,
{
struct zserv *client;
- if (IS_ZEBRA_DEBUG_EVENT)
- zlog_debug(
- "MESSAGE: ZEBRA_INTERFACE_ADDRESS_ADD %pFX on %s vrf %s(%u)",
- ifc->address, ifp->name, ifp->vrf->name,
- ifp->vrf->vrf_id);
+ if (IS_ZEBRA_DEBUG_EVENT) {
+ struct zebra_vrf *zvrf = ifp->vrf->info;
+
+ zlog_debug("MESSAGE: ZEBRA_INTERFACE_ADDRESS_ADD (%s:%u:%u)%pFX on %s",
+ ifp->vrf->name, ifp->vrf->vrf_id, zvrf ? zvrf->table_id : 0,
+ ifc->address, ifp->name);
+ }
if (!CHECK_FLAG(ifc->conf, ZEBRA_IFC_REAL))
flog_warn(
@@ -644,11 +646,13 @@ void zebra_interface_address_delete_update(struct interface *ifp,
{
struct zserv *client;
- if (IS_ZEBRA_DEBUG_EVENT)
- zlog_debug(
- "MESSAGE: ZEBRA_INTERFACE_ADDRESS_DELETE %pFX on %s vrf %s(%u)",
- ifc->address, ifp->name, ifp->vrf->name,
- ifp->vrf->vrf_id);
+ if (IS_ZEBRA_DEBUG_EVENT) {
+ struct zebra_vrf *zvrf = ifp->vrf->info;
+
+ zlog_debug("MESSAGE: ZEBRA_INTERFACE_ADDRESS_DELETE (%s:%u:%u)%pFX on %s",
+ ifp->vrf->name, ifp->vrf->vrf_id, zvrf ? zvrf->table_id : 0,
+ ifc->address, ifp->name);
+ }
zebra_vxlan_add_del_gw_macip(ifp, ifc->address, 0);
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 7edd8c432d..5c3a40828e 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -632,9 +632,10 @@ int zsend_redistribute_route(int cmd, struct zserv *client, const struct route_n
}
if (IS_ZEBRA_DEBUG_SEND)
- zlog_debug("%s: %s to client %s: type %s, vrf_id %d, table %u, p %pFX", __func__,
+ zlog_debug("%s: %s to client %s: type %s, (%s:%u:%u)%pFX", __func__,
zserv_command_string(cmd), zebra_route_string(client->proto),
- zebra_route_string(api.type), api.vrf_id, api.tableid, &api.prefix);
+ zebra_route_string(api.type), vrf_id_to_name(api.vrf_id), api.vrf_id,
+ api.tableid, &api.prefix);
return zserv_send_message(client, s);
}
@@ -765,16 +766,17 @@ static int route_notify_internal(const struct prefix *p,
if (IS_ZEBRA_DEBUG_PACKET) {
struct vrf *vrf = vrf_lookup_by_id(vrf_id);
- zlog_debug("Not Notifying Owner: %s about prefix %pFX(%u) %d vrf: %s",
- zebra_route_string(type), p, table_id, note,
- VRF_LOGNAME(vrf));
+ zlog_debug("Not Notifying Owner: %s about (%s:%u:%u)%pFX note %d",
+ zebra_route_string(type), VRF_LOGNAME(vrf), vrf_id, table_id, p,
+ note);
}
return 0;
}
if (IS_ZEBRA_DEBUG_PACKET)
- zlog_debug("Notifying Owner: %s about prefix %pFX(%u) %d vrf: %u Table: %u",
- zebra_route_string(type), p, table_id, note, vrf_id, table_id);
+ zlog_debug("Notifying Owner: %s about (%s:%u:%u)%pFX note %d",
+ zebra_route_string(type), vrf_id_to_name(vrf_id), vrf_id, table_id, p,
+ note);
/* We're just allocating a small-ish buffer here, since we only
* encode a small amount of data.
@@ -2170,9 +2172,9 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
vrf_id = zvrf_id(zvrf);
if (IS_ZEBRA_DEBUG_RECV)
- zlog_debug("%s: p=(%s:%u)%pFX, msg flags=0x%x, flags=0x%x",
- __func__, zvrf_name(zvrf), api.tableid, &api.prefix,
- (int)api.message, api.flags);
+ zlog_debug("%s: (%s:%u:%u)%pFX, msg flags=0x%x, flags=0x%x", __func__,
+ zvrf_name(zvrf), vrf_id, api.tableid, &api.prefix, (int)api.message,
+ api.flags);
/* Allocate new route. */
re = zebra_rib_route_entry_new(
@@ -2196,9 +2198,9 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
if (CHECK_FLAG(api.message, ZAPI_MESSAGE_BACKUP_NEXTHOPS)
&& api.backup_nexthop_num == 0) {
if (IS_ZEBRA_DEBUG_RECV || IS_ZEBRA_DEBUG_EVENT)
- zlog_debug("%s: client %s: BACKUP flag set but no backup nexthops, prefix %pFX(%s:%u)",
- __func__, zebra_route_string(client->proto), &api.prefix,
- zvrf_name(zvrf), api.tableid);
+ zlog_debug("%s: client %s: BACKUP flag set but no backup nexthops, (%s:%u:%u)%pFX",
+ __func__, zebra_route_string(client->proto), zvrf_name(zvrf),
+ vrf_id, api.tableid, &api.prefix);
}
if (!re->nhe_id
@@ -2333,9 +2335,9 @@ static void zread_route_del(ZAPI_HANDLER_ARGS)
table_id = zvrf->table_id;
if (IS_ZEBRA_DEBUG_RECV)
- zlog_debug("%s: p=(%u:%u)%pFX, msg flags=0x%x, flags=0x%x",
- __func__, zvrf_id(zvrf), table_id, &api.prefix,
- (int)api.message, api.flags);
+ zlog_debug("%s: (%s:%u:%u)%pFX, msg flags=0x%x, flags=0x%x", __func__,
+ zvrf_name(zvrf), zvrf_id(zvrf), table_id, &api.prefix, (int)api.message,
+ api.flags);
char lttng_buf_prefix[PREFIX_STRLEN] = { 0 };
diff --git a/zebra/zebra_evpn.c b/zebra/zebra_evpn.c
index 25f9a32b76..11ee2a80c6 100644
--- a/zebra/zebra_evpn.c
+++ b/zebra/zebra_evpn.c
@@ -362,10 +362,13 @@ static int ip_prefix_send_to_client(vrf_id_t vrf_id, struct prefix *p,
/* Write packet size. */
stream_putw_at(s, 0, stream_get_endp(s));
- if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("Send ip prefix %pFX %s on vrf %s", p,
- (cmd == ZEBRA_IP_PREFIX_ROUTE_ADD) ? "ADD" : "DEL",
- vrf_id_to_name(vrf_id));
+ if (IS_ZEBRA_DEBUG_VXLAN) {
+ struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(vrf_id);
+
+ zlog_debug("Send ip prefix (%s:%u:%u)%pFX %s", vrf_id_to_name(vrf_id), vrf_id,
+ zvrf ? zvrf->table_id : 0, p,
+ (cmd == ZEBRA_IP_PREFIX_ROUTE_ADD) ? "ADD" : "DEL");
+ }
frrtrace(3, frr_zebra, ip_prefix_send_to_client, vrf_id, cmd, p);
if (cmd == ZEBRA_IP_PREFIX_ROUTE_ADD)
diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c
index 50e2f48895..0298709a1e 100644
--- a/zebra/zebra_evpn_mh.c
+++ b/zebra/zebra_evpn_mh.c
@@ -4134,16 +4134,23 @@ void zebra_evpn_proc_remote_nh(ZAPI_HANDLER_ARGS)
if (hdr->command == ZEBRA_EVPN_REMOTE_NH_ADD) {
stream_get(&rmac, s, sizeof(rmac));
- if (IS_ZEBRA_DEBUG_EVPN_MH_ES)
- zlog_debug(
- "evpn remote nh %d %pIA rmac %pEA add pfx %pFX",
- vrf_id, &nh, &rmac, &dummy_prefix);
+ if (IS_ZEBRA_DEBUG_EVPN_MH_ES) {
+ struct zebra_vrf *nh_zvrf = zebra_vrf_lookup_by_id(vrf_id);
+
+ zlog_debug("evpn remote nh %pIA rmac %pEA add (%s:%u:%u)%pFX", &nh, &rmac,
+ zvrf_name(nh_zvrf), vrf_id, nh_zvrf ? nh_zvrf->table_id : 0,
+ &dummy_prefix);
+ }
zebra_rib_queue_evpn_route_add(vrf_id, &rmac, &nh,
(struct prefix *)&dummy_prefix);
} else {
- if (IS_ZEBRA_DEBUG_EVPN_MH_ES)
- zlog_debug("evpn remote nh %d %pIA del pfx %pFX",
- vrf_id, &nh, &dummy_prefix);
+ if (IS_ZEBRA_DEBUG_EVPN_MH_ES) {
+ struct zebra_vrf *nh_zvrf = zebra_vrf_lookup_by_id(vrf_id);
+
+ zlog_debug("evpn remote nh %pIA del (%s:%u:%u)%pFX", &nh,
+ zvrf_name(nh_zvrf), vrf_id, nh_zvrf ? nh_zvrf->table_id : 0,
+ &dummy_prefix);
+ }
zebra_rib_queue_evpn_route_del(vrf_id, &nh,
(struct prefix *)&dummy_prefix);
}
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c
index c6bb8e619d..1d7746a19e 100644
--- a/zebra/zebra_mpls.c
+++ b/zebra/zebra_mpls.c
@@ -2360,14 +2360,11 @@ int zebra_mpls_fec_register(struct zebra_vrf *zvrf, struct prefix *p,
listnode_add(fec->client_list, client);
if (IS_ZEBRA_DEBUG_MPLS)
- zlog_debug("FEC %pFX label%s %u %s by client %s%s", p,
- have_label_index ? " index" : "",
+ zlog_debug("FEC (%s:%u:%u)%pFX label%s %u %s by client %s%s", zvrf_name(zvrf),
+ zvrf_id(zvrf), zvrf->table_id, p, have_label_index ? " index" : "",
have_label_index ? label_index : label,
- new_client ? "registered" : "updated",
- zebra_route_string(client->proto),
- is_configured_fec
- ? ", but using statically configured label"
- : "");
+ new_client ? "registered" : "updated", zebra_route_string(client->proto),
+ is_configured_fec ? ", but using statically configured label" : "");
/* If not a statically configured FEC, derive the local label
* from label index or use the provided label
@@ -2427,8 +2424,8 @@ int zebra_mpls_fec_unregister(struct zebra_vrf *zvrf, struct prefix *p,
listnode_delete(fec->client_list, client);
if (IS_ZEBRA_DEBUG_MPLS)
- zlog_debug("FEC %pFX unregistered by client %s", p,
- zebra_route_string(client->proto));
+ zlog_debug("FEC (%s:%u:%u)%pFX unregistered by client %s", zvrf_name(zvrf),
+ zvrf_id(zvrf), zvrf->table_id, p, zebra_route_string(client->proto));
/* If not a configured entry, delete the FEC if no other clients. Before
* deleting, see if any LSP needs to be uninstalled.
@@ -2591,7 +2588,8 @@ int zebra_mpls_static_fec_add(struct zebra_vrf *zvrf, struct prefix *p,
}
if (IS_ZEBRA_DEBUG_MPLS)
- zlog_debug("Add fec %pFX label %u", p, in_label);
+ zlog_debug("Add fec (%s:%u:%u)%pFX label %u", zvrf_name(zvrf),
+ zvrf_id(zvrf), zvrf->table_id, p, in_label);
} else {
SET_FLAG(fec->flags, FEC_FLAG_CONFIGURED);
if (fec->label == in_label)
@@ -2601,7 +2599,8 @@ int zebra_mpls_static_fec_add(struct zebra_vrf *zvrf, struct prefix *p,
/* Label change, update clients. */
old_label = fec->label;
if (IS_ZEBRA_DEBUG_MPLS)
- zlog_debug("Update fec %pFX new label %u", p, in_label);
+ zlog_debug("Update fec (%s:%u:%u)%pFX new label %u", zvrf_name(zvrf),
+ zvrf_id(zvrf), zvrf->table_id, p, in_label);
fec->label = in_label;
fec_update_clients(fec);
@@ -2637,8 +2636,8 @@ int zebra_mpls_static_fec_del(struct zebra_vrf *zvrf, struct prefix *p)
}
if (IS_ZEBRA_DEBUG_MPLS) {
- zlog_debug("Delete fec %pFX label %u label index %u", p,
- fec->label, fec->label_index);
+ zlog_debug("Delete fec (%s:%u:%u)%pFX label %u label index %u", zvrf_name(zvrf),
+ zvrf_id(zvrf), zvrf->table_id, p, fec->label, fec->label_index);
}
old_label = fec->label;
@@ -2977,9 +2976,9 @@ void zebra_mpls_zapi_labels_process(bool add_p, struct zebra_vrf *zvrf,
* find a route/FEC, so we'll continue that way.
*/
if (IS_ZEBRA_DEBUG_RECV || IS_ZEBRA_DEBUG_MPLS)
- zlog_debug(
- "%s: FTN update requested: no route for prefix %pFX",
- __func__, prefix);
+ zlog_debug("%s: FTN update requested: no route for (%s:%u:%u)%pFX",
+ __func__, zvrf_name(zvrf), zvrf_id(zvrf),
+ zvrf->table_id, prefix);
}
}
@@ -3021,9 +3020,9 @@ void zebra_mpls_zapi_labels_process(bool add_p, struct zebra_vrf *zvrf,
counter++;
} else if (IS_ZEBRA_DEBUG_RECV | IS_ZEBRA_DEBUG_MPLS) {
zapi_nexthop2str(znh, buf, sizeof(buf));
- zlog_debug(
- "%s: Unable to update FEC: prefix %pFX, label %u, znh %s",
- __func__, prefix, zl->local_label, buf);
+ zlog_debug("%s: Unable to update FEC: (%s:%u:%u)%pFX, label %u, znh %s",
+ __func__, zvrf_name(zvrf), zvrf_id(zvrf),
+ re ? re->table : zvrf->table_id, prefix, zl->local_label, buf);
}
}
@@ -3071,9 +3070,9 @@ void zebra_mpls_zapi_labels_process(bool add_p, struct zebra_vrf *zvrf,
counter++;
} else if (IS_ZEBRA_DEBUG_RECV | IS_ZEBRA_DEBUG_MPLS) {
zapi_nexthop2str(znh, buf, sizeof(buf));
- zlog_debug(
- "%s: Unable to update backup FEC: prefix %pFX, label %u, znh %s",
- __func__, prefix, zl->local_label, buf);
+ zlog_debug("%s: Unable to update backup FEC: (%s:%u:%u)%pFX, label %u, znh %s",
+ __func__, zvrf_name(zvrf), zvrf_id(zvrf),
+ re ? re->table : zvrf->table_id, prefix, zl->local_label, buf);
}
}
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c
index 15c092a036..ce76dc4075 100644
--- a/zebra/zebra_nhg.c
+++ b/zebra/zebra_nhg.c
@@ -2685,8 +2685,9 @@ static int nexthop_active(struct nexthop *nexthop, struct nhg_hash_entry *nhe,
if (is_default_prefix(&rn->p)
&& !rnh_resolve_via_default(zvrf, p.family)) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
- zlog_debug(" :%s: %pFX Resolved against default route",
- __func__, &p);
+ zlog_debug(" :%s: (%s:%u:%u)%pFX Resolved against default route",
+ __func__, zvrf_name(zvrf), nexthop->vrf_id,
+ zvrf->table_id, &p);
return 0;
}
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 6e7a1d4e52..f850d9a42f 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -1882,7 +1882,7 @@ struct route_node *rib_find_rn_from_ctx(const struct zebra_dplane_ctx *ctx)
if (table == NULL) {
if (IS_ZEBRA_DEBUG_DPLANE) {
- zlog_debug("Failed to find route for ctx: no table for afi %d, safi %d, vrf %s(%u) table %u Prefix: %pFX",
+ zlog_debug("Failed to find route for ctx: no table for afi %d, safi %d, (%s:%u:%u)%pFX",
dplane_ctx_get_afi(ctx), dplane_ctx_get_safi(ctx),
vrf_id_to_name(vrf_id), vrf_id, tableid,
dplane_ctx_get_dest(ctx));
@@ -1998,9 +1998,9 @@ static void rib_process_result(struct zebra_dplane_ctx *ctx)
rn = rib_find_rn_from_ctx(ctx);
if (rn == NULL) {
if (IS_ZEBRA_DEBUG_DPLANE) {
- zlog_debug("Failed to process dplane results: no route for %s(%u):%pRN prefix: %pFX",
- VRF_LOGNAME(vrf), dplane_ctx_get_vrf(ctx), rn,
- dplane_ctx_get_dest(ctx));
+ zlog_debug("Failed to process dplane results: no route for %pRN (%s:%u:%u)%pFX",
+ rn, VRF_LOGNAME(vrf), dplane_ctx_get_vrf(ctx),
+ dplane_ctx_get_table(ctx), dplane_ctx_get_dest(ctx));
}
goto done;
}
@@ -2284,8 +2284,8 @@ static void rib_process_dplane_notify(struct zebra_dplane_ctx *ctx)
rn = rib_find_rn_from_ctx(ctx);
if (rn == NULL) {
if (debug_p) {
- zlog_debug("Failed to process dplane notification: no routes for %s(%u:%u):%pRN prefix %pFX",
- VRF_LOGNAME(vrf), dplane_ctx_get_vrf(ctx), tableid, rn,
+ zlog_debug("Failed to process dplane notification: no routes for %pRN (%s:%u:%u)%pFX",
+ rn, VRF_LOGNAME(vrf), dplane_ctx_get_vrf(ctx), tableid,
dplane_ctx_get_dest(ctx));
}
goto done;
@@ -3525,7 +3525,8 @@ void mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
w->route_instance = route_instance;
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
- zlog_debug("Early Label Handling for %pFX", prefix);
+ zlog_debug("Early Label Handling for (%s:%u:%u)%pFX", zvrf_name(zvrf),
+ zvrf_id(zvrf), zvrf->table_id, prefix);
mq_add_handler(w, early_label_meta_queue_add);
}
@@ -3614,9 +3615,12 @@ int zebra_rib_queue_evpn_route_add(vrf_id_t vrf_id, const struct ethaddr *rmac,
w->ip = *vtep_ip;
w->prefix = *host_prefix;
- if (IS_ZEBRA_DEBUG_RIB_DETAILED)
- zlog_debug("%s: (%u)%pIA, host prefix %pFX enqueued", __func__,
- vrf_id, vtep_ip, host_prefix);
+ if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
+ struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(vrf_id);
+
+ zlog_debug("%s: %pIA, (%s:%u:%u)%pFX enqueued", __func__, vtep_ip, zvrf_name(zvrf),
+ vrf_id, zvrf ? zvrf->table_id : 0, host_prefix);
+ }
return mq_add_handler(w, rib_meta_queue_evpn_add);
}
@@ -3635,9 +3639,12 @@ int zebra_rib_queue_evpn_route_del(vrf_id_t vrf_id,
w->ip = *vtep_ip;
w->prefix = *host_prefix;
- if (IS_ZEBRA_DEBUG_RIB_DETAILED)
- zlog_debug("%s: (%u)%pIA, host prefix %pFX enqueued", __func__,
- vrf_id, vtep_ip, host_prefix);
+ if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
+ struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(vrf_id);
+
+ zlog_debug("%s: %pIA, (%s:%u:%u)%pFX enqueued", __func__, vtep_ip, zvrf_name(zvrf),
+ vrf_id, zvrf ? zvrf->table_id : 0, host_prefix);
+ }
return mq_add_handler(w, rib_meta_queue_evpn_add);
}
@@ -4348,10 +4355,10 @@ static int rib_meta_queue_early_route_add(struct meta_queue *mq, void *data)
if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
struct vrf *vrf = vrf_lookup_by_id(ere->re->vrf_id);
- zlog_debug("Route %pFX(%s:%s) (%s) queued for processing into sub-queue %s mq size %u",
- &ere->p, VRF_LOGNAME(vrf), safi2str(ere->safi),
- ere->deletion ? "delete" : "add", subqueue2str(META_QUEUE_EARLY_ROUTE),
- zrouter.mq->size);
+ zlog_debug("Route (%s:%u:%u)%pFX safi %s (%s) queued for processing into sub-queue %s mq size %u",
+ VRF_LOGNAME(vrf), ere->re->vrf_id, ere->re->table, &ere->p,
+ safi2str(ere->safi), ere->deletion ? "delete" : "add",
+ subqueue2str(META_QUEUE_EARLY_ROUTE), zrouter.mq->size);
}
return 0;
@@ -4381,10 +4388,10 @@ void rib_meta_queue_early_route_cleanup(const struct prefix *p, afi_t afi, safi_
if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
struct vrf *vrf = vrf_lookup_by_id(ere->re->vrf_id);
- zlog_debug("Route %pFX(%s:%s) type %s(%d) table %u removed from early route queue",
- p, VRF_LOGNAME(vrf), safi2str(ere->safi),
- zebra_route_string(route_type), route_type,
- ere->re->table);
+ zlog_debug("Route (%s:%u:%u)%pFX safi %s type %s(%d) removed from early route queue",
+ VRF_LOGNAME(vrf), vrf_id, ere->re->table, p,
+ safi2str(ere->safi), zebra_route_string(route_type),
+ route_type);
}
/* Free the early route memory */
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
index 6e6d80ae7c..d2a78d0397 100644
--- a/zebra/zebra_rnh.c
+++ b/zebra/zebra_rnh.c
@@ -177,8 +177,11 @@ struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid, safi_t safi, struct
if (IS_ZEBRA_DEBUG_NHT) {
struct vrf *vrf = vrf_lookup_by_id(vrfid);
- zlog_debug("%s(%u): Add RNH %pFX for safi: %u, client: %s", VRF_LOGNAME(vrf), vrfid,
- p, safi, client ? zebra_route_string(client->proto) : "pseudowire");
+ struct zebra_vrf *zvrf = vrf ? vrf->info : NULL;
+
+ zlog_debug("Add RNH (%s:%u:%u)%pFX for safi: %u, client: %s", VRF_LOGNAME(vrf),
+ vrfid, zvrf ? zvrf->table_id : 0, p, safi,
+ client ? zebra_route_string(client->proto) : "pseudowire");
}
table = get_rnh_table(vrfid, afi, safi);
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index 8c0dccf203..349bfad9e9 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -1857,9 +1857,13 @@ static int zl3vni_remote_nh_add(struct zebra_l3vni *zl3vni,
if (!nh) {
nh = zl3vni_nh_add(zl3vni, vtep_ip, rmac);
if (!nh) {
- if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("Failed to add NH %pIA as Neigh (RMAC %pEA L3-VNI %u prefix %pFX)",
- vtep_ip, rmac, zl3vni->vni, host_prefix);
+ if (IS_ZEBRA_DEBUG_VXLAN) {
+ struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(zl3vni->vrf_id);
+
+ zlog_debug("Failed to add NH %pIA as Neigh (RMAC %pEA L3-VNI %u (%s:%u:%u)%pFX)",
+ vtep_ip, rmac, zl3vni->vni, zvrf_name(zvrf),
+ zl3vni->vrf_id, zvrf ? zvrf->table_id : 0, host_prefix);
+ }
return -1;
}
@@ -1891,11 +1895,13 @@ static int zl3vni_remote_nh_add(struct zebra_l3vni *zl3vni,
"L3VNI %u: VTEP %pIA changed RMAC (old %pEA, new %pEA) for prefix %pFX; if this VTEP serves multiple L3VNIs/VRFs, the per-VTEP kernel neighbor entry can only hold one RMAC and traffic for other VRF(s) may be blackholed. Use a single shared system MAC per VTEP.",
zl3vni->vni, vtep_ip, &nh->emac, rmac, host_prefix);
- if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug(
- "L3VNI %u RMAC change(%pEA --> %pEA) for nexthop %pIA, prefix %pFX",
- zl3vni->vni, &nh->emac, rmac, vtep_ip,
- host_prefix);
+ if (IS_ZEBRA_DEBUG_VXLAN) {
+ struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(zl3vni->vrf_id);
+
+ zlog_debug("L3VNI %u RMAC change(%pEA --> %pEA) for nexthop %pIA, (%s:%u:%u)%pFX",
+ zl3vni->vni, &nh->emac, rmac, vtep_ip, zvrf_name(zvrf),
+ zl3vni->vrf_id, zvrf ? zvrf->table_id : 0, host_prefix);
+ }
frrtrace(5, frr_zebra, remote_nh_add_rmac_change, zl3vni->vni, &nh->emac, rmac,
vtep_ip, nh->refcnt);
@@ -1946,9 +1952,13 @@ static int svd_remote_nh_add(struct zebra_l3vni *zl3vni,
if (!nh) {
nh = svd_nh_add(vtep_ip, rmac);
if (!nh) {
- if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("Failed to add NH %pIA as SVD Neigh (RMAC %pEA prefix %pFX)",
- vtep_ip, rmac, host_prefix);
+ if (IS_ZEBRA_DEBUG_VXLAN) {
+ struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(zl3vni->vrf_id);
+
+ zlog_debug("Failed to add NH %pIA as SVD Neigh (RMAC %pEA (%s:%u:%u)%pFX)",
+ vtep_ip, rmac, zvrf_name(zvrf), zl3vni->vrf_id,
+ zvrf ? zvrf->table_id : 0, host_prefix);
+ }
return -1;
}
@@ -1967,10 +1977,13 @@ static int svd_remote_nh_add(struct zebra_l3vni *zl3vni,
"SVD L3VNI %u: VTEP %pIA advertised conflicting RMAC (old %pEA, new %pEA) for prefix %pFX; per-VTEP neighbor table can only store one RMAC, cross-VRF routed traffic may be blackholed. Use a single shared system MAC per VTEP.",
zl3vni->vni, vtep_ip, &nh->emac, rmac, host_prefix);
- if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("SVD RMAC change(%pEA --> %pEA) for nexthop %pIA, prefix %pFX refcnt %u",
- &nh->emac, rmac, vtep_ip, host_prefix,
- nh->refcnt);
+ if (IS_ZEBRA_DEBUG_VXLAN) {
+ struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(zl3vni->vrf_id);
+
+ zlog_debug("SVD RMAC change(%pEA --> %pEA) for nexthop %pIA, (%s:%u:%u)%pFX refcnt %u",
+ &nh->emac, rmac, vtep_ip, zvrf_name(zvrf), zl3vni->vrf_id,
+ zvrf ? zvrf->table_id : 0, host_prefix, nh->refcnt);
+ }
frrtrace(5, frr_zebra, remote_nh_add_rmac_change, zl3vni->vni, &nh->emac, rmac,
vtep_ip, nh->refcnt);