summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_entry_src_adj.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-04-06 04:41:02 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2018-01-18 14:37:24 +0000
commit89541992000433b743cbbe8cb396faab42bcf6ae (patch)
tree2b09b2178270ad6de191e2eeaa5d3f49148d5a8e /src/vnet/fib/fib_entry_src_adj.c
parentbf246dff1b4ea0792c0083f7e5495930b3b225f7 (diff)
FIB Inherited Srouce
forwarding provided by the source is pushed to all other entries it covers in the sub-tree Change-Id: I2a45222ef653358f55c2436de3e3c6353cfadba2 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/fib/fib_entry_src_adj.c')
-rw-r--r--src/vnet/fib/fib_entry_src_adj.c29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/vnet/fib/fib_entry_src_adj.c b/src/vnet/fib/fib_entry_src_adj.c
index 9ea2b17e6b9..04c5c8dc1f7 100644
--- a/src/vnet/fib/fib_entry_src_adj.c
+++ b/src/vnet/fib/fib_entry_src_adj.c
@@ -201,10 +201,6 @@ fib_entry_src_adj_path_list_walk (fib_node_index_t pl_index,
return (FIB_PATH_LIST_WALK_CONTINUE);
}
-/*
- * Source activate.
- * Called when the source is the new longer best source on the entry
- */
static int
fib_entry_src_adj_activate (fib_entry_src_t *src,
const fib_entry_t *fib_entry)
@@ -262,6 +258,28 @@ fib_entry_src_adj_activate (fib_entry_src_t *src,
}
/*
+ * Source re-activate.
+ * Called when the source path lit has changed and the source is still
+ * the best source
+ */
+static int
+fib_entry_src_adj_reactivate (fib_entry_src_t *src,
+ const fib_entry_t *fib_entry)
+{
+ fib_entry_src_path_list_walk_cxt_t ctx = {
+ .cover_itf = fib_entry_get_resolving_interface(src->adj.fesa_cover),
+ .flags = FIB_PATH_EXT_ADJ_FLAG_NONE,
+ .src = src,
+ };
+
+ fib_path_list_walk(src->fes_pl,
+ fib_entry_src_adj_path_list_walk,
+ &ctx);
+
+ return (FIB_PATH_EXT_ADJ_FLAG_REFINES_COVER & ctx.flags);
+}
+
+/*
* Source Deactivate.
* Called when the source is no longer best source on the entry
*/
@@ -291,7 +309,7 @@ static u8*
fib_entry_src_adj_format (fib_entry_src_t *src,
u8* s)
{
- return (format(s, "cover:%d", src->adj.fesa_cover));
+ return (format(s, " cover:%d", src->adj.fesa_cover));
}
static void
@@ -368,6 +386,7 @@ const static fib_entry_src_vft_t adj_src_vft = {
.fesv_remove = fib_entry_src_adj_remove,
.fesv_activate = fib_entry_src_adj_activate,
.fesv_deactivate = fib_entry_src_adj_deactivate,
+ .fesv_reactivate = fib_entry_src_adj_reactivate,
.fesv_format = fib_entry_src_adj_format,
.fesv_installed = fib_entry_src_adj_installed,
.fesv_cover_change = fib_entry_src_adj_cover_change,