diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2020-09-18 15:41:19 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2020-09-22 15:57:43 -0400 |
| commit | 4c56ce1cead5f6514ea2af34f0b7a07c35746520 (patch) | |
| tree | ebe234f44fa0b766381b7a61d807be393a647931 | |
| parent | 6da3af60a2969385513d6a66dbff1434e46065d0 (diff) | |
zebra: Add basic knowledge of asic offload available
Some linux kernels are starting to support the idea of knowledge
about the underlying asic. Add a boolean that we can set/unset
to track whether or not we think the router has this functionality
available.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| -rw-r--r-- | zebra/zebra_router.c | 2 | ||||
| -rw-r--r-- | zebra/zebra_router.h | 5 | ||||
| -rw-r--r-- | zebra/zebra_vty.c | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c index 66f2924555..fc4390f7f8 100644 --- a/zebra/zebra_router.c +++ b/zebra/zebra_router.c @@ -290,4 +290,6 @@ void zebra_router_init(void) zrouter.nhgs_id = hash_create_size(8, zebra_nhg_id_key, zebra_nhg_hash_id_equal, "Zebra Router Nexthop Groups ID index"); + + zrouter.asic_offloaded = false; } diff --git a/zebra/zebra_router.h b/zebra/zebra_router.h index f73a8f2d59..67f94bfcfe 100644 --- a/zebra/zebra_router.h +++ b/zebra/zebra_router.h @@ -182,6 +182,11 @@ struct zebra_router { */ struct hash *nhgs; struct hash *nhgs_id; + + /* + * Does the underlying system provide an asic offload + */ + bool asic_offloaded; }; #define GRACEFUL_RESTART_TIME 60 diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index b6d0b26125..3c360901b3 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -3414,6 +3414,9 @@ DEFUN (show_zebra, { struct vrf *vrf; + if (zrouter.asic_offloaded) + vty_out(vty, "Asic Offload is being used\n"); + vty_out(vty, " Route Route Neighbor LSP LSP\n"); vty_out(vty, |
