aboutsummaryrefslogtreecommitdiffstats
path: root/vpp
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2016-04-21 00:45:40 +0200
committerDave Barach <openvpp@barachs.net>2016-04-25 13:05:49 +0000
commit577c3553dd6939e998c78c5a389750aac3a67f8b (patch)
tree3a95da61f5cfca2d1629a8011d2a6b57ae19bad2 /vpp
parent405e41b50e336dccfdeeafae93bf4453774ecfec (diff)
Convert lisp-gpe encap to interface tx node
With this change, one lisp-gpe interface is created per vrf/overlay tenant and its tx node is used as encapsulator (or tunnel ingress). For all intents and purposes, the tx node inherits all functions previously performed by the lisp-gpe-encap node and it maintains said node's position in lisp-gpe's data-path graph. Chiefly, this opens the possibility to chain interface features, like IPSec, transparently with LISP. Furthermore, it brings basic data plane support for vrfs and LISP instance-ids (or virtual network instances as per RFC7364). Other changes include improvements to lisp-gpe enable and disable sequences and corresponding API/VAT fixes. Change-Id: I085500450660a976b587b1a720e282f6e728d580 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'vpp')
-rw-r--r--vpp/api/api.c23
-rw-r--r--vpp/api/vpe.api22
2 files changed, 42 insertions, 3 deletions
diff --git a/vpp/api/api.c b/vpp/api/api.c
index 4956a43a297..ea766938b34 100644
--- a/vpp/api/api.c
+++ b/vpp/api/api.c
@@ -321,6 +321,7 @@ _(LISP_ADD_DEL_LOCATOR, lisp_add_del_locator) \
_(LISP_ADD_DEL_LOCAL_EID, lisp_add_del_local_eid) \
_(LISP_GPE_ADD_DEL_FWD_ENTRY, lisp_gpe_add_del_fwd_entry) \
_(LISP_ADD_DEL_MAP_RESOLVER, lisp_add_del_map_resolver) \
+_(LISP_GPE_ENABLE_DISABLE, lisp_gpe_enable_disable) \
_(LISP_GPE_ADD_DEL_IFACE, lisp_gpe_add_del_iface) \
_(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump) \
_(LISP_LOCAL_EID_TABLE_DUMP, lisp_local_eid_table_dump) \
@@ -4465,7 +4466,7 @@ vl_api_lisp_gpe_add_del_tunnel_t_handler
a->ver_res = mp->ver_res;
a->res = mp->res;
a->next_protocol = mp->next_protocol;
- a->iid = clib_net_to_host_u32 (mp->iid);
+ a->vni = clib_net_to_host_u32 (mp->iid);
rv = vnet_lisp_gpe_add_del_tunnel (a, &sw_if_index);
@@ -4580,7 +4581,7 @@ vl_api_lisp_add_del_local_eid_t_handler(
a->locator_set_index = locator_set_index;
a->local = 1;
- rv = vnet_lisp_add_del_mapping(a, &map_index);
+ rv = vnet_lisp_add_del_local_mapping(a, &map_index);
out:
vec_free(name);
@@ -4684,6 +4685,20 @@ vl_api_lisp_add_del_map_resolver_t_handler(
}
static void
+vl_api_lisp_gpe_enable_disable_t_handler(
+ vl_api_lisp_gpe_enable_disable_t *mp)
+{
+ vl_api_lisp_gpe_enable_disable_reply_t *rmp;
+ int rv = 0;
+ vnet_lisp_gpe_enable_disable_args_t _a, * a = &_a;
+
+ a->is_en = mp->is_en;
+ vnet_lisp_gpe_enable_disable (a);
+
+ REPLY_MACRO(VL_API_LISP_GPE_ENABLE_DISABLE_REPLY);
+}
+
+static void
vl_api_lisp_gpe_add_del_iface_t_handler(
vl_api_lisp_gpe_add_del_iface_t *mp)
{
@@ -4692,6 +4707,8 @@ vl_api_lisp_gpe_add_del_iface_t_handler(
vnet_lisp_gpe_add_del_iface_args_t _a, * a = &_a;
a->is_add = mp->is_add;
+ a->table_id = mp->table_id;
+ a->vni = mp->vni;
vnet_lisp_gpe_add_del_iface (a, 0);
REPLY_MACRO(VL_API_LISP_GPE_ADD_DEL_IFACE_REPLY);
@@ -4837,7 +4854,7 @@ send_lisp_gpe_tunnel_details (lisp_gpe_tunnel_t *tunnel,
rmp->flags = tunnel->flags;
rmp->ver_res = tunnel->ver_res;
rmp->res = tunnel->res;
- rmp->iid = htonl(tunnel->iid);
+ rmp->iid = htonl(tunnel->vni);
vl_msg_api_send_shmem (q, (u8 *)&rmp);
}
diff --git a/vpp/api/vpe.api b/vpp/api/vpe.api
index f255fdaf622..afad1c25d0b 100644
--- a/vpp/api/vpe.api
+++ b/vpp/api/vpe.api
@@ -2239,6 +2239,26 @@ define lisp_add_del_map_resolver_reply {
i32 retval;
};
+/** \brief enable or disable lisp-gpe protocol
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param is_en - enable protocol if non-zero, else disable
+*/
+define lisp_gpe_enable_disable {
+ u32 client_index;
+ u32 context;
+ u8 is_en;
+};
+
+/** \brief Reply for gpe enable/disable
+ @param context - returned sender context, to match reply w/ request
+ @param retval - return code
+*/
+define lisp_gpe_enable_disable_reply {
+ u32 context;
+ i32 retval;
+};
+
/** \brief add or delete gpe_iface
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
@@ -2248,6 +2268,8 @@ define lisp_gpe_add_del_iface {
u32 client_index;
u32 context;
u8 is_add;
+ u32 table_id;
+ u32 vni;
};
/** \brief Reply for gpe_iface add/del