summaryrefslogtreecommitdiffstats
path: root/src/vnet/adj/adj.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-03-23 06:46:01 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-29 13:00:52 +0000
commit04a75e3230ab71248fc29a56b9f64bdaee0c17ac (patch)
tree85977ecfdf1c4002451cbbcf075694ae1ba1173c /src/vnet/adj/adj.c
parent9a69a6095f67b8979a02f128f44e449889454273 (diff)
Mtrie optimisations
1 - make the default route non-special, i.e. like any other less specific route. Consequently, all buckets have a valid valid index of either a leaf or a ply. Checks for special indeices in the data-path can thus be removed. 2 - since all leaves are now 'real' i.e. they represent a real load-balance object, to tell if a ply slot is 'empty' requeirs chekcing that the prefix length of the leaf occupying the slot is slot than the minium value for that ply. 3 - when removing a leaf find the cover first, then recurse down the ply and replace the old leaf with the cover. This saves us a ply walk. Change-Id: Idd523019e8bb1b6ef527b1f5279a5e24bcf18332 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/adj/adj.c')
-rw-r--r--src/vnet/adj/adj.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c
index 9a01e89d660..c1d036a0e8b 100644
--- a/src/vnet/adj/adj.c
+++ b/src/vnet/adj/adj.c
@@ -20,13 +20,6 @@
#include <vnet/adj/adj_mcast.h>
#include <vnet/fib/fib_node_list.h>
-/*
- * Special Adj with index zero. we need to define this since the v4 mtrie
- * assumes an index of 0 implies the ply is empty. therefore all 'real'
- * adjs need a non-zero index.
- */
-static ip_adjacency_t *special_v4_miss_adj_with_index_zero;
-
/* Adjacency packet/byte counters indexed by adjacency index. */
vlib_combined_counter_main_t adjacency_counters;
@@ -426,11 +419,6 @@ adj_module_init (vlib_main_t * vm)
adj_midchain_module_init();
adj_mcast_module_init();
- /*
- * one special adj to reserve index 0
- */
- special_v4_miss_adj_with_index_zero = adj_alloc(FIB_PROTOCOL_IP4);
-
return (NULL);
}