summaryrefslogtreecommitdiffstats
path: root/ctrl
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-12-11 09:57:58 +0100
committerAberto Compagno <acompagn+fdio@cisco.com>2020-01-30 08:21:50 +0000
commit38682396416f315fb5c5b0f8c25beb7a6a909d4f (patch)
tree9b56f4835a8936252f87bc19a27432b4bb8587c0 /ctrl
parentfa11d711aaab5e4cba7e89dcc896866f3e73db3f (diff)
[HICN-445] Update to vpp 20.01
Change-Id: I19a442080b6ca8b0477a8f92f161282288c395ee Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'ctrl')
-rw-r--r--ctrl/libhicnctrl/src/hicn_plugin_api.c4
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.c2
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c17
3 files changed, 10 insertions, 13 deletions
diff --git a/ctrl/libhicnctrl/src/hicn_plugin_api.c b/ctrl/libhicnctrl/src/hicn_plugin_api.c
index fc8954b65..70e0556a9 100644
--- a/ctrl/libhicnctrl/src/hicn_plugin_api.c
+++ b/ctrl/libhicnctrl/src/hicn_plugin_api.c
@@ -39,7 +39,7 @@
#include <hicn/util/map.h>
#include <hicn/error.h>
#include <vnet/ip/ip6_packet.h>
-#include <vnet/ip/ip_types_api.h>
+#include <vnet/ip/ip46_address.h>
#define APP_NAME "hicn_plugin"
#define MAX_OUTSTANDING_REQUESTS 4
@@ -1320,4 +1320,4 @@ u8 *
format_vl_api_address_union (u8 * s, va_list * args)
{
return NULL;
-} \ No newline at end of file
+}
diff --git a/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.c b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.c
index 5072c3d6c..dc3ac16d4 100644
--- a/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.c
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.c
@@ -39,7 +39,7 @@ int sr_plugin_init_cb(sr_session_ctx_t *session, void **private_ctx) {
hicn_subscribe_events(session, &subscription);
// IETF subscribe
- // ietf_subscribe_events(session, &subscription);
+ ietf_subscribe_events(session, &subscription);
/* set subscription as our private context */
diff --git a/ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c b/ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c
index b3d31ff80..b46b38b89 100644
--- a/ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c
@@ -30,7 +30,6 @@
#include "../hicn_vpp_comm.h"
-
DEFINE_VAPI_MSG_IDS_INTERFACE_API_JSON;
typedef struct hicn_interface_
@@ -38,8 +37,8 @@ typedef struct hicn_interface_
u32 sw_if_index;
char interface_name[VPP_INTFC_NAME_LEN];
u8 l2_address[VPP_MAC_ADDRESS_LEN];
- u32 l2_address_length;
u64 link_speed;
+ u32 flags;
u16 link_mtu;
u8 admin_up_down;
u8 link_up_down;
@@ -293,8 +292,7 @@ ietf_sw_interface_dump_cb (struct vapi_ctx_s *ctx, void *callback_ctx,
thisIntfc->sw_if_index = reply->sw_if_index;
memcpy(thisIntfc->interface_name, reply->interface_name, VPP_INTFC_NAME_LEN);
- thisIntfc->l2_address_length = reply->l2_address_length;
- memcpy(thisIntfc->l2_address, reply->l2_address, reply->l2_address_length );
+ memcpy(thisIntfc->l2_address, reply->l2_address, VPP_MAC_ADDRESS_LEN );
//thisIntfc->link_speed = reply->link_speed;
#define ONE_MEGABIT (uint64_t)1000000
switch (reply->link_speed << VNET_HW_INTERFACE_FLAG_SPEED_SHIFT)
@@ -305,8 +303,7 @@ ietf_sw_interface_dump_cb (struct vapi_ctx_s *ctx, void *callback_ctx,
}
thisIntfc->link_mtu = reply->link_mtu;
- thisIntfc->admin_up_down = reply->admin_up_down;
- thisIntfc->link_up_down = reply->link_up_down;
+ thisIntfc->flags = reply->flags;
dctx->num_ifs += 1;
}
@@ -352,10 +349,10 @@ i32 ietf_interface_add_del_addr( u32 sw_if_index, u8 is_add, u8 is_ipv6, u8 del_
vapi_msg_sw_interface_add_del_address *msg = vapi_alloc_sw_interface_add_del_address(g_vapi_ctx_instance);
msg->payload.sw_if_index = sw_if_index;
msg->payload.is_add = is_add;
- msg->payload.is_ipv6 = is_ipv6;
+ msg->payload.prefix.address.af = is_ipv6 ? ADDRESS_IP6 : ADDRESS_IP4;
msg->payload.del_all = del_all;
- msg->payload.address_length = address_length;
- memcpy(msg->payload.address, address, VPP_IP6_ADDRESS_LEN);
+ msg->payload.prefix.len = address_length;
+ memcpy(msg->payload.prefix.address.un.ip6, address, VPP_IP6_ADDRESS_LEN);
if(vapi_sw_interface_add_del_address(g_vapi_ctx_instance,msg,call_sw_interface_add_del_address,NULL)!=VAPI_OK){
SRP_LOG_DBGMSG("Operation failed");
@@ -370,7 +367,7 @@ i32 ietf_setInterfaceFlags(u32 sw_if_index, u8 admin_up_down)
i32 ret = -1;
vapi_msg_sw_interface_set_flags *msg = vapi_alloc_sw_interface_set_flags(g_vapi_ctx_instance);
msg->payload.sw_if_index = sw_if_index;
- msg->payload.admin_up_down = admin_up_down;
+ msg->payload.flags = admin_up_down? IF_STATUS_API_FLAG_ADMIN_UP : 0;
if(vapi_sw_interface_set_flags(g_vapi_ctx_instance,msg,call_sw_interface_set_flags,NULL)!=VAPI_OK){
SRP_LOG_DBGMSG("Operation failed");