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

Mrib nht wonky #17254

Merged
merged 3 commits into from
Oct 28, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
zebra: Add safi to some debugs
Trying to figure out what safi we are talking about is fun when
it is not put into the debugs.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
  • Loading branch information
donaldsharp committed Oct 28, 2024
commit 811168ecc3850a159fc22beaf30e42be63111413
38 changes: 20 additions & 18 deletions zebra/zebra_rib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,8 +1264,15 @@ static void rib_process(struct route_node *rn)
struct zebra_vrf *zvrf = NULL;
struct vrf *vrf;
struct route_entry *proto_re_changed = NULL;

vrf_id_t vrf_id = VRF_UNKNOWN;
safi_t safi = SAFI_UNICAST;

if (IS_ZEBRA_DEBUG_RIB || IS_ZEBRA_DEBUG_RIB_DETAILED) {
struct rib_table_info *info = srcdest_rnode_table_info(rn);

assert(info);
safi = info->safi;
}

assert(rn);

Expand All @@ -1291,9 +1298,8 @@ static void rib_process(struct route_node *rn)
if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
struct route_entry *re = re_list_first(&dest->routes);

zlog_debug("%s(%u:%u):%pRN: Processing rn %p",
VRF_LOGNAME(vrf), vrf_id, re->table, rn,
rn);
zlog_debug("%s(%u:%u:%u):%pRN: Processing rn %p", VRF_LOGNAME(vrf), vrf_id,
re->table, safi, rn, rn);
}

old_fib = dest->selected_fib;
Expand All @@ -1303,15 +1309,12 @@ static void rib_process(struct route_node *rn)
char flags_buf[128];
char status_buf[128];

zlog_debug(
"%s(%u:%u):%pRN: Examine re %p (%s) status: %sflags: %sdist %d metric %d",
VRF_LOGNAME(vrf), vrf_id, re->table, rn, re,
zebra_route_string(re->type),
_dump_re_status(re, status_buf,
sizeof(status_buf)),
zclient_dump_route_flags(re->flags, flags_buf,
sizeof(flags_buf)),
re->distance, re->metric);
zlog_debug("%s(%u:%u:%u):%pRN: Examine re %p (%s) status: %sflags: %sdist %d metric %d",
VRF_LOGNAME(vrf), vrf_id, re->table, safi, rn, re,
zebra_route_string(re->type),
_dump_re_status(re, status_buf, sizeof(status_buf)),
zclient_dump_route_flags(re->flags, flags_buf, sizeof(flags_buf)),
re->distance, re->metric);
}

/* Currently selected re. */
Expand Down Expand Up @@ -1435,11 +1438,10 @@ static void rib_process(struct route_node *rn)
: old_fib ? old_fib
: new_fib ? new_fib : NULL;

zlog_debug(
"%s(%u:%u):%pRN: After processing: old_selected %p new_selected %p old_fib %p new_fib %p",
VRF_LOGNAME(vrf), vrf_id, entry ? entry->table : 0, rn,
(void *)old_selected, (void *)new_selected,
(void *)old_fib, (void *)new_fib);
zlog_debug("%s(%u:%u:%u):%pRN: After processing: old_selected %p new_selected %p old_fib %p new_fib %p",
VRF_LOGNAME(vrf), vrf_id, entry ? entry->table : 0, safi, rn,
(void *)old_selected, (void *)new_selected, (void *)old_fib,
(void *)new_fib);
}

/* Buffer ROUTE_ENTRY_CHANGED here, because it will get cleared if
Expand Down