X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip6.h;h=6fecd42dc61e883caecc0db71dbfab17f5fac167;hb=32e1c010b0c34fd0984f7fc45fae648a182025c5;hp=f493db017ecc6fa020b602a05c9f3ef76532bc0f;hpb=6f692d6e5a8ffc920a728372ef773199bc5466c0;p=vpp.git diff --git a/src/vnet/ip/ip6.h b/src/vnet/ip/ip6.h index f493db017ec..6fecd42dc61 100644 --- a/src/vnet/ip/ip6.h +++ b/src/vnet/ip/ip6.h @@ -49,6 +49,7 @@ #include #include #include +#include /* * Default size of the ip6 fib hash table @@ -75,6 +76,21 @@ typedef struct flow_hash_config_t flow_hash_config; } ip6_fib_t; +typedef struct ip6_mfib_t +{ + /* Table ID (hash key) for this FIB. */ + u32 table_id; + + /* Index into FIB vector. */ + u32 index; + + /* + * Pointer to the top of a radix tree. + * This cannot be realloc'd, hence it cannot be inlined with this table + */ + struct radix_node_head *rhead; +} ip6_mfib_t; + struct ip6_main_t; typedef void (ip6_add_del_interface_address_function_t) @@ -137,12 +153,18 @@ typedef struct ip6_main_t /* Pool of FIBs. */ struct fib_table_t_ *fibs; + /** Vector of MFIBs. */ + struct mfib_table_t_ *mfibs; + /* Network byte orders subnet mask for each prefix length */ ip6_address_t fib_masks[129]; /* Table index indexed by software interface. */ u32 *fib_index_by_sw_if_index; + /** Table index indexed by software interface. */ + u32 *mfib_index_by_sw_if_index; + /* IP6 enabled count by software interface */ u8 *ip_enabled_by_sw_if_index; @@ -150,6 +172,10 @@ typedef struct ip6_main_t ID space is not necessarily dense; index space is dense. */ uword *fib_index_by_table_id; + /** Hash table mapping table id to multicast fib index. + ID space is not necessarily dense; index space is dense. */ + uword *mfib_index_by_table_id; + /* Hash table mapping interface rewrite adjacency index by sw if index. */ uword *interface_route_adj_index_by_sw_if_index; @@ -185,6 +211,7 @@ extern ip6_main_t ip6_main; /* Global ip6 input node. Errors get attached to ip6 input node. */ extern vlib_node_registration_t ip6_input_node; extern vlib_node_registration_t ip6_rewrite_node; +extern vlib_node_registration_t ip6_rewrite_mcast_node; extern vlib_node_registration_t ip6_rewrite_local_node; extern vlib_node_registration_t ip6_discover_neighbor_node; extern vlib_node_registration_t ip6_glean_node;