Skip to content

Commit

Permalink
zebra: add 'show debugging route-notification' command
Browse files Browse the repository at this point in the history
There is no information on how the route notification are
sent to the control plane daemons.
Add a vty command that dumps how many route notifications
are processed, and how many batches messages are sent.

Signed-off-by: Philippe Guibert <[email protected]>
  • Loading branch information
pguibert6WIND committed May 31, 2024
1 parent c881f45 commit 8ae2b73
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions zebra/rib.h
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ extern void
zebra_route_notify_job_owner_list_enqueue(struct route_node *rn,
const struct zebra_dplane_ctx *ctx,
enum zapi_route_notify_owner note);
extern void zebra_route_notification_information_display(struct vty *vty);

extern pid_t pid;

Expand Down
12 changes: 12 additions & 0 deletions zebra/zebra_rib.c
Original file line number Diff line number Diff line change
Expand Up @@ -5319,3 +5319,15 @@ struct route_table *rib_tables_iter_next(rib_tables_iter_t *iter)

return table;
}

void zebra_route_notification_information_display(struct vty *vty)
{
vty_out(vty,
"Route notify owner list count %u, processed %u, max per batch %u\n",
zebra_route_notify_job_owner_list_num,
zebra_route_notify_job_owner_list_processed,
zebra_route_notify_job_owner_list_max_batch);
vty_out(vty, "Process Notify Client list count %u, processed %u\n",
zebra_process_notify_client_list_num,
zebra_process_notify_client_list_processed);
}
13 changes: 13 additions & 0 deletions zebra/zebra_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -4152,6 +4152,18 @@ DEFUN (zebra_show_routing_tables_summary,
return CMD_SUCCESS;
}

/* Display route notification information */
DEFUN(show_debugging_route_notification,
show_debugging_route_notification_cmd,
"show debugging route-notification",
SHOW_STR
DEBUG_STR
"Display route notification information\n")
{
zebra_route_notification_information_display(vty);
return CMD_SUCCESS;
}

/* Table configuration write function. */
static int config_write_table(struct vty *vty)
{
Expand Down Expand Up @@ -4475,4 +4487,5 @@ void zebra_vty_init(void)
#endif /* HAVE_SCRIPTING */

install_element(VIEW_NODE, &zebra_show_routing_tables_summary_cmd);
install_element(VIEW_NODE, &show_debugging_route_notification_cmd);
}

0 comments on commit 8ae2b73

Please sign in to comment.