aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/lisp-cp/control.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2016-06-23 15:01:58 +0200
committerChris Luke <chris_luke@comcast.com>2016-07-04 18:48:50 +0000
commitf727db9e6fb50b2930aedf18bcdda55fe0b96889 (patch)
treeb2aeced07a924e4fdf62716faa6c6cb1b3e56a5a /vnet/vnet/lisp-cp/control.h
parent7d54a3d120207b4a49a01b3b60ff6545499f1cb7 (diff)
LISP CP cleanup and refactoring
- avoid code duplication by using only one function for insertion/updating of remote mappings into map-cache. Static remote mappings are now inserted using this function as well and therefore the code does not try to build forwarding entries out of them now. - bring up lisp dp interfaces when a vni is bound to a vrf. - ensure eids are cleaned-up before parsing control plane messages - ensure map-requests are always sent to default fib - new API to insert lisp adjacencies as opposed to remote mappings which should be replaced post merged in CSIT - reorganize and group functions according to their purpose and use. No need to pre-declare internal functions now. - this does not touch locator-set logic Change-Id: Ibcfc0f2d9c1bc1c9eab6e83c1af1b4cf9302ac10 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'vnet/vnet/lisp-cp/control.h')
-rw-r--r--vnet/vnet/lisp-cp/control.h53
1 files changed, 35 insertions, 18 deletions
diff --git a/vnet/vnet/lisp-cp/control.h b/vnet/vnet/lisp-cp/control.h
index 7cf39783886..4832f4da479 100644
--- a/vnet/vnet/lisp-cp/control.h
+++ b/vnet/vnet/lisp-cp/control.h
@@ -24,7 +24,6 @@ typedef struct
{
gid_address_t src;
gid_address_t dst;
- u32 src_mapping_index;
} pending_map_request_t;
typedef struct
@@ -104,7 +103,7 @@ typedef struct
uword * vni_by_table_id;
/* Number of src prefixes in a vni that use an interface */
- uword * dp_if_refcount_by_vni;
+ uword * dp_intf_by_vni;
/* Proxy ETR map index */
u32 pitr_map_index;
@@ -128,6 +127,11 @@ extern vlib_node_registration_t lisp_cp_lookup_node;
clib_error_t *
lisp_cp_init ();
+always_inline lisp_cp_main_t *
+vnet_lisp_cp_get_main() {
+ return &lisp_control_main;
+}
+
typedef struct
{
u8 is_add;
@@ -150,7 +154,7 @@ vnet_lisp_add_del_locator (vnet_lisp_add_del_locator_set_args_t * a,
typedef struct
{
u8 is_add;
- gid_address_t deid;
+ gid_address_t eid;
u32 locator_set_index;
u32 ttl;
@@ -161,12 +165,31 @@ typedef struct
} vnet_lisp_add_del_mapping_args_t;
int
-vnet_lisp_add_del_mapping (vnet_lisp_add_del_mapping_args_t *a,
+vnet_lisp_map_cache_add_del (vnet_lisp_add_del_mapping_args_t *a,
u32 * map_index);
int
vnet_lisp_add_del_local_mapping (vnet_lisp_add_del_mapping_args_t * a,
u32 * map_index_result);
+int
+vnet_lisp_add_del_mapping (gid_address_t * deid, locator_t * dlocs, u8 action,
+ u8 authoritative, u32 ttl, u8 is_add,
+ u32 * res_map_index);
+
+typedef struct
+{
+ gid_address_t deid;
+ gid_address_t seid;
+ locator_t * locators;
+ u8 action;
+ u8 authoritative;
+ u32 ttl;
+ u8 is_add;
+} vnet_lisp_add_del_adjacency_args_t;
+
+int
+vnet_lisp_add_del_adjacency (vnet_lisp_add_del_adjacency_args_t * a);
+
typedef struct
{
u8 is_add;
@@ -176,18 +199,10 @@ typedef struct
int
vnet_lisp_add_del_map_resolver (vnet_lisp_add_del_map_resolver_args_t * a);
-always_inline lisp_cp_main_t *
-vnet_lisp_cp_get_main() {
- return &lisp_control_main;
-}
-
-clib_error_t * vnet_lisp_enable_disable (u8 is_enabled);
-u8 vnet_lisp_enable_disable_status (void);
-
-int
-vnet_lisp_add_del_remote_mapping (gid_address_t * deid, gid_address_t * seid,
- ip_address_t * dlocs, u8 action, u8 is_add,
- u8 del_all);
+clib_error_t *
+vnet_lisp_enable_disable (u8 is_enabled);
+u8
+vnet_lisp_enable_disable_status (void);
int
vnet_lisp_pitr_set_locator_set (u8 * locator_set_name, u8 is_add);
@@ -201,8 +216,10 @@ typedef struct
int
vnet_lisp_add_del_mreq_itr_rlocs (vnet_lisp_add_del_mreq_itr_rloc_args_t * a);
-int vnet_lisp_clear_all_remote_mappings (void);
+int
+vnet_lisp_clear_all_remote_adjacencies (void);
-int vnet_lisp_eid_table_map (u32 vni, u32 vrf, u8 is_add);
+int
+vnet_lisp_eid_table_map (u32 vni, u32 vrf, u8 is_add);
#endif /* VNET_CONTROL_H_ */