summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_table.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_table.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_table.c')
-rw-r--r--src/vnet/fib/fib_table.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/vnet/fib/fib_table.c b/src/vnet/fib/fib_table.c
index d0bc33639b9..c37ac1dbd49 100644
--- a/src/vnet/fib/fib_table.c
+++ b/src/vnet/fib/fib_table.c
@@ -197,10 +197,18 @@ fib_table_post_insert_actions (fib_table_t *fib_table,
/*
* inform the covering entry that a new more specific
- * has been inserted beneath it
+ * has been inserted beneath it.
+ * If the prefix that has been inserted is a host route
+ * then it is not possible that it will be the cover for any
+ * other entry, so we can elide the walk. This is particularly
+ * beneficial since there are often many host entries sharing the
+ * same cover (i.e. ADJ or RR sourced entries).
*/
- fib_entry_cover_change_notify(fib_entry_cover_index,
- fib_entry_index);
+ if (!fib_entry_is_host(fib_entry_index))
+ {
+ fib_entry_cover_change_notify(fib_entry_cover_index,
+ fib_entry_index);
+ }
}
}