X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fdpo%2Flookup_dpo.h;h=4ebd6050fc6bdbe02a5eb63213988a664e6addef;hb=054c03ac9c20a5e38121590b83f01fd91f82acf0;hp=ff2833888682ee31185104123ddb09b1730ec48b;hpb=7cd468a3d7dee7d6c92f69a0bb7061ae208ec727;p=vpp.git diff --git a/src/vnet/dpo/lookup_dpo.h b/src/vnet/dpo/lookup_dpo.h index ff283388868..4ebd6050fc6 100644 --- a/src/vnet/dpo/lookup_dpo.h +++ b/src/vnet/dpo/lookup_dpo.h @@ -42,8 +42,21 @@ typedef enum lookup_table_t_ { } __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", \ } /** @@ -73,6 +86,11 @@ typedef struct lookup_dpo_t */ lookup_table_t lkd_table; + /** + * Unicast of rmulticast FIB lookup + */ + lookup_cast_t lkd_cast; + /** * Number of locks */ @@ -81,11 +99,13 @@ typedef struct lookup_dpo_t 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);