From 577c3553dd6939e998c78c5a389750aac3a67f8b Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Thu, 21 Apr 2016 00:45:40 +0200 Subject: 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 --- vpp/api/api.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'vpp/api/api.c') diff --git a/vpp/api/api.c b/vpp/api/api.c index 4956a43a..ea766938 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); @@ -4683,6 +4684,20 @@ vl_api_lisp_add_del_map_resolver_t_handler( REPLY_MACRO(VL_API_LISP_ADD_DEL_MAP_RESOLVER_REPLY); } +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); } -- cgit 1.2.3-korg