zebra: Add kernel nexthop group support to show zebra

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2022-01-22 07:53:24 -05:00
parent 1a97e35eb8
commit 090ee85656
3 changed files with 12 additions and 1 deletions

View File

@ -3027,11 +3027,12 @@ int netlink_nexthop_read(struct zebra_ns *zns)
* this kernel must support them.
*/
supports_nh = true;
if (IS_ZEBRA_DEBUG_KERNEL || IS_ZEBRA_DEBUG_NHG)
zlog_debug("Nexthop objects %ssupported on this kernel",
supports_nh ? "" : "not ");
zebra_router_set_supports_nhgs(supports_nh);
return ret;
}

View File

@ -209,6 +209,8 @@ struct zebra_router {
*/
bool asic_offloaded;
bool notify_on_ack;
bool supports_nhgs;
};
#define GRACEFUL_RESTART_TIME 60
@ -256,6 +258,11 @@ extern enum multicast_mode multicast_mode_ipv4_get(void);
extern bool zebra_router_notify_on_ack(void);
static inline void zebra_router_set_supports_nhgs(bool support)
{
zrouter.supports_nhgs = support;
}
/* zebra_northbound.c */
extern const struct frr_yang_module_info frr_zebra_info;

View File

@ -3991,6 +3991,9 @@ DEFUN (show_zebra,
else
vty_out(vty, "Asic offload is not being used\n");
vty_out(vty, "Kernel %ssupport Nexthop Groups\n",
zrouter.supports_nhgs ? "does " : "does not ");
vty_out(vty,
" Route Route Neighbor LSP LSP\n");
vty_out(vty,