aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_entry.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-04-25 01:41:24 -0700
committerDave Barach <openvpp@barachs.net>2018-04-30 15:03:40 +0000
commit56f949b9d3d1c3ba6816169fff852a51bbe47a15 (patch)
treeadffd84ca4c3c3c7932a61b564df3a42c6969902 /src/vnet/fib/fib_entry.c
parent404d85acf829fb03be76cc0dc007a9c03ebe09dc (diff)
FIB: elide cover walk for insert of host route
Change-Id: I2d39e56ff605e3a24927d6330d65d0406f588381 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/fib/fib_entry.c')
-rw-r--r--src/vnet/fib/fib_entry.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vnet/fib/fib_entry.c b/src/vnet/fib/fib_entry.c
index cd1300dee39..a12edcb1867 100644
--- a/src/vnet/fib/fib_entry.c
+++ b/src/vnet/fib/fib_entry.c
@@ -1428,6 +1428,19 @@ fib_entry_get_best_source (fib_node_index_t entry_index)
}
/**
+ * Return !0 is the entry represents a host prefix
+ */
+int
+fib_entry_is_host (fib_node_index_t fib_entry_index)
+{
+ fib_prefix_t pfx;
+
+ fib_entry_get_prefix(fib_entry_index, &pfx);
+
+ return (fib_prefix_is_host(&pfx));
+}
+
+/**
* Return !0 is the entry is reoslved, i.e. will return a valid forwarding
* chain
*/