summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/ip/lookup.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2016-12-07 15:38:14 +0000
committerDamjan Marion <dmarion.lists@gmail.com>2016-12-07 17:17:30 +0000
commit19c68d2a02770189d32ead3ff964efc073db630a (patch)
tree3a985d73e731c776b76dc72c28c5d38865c9b848 /vnet/vnet/ip/lookup.h
parent9677a944d5188f10188657bf627301b239fe1da7 (diff)
Prevent re-entrant walks on an adjacency.
The re-entrant walks were caused when the walk from an IP adj updated a fib_netry with an MPLS adj which in turn triggers a walk of the IP adj. Re-entrant walks do unnecessary work. also fixed a walk merge issue where the encountered walk should only be checked for equivalence woth the most recent alk, not any in the list. Otherwise an UO,DOWN,UP beceoms (2*)UP,DOWN Change-Id: Ib8b27f055dc6c1366d33740276d1c26cd314220a Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'vnet/vnet/ip/lookup.h')
-rw-r--r--vnet/vnet/ip/lookup.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/vnet/vnet/ip/lookup.h b/vnet/vnet/ip/lookup.h
index a609e2fe7c0..4b6aaa10da9 100644
--- a/vnet/vnet/ip/lookup.h
+++ b/vnet/vnet/ip/lookup.h
@@ -168,6 +168,17 @@ typedef void (*adj_midchain_fixup_t)(vlib_main_t * vm,
struct ip_adjacency_t_ *adj,
vlib_buffer_t * b0);
+/**
+ * @brief Flags on an IP adjacency
+ */
+typedef enum ip_adjacency_flags_t_
+{
+ /**
+ * Currently a sync walk is active. Used to prevent re-entrant walking
+ */
+ IP_ADJ_SYNC_WALK_ACTIVE = (1 << 0),
+} ip_adjacency_flags_t;
+
/** @brief IP unicast adjacency.
@note cache aligned.
*/
@@ -254,6 +265,12 @@ typedef struct ip_adjacency_t_ {
* remaining cachelines
*/
fib_node_t ia_node;
+
+ /**
+ * Flags on the adjacency
+ */
+ ip_adjacency_flags_t ia_flags;
+
} ip_adjacency_t;
STATIC_ASSERT((STRUCT_OFFSET_OF(ip_adjacency_t, cacheline0) == 0),