diff options
author | Florin Coras <fcoras@cisco.com> | 2016-09-14 16:01:38 +0200 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-09-27 08:11:19 +0000 |
commit | dca880446eccf8426eebf52c38ae3215f0a92e54 (patch) | |
tree | 1ae3f3f4c0d0e045930a75753b4bc73437839ad4 /vnet/vnet/lisp-cp/gid_dictionary.h | |
parent | 62a28716d872f1eaeecffd3a0c868943dec32814 (diff) |
LISP Source/Dest control plane support, VPP-197
Change-Id: If88e4161e0944b657e6183b7b44348f7f46ba0a8
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'vnet/vnet/lisp-cp/gid_dictionary.h')
-rw-r--r-- | vnet/vnet/lisp-cp/gid_dictionary.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/vnet/vnet/lisp-cp/gid_dictionary.h b/vnet/vnet/lisp-cp/gid_dictionary.h index d9a857fbaac..6544cca1b18 100644 --- a/vnet/vnet/lisp-cp/gid_dictionary.h +++ b/vnet/vnet/lisp-cp/gid_dictionary.h @@ -48,8 +48,11 @@ typedef struct /* ip4 lookup table config parameters */ u32 ip4_lookup_table_nbuckets; uword ip4_lookup_table_size; +} gid_ip4_table_t; - BVT (clib_bihash) ip6_lookup_table; +typedef struct +{ + BVT (clib_bihash) ip6_lookup_table; /* bitmap/vector of mask widths to search */ uword *ip6_non_empty_dst_address_length_bitmap; @@ -60,12 +63,33 @@ typedef struct /* ip6 lookup table config parameters */ u32 ip6_lookup_table_nbuckets; uword ip6_lookup_table_size; +} gid_ip6_table_t; - BVT (clib_bihash) mac_lookup_table; +typedef struct gid_mac_table +{ + BVT (clib_bihash) mac_lookup_table; /* mac lookup table config parameters */ u32 mac_lookup_table_nbuckets; uword mac_lookup_table_size; +} gid_mac_table_t; + +typedef struct +{ + /** destination IP LPM ip4 lookup table */ + gid_ip4_table_t dst_ip4_table; + + /** pool of source IP LPM ip4 lookup tables */ + gid_ip4_table_t *src_ip4_table_pool; + + /** destination IP LPM ip6 lookup table */ + gid_ip6_table_t dst_ip6_table; + + /** pool of source IP LPM ip6 lookup tables */ + gid_ip6_table_t *src_ip6_table_pool; + + /** flat source/dest mac lookup table */ + gid_mac_table_t sd_mac_table; } gid_dictionary_t; @@ -74,6 +98,8 @@ gid_dictionary_add_del (gid_dictionary_t * db, gid_address_t * key, u32 value, u8 is_add); u32 gid_dictionary_lookup (gid_dictionary_t * db, gid_address_t * key); +u32 gid_dictionary_sd_lookup (gid_dictionary_t * db, gid_address_t * dst, + gid_address_t * src); void gid_dictionary_init (gid_dictionary_t * db); |