summaryrefslogtreecommitdiffstats
path: root/src/vnet/map/map.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-02-20 18:23:41 -0800
committerOle Trøan <otroan@employees.org>2017-03-09 13:24:11 +0000
commit8082380922c65702251d5242058f7b5f35011574 (patch)
tree5cc74ecd11ef619c4e1f6cfaf769c1d9fb3fed5f /src/vnet/map/map.h
parent37be73693a46b05360483778efee3313a71654f5 (diff)
MAP pre-resolve - use FIB to track pre-resolved next-hop
Change-Id: I9ea16881caf7aee57f0daf4ac2e8b82c672f87e9 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/map/map.h')
-rw-r--r--src/vnet/map/map.h41
1 files changed, 34 insertions, 7 deletions
diff --git a/src/vnet/map/map.h b/src/vnet/map/map.h
index f446b739a93..616d42c027a 100644
--- a/src/vnet/map/map.h
+++ b/src/vnet/map/map.h
@@ -198,6 +198,40 @@ typedef struct {
map_ip6_fragment_t fragments[MAP_IP6_REASS_MAX_FRAGMENTS_PER_REASSEMBLY];
} map_ip6_reass_t;
+#ifdef MAP_SKIP_IP6_LOOKUP
+/**
+ * A pre-resolved next-hop
+ */
+typedef struct map_main_pre_resolved_t_
+{
+ /**
+ * Linkage into the FIB graph
+ */
+ fib_node_t node;
+
+ /**
+ * The FIB entry index of the next-hop
+ */
+ fib_node_index_t fei;
+
+ /**
+ * This object sibling index on the FIB entry's child dependency list
+ */
+ u32 sibling;
+
+ /**
+ * The Load-balance object index to use to forward
+ */
+ dpo_id_t dpo;
+} map_main_pre_resolved_t;
+
+/**
+ * Pre-resolved next hops for v4 and v6. Why these are global and not
+ * per-domain is beyond me.
+ */
+extern map_main_pre_resolved_t pre_resolved[FIB_PROTOCOL_MAX];
+#endif
+
typedef struct {
/* pool of MAP domains */
map_domain_t *domains;
@@ -207,13 +241,6 @@ typedef struct {
vlib_combined_counter_main_t *domain_counters;
volatile u32 *counter_lock;
-#ifdef MAP_SKIP_IP6_LOOKUP
- /* pre-presolve */
- u32 adj6_index, adj4_index;
- ip4_address_t preresolve_ip4;
- ip6_address_t preresolve_ip6;
-#endif
-
/* Traffic class: zero, copy (~0) or fixed value */
u8 tc;
bool tc_copy;