From be464ae928413ce7f16fec5742fd6fe461906500 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Wed, 23 Sep 2020 18:14:14 +0000 Subject: [HICN-642] Porting of fixes for hicn_plugin punting api. Signed-off-by: Mauro Sardara Change-Id: Iaf626f3c94d7a37a0472fe781b09373f5e9370d9 --- hicn-plugin/src/CMakeLists.txt | 10 +++++++--- hicn-plugin/src/hicn_plugin.c | 2 +- hicn-plugin/src/host_stack/cbr_proto.c | 5 ----- hicn-plugin/src/network/route.c | 7 ------- 4 files changed, 8 insertions(+), 16 deletions(-) (limited to 'hicn-plugin') diff --git a/hicn-plugin/src/CMakeLists.txt b/hicn-plugin/src/CMakeLists.txt index eca7e6436..f9f925c52 100644 --- a/hicn-plugin/src/CMakeLists.txt +++ b/hicn-plugin/src/CMakeLists.txt @@ -180,6 +180,10 @@ SET(HICN_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} CACHE ST set(COMPILE_FLAGS "-march=native") set(COMPILE_DEFINITIONS "-DHICN_VPP_PLUGIN=1") +if (NOT ${CMAKE_BUILD_TYPE} STREQUAL "Release") + set(COMPILE_DEFINITIONS ${COMPILE_DEFINITIONS} "-DCLIB_DEBUG") +endif() + file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/hicn) file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/vapi) file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/vnet/ip) @@ -238,7 +242,7 @@ build_library(hicn_plugin SHARED SOURCES ${HICN_PLUGIN_SOURCE_FILES} ${HICN_NETWORK_PLUGIN_SOURCE_FILES} ${HICN_HS_PLUGIN_SOURCE_FILES} INSTALL_HEADERS ${HICN_API_HEADER_FILES} ${HICN_API_GENERATED_FILES} - LINK_LIBRARIES ${LIBTRANSPORT_LIBRARIES} ${LIBHICN_LIBRARIES} + LINK_LIBRARIES ${LIBHICN_LIBRARIES} DEPENDS ${DEPENDENCIES} COMPONENT ${HICN_PLUGIN} INCLUDE_DIRS ${HICN_PLUGIN_INCLUDE_DIRS_INTERNAL} @@ -263,14 +267,14 @@ build_library(hicn_api_test_plugin set_target_properties(hicn_plugin.shared PROPERTIES LINKER_LANGUAGE C - INSTALL_RPATH "${VPP_INSTALL_PLUGIN}:${HICN_INSTALL_PREFIX}:/home/ubuntu/host-stack/vpp/build-root/install-vpp_debug-native/vpp/lib" + INSTALL_RPATH "${VPP_INSTALL_PLUGIN}:${HICN_INSTALL_PREFIX}:${VPP_HOME}/lib" PREFIX "" ) set_target_properties(hicn_api_test_plugin.shared PROPERTIES LINKER_LANGUAGE C - INSTALL_RPATH "${VPP_INSTALL_PLUGIN}:${HICN_INSTALL_PREFIX}:/home/ubuntu/host-stack/vpp/build-root/install-vpp_debug-native/vpp/lib" + INSTALL_RPATH "${VPP_INSTALL_PLUGIN}:${HICN_INSTALL_PREFIX}:${VPP_HOME}/lib" PREFIX "" ) diff --git a/hicn-plugin/src/hicn_plugin.c b/hicn-plugin/src/hicn_plugin.c index 5f28f0123..b8acc5f74 100644 --- a/hicn-plugin/src/hicn_plugin.c +++ b/hicn-plugin/src/hicn_plugin.c @@ -59,7 +59,7 @@ hicn_init(vlib_main_t *vm) udp_tunnel_init(); /* Init the host stack module */ - hicn_hs_init(vm); + // hicn_hs_init(vm); return error; } diff --git a/hicn-plugin/src/host_stack/cbr_proto.c b/hicn-plugin/src/host_stack/cbr_proto.c index 54a851d41..b87f2573c 100644 --- a/hicn-plugin/src/host_stack/cbr_proto.c +++ b/hicn-plugin/src/host_stack/cbr_proto.c @@ -16,8 +16,6 @@ #include "host_stack.h" #include "inlines.h" -#include - #define WINDOW_SIZE 200 typedef struct hicn_hs_cbr_proto_data_ @@ -35,9 +33,6 @@ reset_protocol(hicn_hs_cbr_proto_data_t *proto_data) proto_data->in_flight_interests = 0; proto_data->window_size = WINDOW_SIZE; proto_data->next_seq_number = 0; - - TransportAlgorithm *t = transportAlgorithm_CreateRaaqm(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - proto_data->next_seq_number = (u64)t; } static void diff --git a/hicn-plugin/src/network/route.c b/hicn-plugin/src/network/route.c index 3b774cd82..b569d431e 100644 --- a/hicn-plugin/src/network/route.c +++ b/hicn-plugin/src/network/route.c @@ -676,13 +676,6 @@ set_table_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) if (!is_add) return HICN_ERROR_NONE; - vnet_sw_interface_t * sw_int = vnet_get_sw_interface(vnm, sw_if_index); - vnet_hw_interface_t * hw_int = vnet_get_hw_interface(vnm, sw_int->hw_if_index); - - char * mpls = "mpls"; - if (strstr((char *)hw_int->name, mpls) == NULL) - return 0; - int rv = ip_table_bind (FIB_PROTOCOL_IP4, sw_if_index, HICN_FIB_TABLE, 1); if (!rv) -- cgit 1.2.3-korg