Harmonize vec/pool_get_aligned object sizes and alignment requests
[vpp.git] / src / vnet / fib / mpls_fib.h
index 78a61a1..8d18b00 100644 (file)
 #define MPLS_FIB_KEY_SIZE 21
 #define MPLS_FIB_DB_SIZE (1 << (MPLS_FIB_KEY_SIZE-1))
 
+/**
+ * There are no options for controlling the MPLS flow hash
+ */
+#define MPLS_FLOW_HASH_DEFAULT 0
+
 typedef struct mpls_fib_t_
 {
+  /**
+   * Required for pool_get_aligned
+   */
+  CLIB_CACHE_LINE_ALIGN_MARK(cacheline0);
+
   /**
    * A hash table of entries. 21 bit key
    * Hash table for reduced memory footprint
@@ -54,8 +64,9 @@ mpls_fib_get (fib_node_index_t index)
     return (pool_elt_at_index(mpls_main.mpls_fibs, index));
 }
 
-extern u32 mpls_fib_table_find_or_create_and_lock(u32 table_id);
-extern u32 mpls_fib_table_create_and_lock(void);
+extern u32 mpls_fib_table_find_or_create_and_lock(u32 table_id,
+                                                  fib_source_t src);
+extern u32 mpls_fib_table_create_and_lock(fib_source_t src);
 // extern mpls_fib_t * mpls_fib_find(u32 table_id);
 extern u32 mpls_fib_index_from_table_id(u32 table_id);
 
@@ -99,6 +110,8 @@ extern void mpls_fib_table_walk(mpls_fib_t *fib,
                                 fib_table_walk_fn_t fn,
                                 void *ctx);
 
+extern u8 *format_mpls_fib_table_memory(u8 * s, va_list * args);
+
 /**
  * @brief
  *  Lookup a label and EOS bit in the MPLS_FIB table to retrieve the
@@ -130,6 +143,4 @@ mpls_fib_table_get_index_for_sw_if_index (u32 sw_if_index)
     return (mm->fib_index_by_sw_if_index[sw_if_index]);
 }
 
-extern flow_hash_config_t mpls_fib_table_get_flow_hash_config(u32 fib_index);
-
 #endif