X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip6.h;h=ab17f662198702f5bc2c588c20dd973cbef9f18e;hb=ae8098350cb7b96f7495fa4d4180238064256e14;hp=6e0cfff5164df59b64d88d39d5b7c8faa3092055;hpb=7e70ff52c18e62f4fdef1f63dea4edd64bcf9c76;p=vpp.git diff --git a/src/vnet/ip/ip6.h b/src/vnet/ip/ip6.h index 6e0cfff5164..ab17f662198 100644 --- a/src/vnet/ip/ip6.h +++ b/src/vnet/ip/ip6.h @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -78,17 +79,14 @@ typedef struct typedef struct ip6_mfib_t { + /* required for pool_get_aligned. */ + CLIB_CACHE_LINE_ALIGN_MARK (cacheline0); + /* 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; @@ -143,7 +141,7 @@ typedef enum ip6_fib_table_instance_type_t_ typedef struct ip6_fib_table_instance_t_ { /* The hash table */ - BVT (clib_bihash) ip6_hash; + clib_bihash_24_8_t ip6_hash; /* bitmap / refcounts / vector of mask widths to search */ uword *non_empty_dst_address_length_bitmap; @@ -151,6 +149,20 @@ typedef struct ip6_fib_table_instance_t_ i32 dst_address_length_refcounts[129]; } ip6_fib_table_instance_t; +/** + * A represenation of a single IP6 mfib table + */ +typedef struct ip6_mfib_table_instance_t_ +{ + /* The hash table */ + clib_bihash_40_8_t ip6_mhash; + + /* bitmap / refcounts / vector of mask widths to search */ + uword *non_empty_dst_address_length_bitmap; + u16 *prefix_lengths_in_search_order; + i32 dst_address_length_refcounts[257]; +} ip6_mfib_table_instance_t; + typedef struct ip6_main_t { /** @@ -158,6 +170,11 @@ typedef struct ip6_main_t */ ip6_fib_table_instance_t ip6_table[IP6_FIB_NUM_TABLES]; + /** + * the single MFIB table + */ + ip6_mfib_table_instance_t ip6_mtable; + ip_lookup_main_t lookup_main; /* Pool of FIBs. */