summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_table.h
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-02-24 02:11:19 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2018-03-05 18:41:12 +0000
commit53da221b13225695516ec7469ca29d82bb10e594 (patch)
tree10f31c7fd4acd536cef4793b5c542938da7f09dc /src/vnet/fib/fib_table.h
parent0e7fe4fddb493350cf78c8126e9cc93d55490c42 (diff)
IP6 link-local table
- IPv6 link local table is a per-SW interface array of IPv6 unicast FIBs - the per-interface ocst is sizeof(fib_table_t) which is small, w.r.t. the cost of an interface - FE80::/10 in the 'global' table points to a DPO that performs a lookup in the input interface's LL fib. Change-Id: Ice834b25ebeeacb2e929d7c864d7ec8c09918cbe Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet/fib/fib_table.h')
-rw-r--r--src/vnet/fib/fib_table.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/vnet/fib/fib_table.h b/src/vnet/fib/fib_table.h
index 14ac7054059..ddc00e537c2 100644
--- a/src/vnet/fib/fib_table.h
+++ b/src/vnet/fib/fib_table.h
@@ -29,6 +29,40 @@
#define FIB_TABLE_TOTAL_LOCKS FIB_SOURCE_MAX
/**
+ * Flags for the source data
+ */
+typedef enum fib_table_attribute_t_ {
+ /**
+ * Marker. Add new values after this one.
+ */
+ FIB_TABLE_ATTRIBUTE_FIRST,
+ /**
+ * the table is for IP6 link local addresses
+ */
+ FIB_TABLE_ATTRIBUTE_IP6_LL = FIB_TABLE_ATTRIBUTE_FIRST,
+ /**
+ * Marker. add new entries before this one.
+ */
+ FIB_TABLE_ATTRIBUTE_LAST = FIB_TABLE_ATTRIBUTE_IP6_LL,
+} fib_table_attribute_t;
+
+#define FIB_TABLE_ATTRIBUTE_MAX (FIB_TABLE_ATTRIBUTE_LAST+1)
+
+#define FIB_TABLE_ATTRIBUTES { \
+ [FIB_TABLE_ATTRIBUTE_IP6_LL] = "ip6-ll", \
+}
+
+#define FOR_EACH_FIB_TABLE_ATTRIBUTE(_item) \
+ for (_item = FIB_TABLE_ATTRIBUTE_FIRST; \
+ _item < FIB_TABLE_ATTRIBUTE_MAX; \
+ _item++)
+
+typedef enum fib_table_flags_t_ {
+ FIB_TABLE_FLAG_NONE = 0,
+ FIB_TABLE_FLAG_IP6_LL = (1 << FIB_TABLE_ATTRIBUTE_IP6_LL),
+} __attribute__ ((packed)) fib_table_flags_t;
+
+/**
* @brief
* A protocol Independent FIB table
*/
@@ -40,6 +74,11 @@ typedef struct fib_table_t_
fib_protocol_t ft_proto;
/**
+ * Table flags
+ */
+ fib_table_flags_t ft_flags;
+
+ /**
* per-source number of locks on the table
*/
u16 ft_locks[FIB_TABLE_N_LOCKS];