aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-cp/gid_dictionary.h
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2017-05-30 07:14:46 +0200
committerFlorin Coras <fcoras@cisco.com>2017-06-08 11:05:35 -0700
commitef2a5bf0a31c9c0a94f9f497cb6353f46073e6ec (patch)
tree6ff449ec8a07d33ad210c147fc3f6d4e19e17a38 /src/vnet/lisp-cp/gid_dictionary.h
parent5e8527603fed5e43a8d632857c063c5fdf36d317 (diff)
LISP: add NSH support
Change-Id: I971c110ed126f1a24a963f9d3b88cf8f8c308816 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/lisp-cp/gid_dictionary.h')
-rw-r--r--src/vnet/lisp-cp/gid_dictionary.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/vnet/lisp-cp/gid_dictionary.h b/src/vnet/lisp-cp/gid_dictionary.h
index 9612fb133fd..51806bd67f8 100644
--- a/src/vnet/lisp-cp/gid_dictionary.h
+++ b/src/vnet/lisp-cp/gid_dictionary.h
@@ -40,6 +40,10 @@
#define ARP_LOOKUP_DEFAULT_HASH_NUM_BUCKETS (64 * 1024)
#define ARP_LOOKUP_DEFAULT_HASH_MEMORY_SIZE (32<<20)
+/* Default size of the NSH hash table */
+#define NSH_LOOKUP_DEFAULT_HASH_NUM_BUCKETS (64 * 1024)
+#define NSH_LOOKUP_DEFAULT_HASH_MEMORY_SIZE (32<<20)
+
typedef void (*foreach_subprefix_match_cb_t) (u32, void *);
typedef struct
@@ -84,6 +88,16 @@ typedef struct gid_mac_table
u64 count;
} gid_mac_table_t;
+typedef struct gid_nsh_table
+{
+ BVT (clib_bihash) nsh_lookup_table;
+
+ /* nsh lookup table config parameters */
+ u32 nsh_lookup_table_nbuckets;
+ uword nsh_lookup_table_size;
+ u64 count;
+} gid_nsh_table_t;
+
typedef struct
{
BVT (clib_bihash) arp_lookup_table;
@@ -97,6 +111,9 @@ typedef struct
/** L2 ARP table */
gid_l2_arp_table_t arp_table;
+ /** NSH lookup table */
+ gid_nsh_table_t nsh_table;
+
/** destination IP LPM ip4 lookup table */
gid_ip4_table_t dst_ip4_table;