} __attribute__ ((packed)) lookup_table_t;
#define LOOKUP_TABLES { \
- [LOOKUP_INPUT_SRC_ADDR] = "table-input-interface", \
- [LOOKUP_INPUT_DST_ADDR] = "table-configured", \
+ [LOOKUP_TABLE_FROM_INPUT_INTERFACE] = "table-input-interface", \
+ [LOOKUP_TABLE_FROM_CONFIG] = "table-configured", \
+}
+
+/**
+ * Switch to use the packet's source or destination address for lookup
+ */
+typedef enum lookup_cast_t_ {
+ LOOKUP_UNICAST,
+ LOOKUP_MULTICAST,
+} __attribute__ ((packed)) lookup_cast_t;
+
+#define LOOKUP_CASTS { \
+ [LOOKUP_UNICAST] = "unicast", \
+ [LOOKUP_MULTICAST] = "multicast", \
}
/**
*/
typedef struct lookup_dpo_t
{
+ /**
+ * required for pool_get_aligned.
+ * memebers used in the switch path come first!
+ */
+ CLIB_CACHE_LINE_ALIGN_MARK(cacheline0);
+
/**
* The FIB, or interface from which to get a FIB, in which to perform
* the next lookup;
*/
lookup_table_t lkd_table;
+ /**
+ * Unicast of rmulticast FIB lookup
+ */
+ lookup_cast_t lkd_cast;
+
/**
* Number of locks
*/
extern void lookup_dpo_add_or_lock_w_fib_index(fib_node_index_t fib_index,
dpo_proto_t proto,
+ lookup_cast_t cast,
lookup_input_t input,
lookup_table_t table,
dpo_id_t *dpo);
extern void lookup_dpo_add_or_lock_w_table_id(u32 table_id,
dpo_proto_t proto,
+ lookup_cast_t cast,
lookup_input_t input,
lookup_table_t table,
dpo_id_t *dpo);