]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Add basic knowledge of asic offload available
authorDonald Sharp <sharpd@nvidia.com>
Fri, 18 Sep 2020 19:41:19 +0000 (15:41 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 22 Sep 2020 19:57:43 +0000 (15:57 -0400)
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>
zebra/zebra_router.c
zebra/zebra_router.h
zebra/zebra_vty.c

index 66f2924555a2d4fc22ed032852358ac7a9c9c184..fc4390f7f84479dc9d178e51838bb9406a1d55ed 100644 (file)
@@ -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;
 }
index f73a8f2d59f6272aae95e787b904c67ca745732f..67f94bfcfeb5bc7f9e395937b81b607acbd48d5d 100644 (file)
@@ -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
index b6d0b26125cb00f732efa1add1bb53e7cc63c61b..3c360901b3ae519ce38c0a5a4a514e7ff56be512 100644 (file)
@@ -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,