aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl
diff options
context:
space:
mode:
Diffstat (limited to 'ctrl')
-rw-r--r--ctrl/libhicnctrl/includes/hicn/ctrl/api.h1
-rw-r--r--ctrl/libhicnctrl/src/hicn_plugin_api.c10
-rw-r--r--ctrl/sysrepo-plugins/CMakeLists.txt6
-rw-r--r--ctrl/sysrepo-plugins/cmake/Modules/Packaging.cmake12
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c8
5 files changed, 18 insertions, 19 deletions
diff --git a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
index 65633c249..e7cd39ebf 100644
--- a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
+++ b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
@@ -387,6 +387,7 @@ int hc_sock_reset(hc_sock_t *s);
#else
#define INTERFACE_LEN IFNAMSIZ
#endif
+
#define MAXSZ_HC_NAME_ SYMBOLIC_NAME_LEN
#define MAXSZ_HC_NAME MAXSZ_HC_NAME_ + NULLTERM
diff --git a/ctrl/libhicnctrl/src/hicn_plugin_api.c b/ctrl/libhicnctrl/src/hicn_plugin_api.c
index 233abb0f8..b2de6cc2f 100644
--- a/ctrl/libhicnctrl/src/hicn_plugin_api.c
+++ b/ctrl/libhicnctrl/src/hicn_plugin_api.c
@@ -1337,8 +1337,14 @@ int hc_face_create(hc_sock_t *s, hc_face_t *face) {
.parse = (HC_PARSE)parse_face_create,
};
- return hc_execute_command(s, (hc_msg_t *)&msg, sizeof(msg), &params, NULL,
- false);
+ hc_data_t *data;
+
+ int ret = hc_execute_command(s, (hc_msg_t *)&msg, sizeof(msg), &params, &data,
+ false);
+ if (ret == 0)
+ face->id = ((hc_face_t *)data->buffer)->id;
+
+ return ret;
}
/* FACE DELETE */
diff --git a/ctrl/sysrepo-plugins/CMakeLists.txt b/ctrl/sysrepo-plugins/CMakeLists.txt
index 1a9bca18c..8c1278c1c 100644
--- a/ctrl/sysrepo-plugins/CMakeLists.txt
+++ b/ctrl/sysrepo-plugins/CMakeLists.txt
@@ -41,14 +41,12 @@ if (NOT SRPD_PLUGINS_PATH)
message(FATAL_ERROR "Cannot get sysrepo plugins directory due to missing pkg-config, set SRPD_PLUGINS_PATH manually.")
endif()
+find_package(Vpp REQUIRED)
+
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
- find_package(Vpp REQUIRED)
find_package(HicnPlugin REQUIRED)
- find_package(Libhicn REQUIRED)
else()
list(APPEND DEPENDENCIES
- ${LIBHICN_SHARED}
- ${LIBHICN_STATIC}
hicn_plugin
)
endif()
diff --git a/ctrl/sysrepo-plugins/cmake/Modules/Packaging.cmake b/ctrl/sysrepo-plugins/cmake/Modules/Packaging.cmake
index f5e8426fb..0c816c446 100644
--- a/ctrl/sysrepo-plugins/cmake/Modules/Packaging.cmake
+++ b/ctrl/sysrepo-plugins/cmake/Modules/Packaging.cmake
@@ -15,17 +15,17 @@
# Packages section
######################
-set(hicn_sysrepo_plugin_DESCRIPTION
+set(hicn-sysrepo-plugin_DESCRIPTION
"A Plugin to enable hICN VPP in sysrepo."
CACHE STRING "Description for deb/rpm package."
)
-set(hicn_sysrepo_plugin_DEB_DEPENDENCIES
- "hicn-plugin (= stable_version-release), vpp (= stable_version-release), vpp-plugins (= stable_version-release)"
+set(hicn-sysrepo-plugin_DEB_DEPENDENCIES
+ "hicn-plugin (= stable_version-release), sysrepo (>= 1.0)"
CACHE STRING "Dependencies for deb/rpm package."
)
-set(hicn_sysrepo_plugin_RPM_DEPENDENCIES
-"hicn-plugin (= stable_version-release), vpp (= stable_version-release), vpp-plugins (= stable_version-release)"
-CACHE STRING "Dependencies for deb/rpm package."
+set(hicn-sysrepo-plugin_RPM_DEPENDENCIES
+ "hicn-plugin = stable_version-release, sysrepo >= 1.0"
+ CACHE STRING "Dependencies for deb/rpm package."
)
diff --git a/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c
index e028d7840..52ae6ee90 100644
--- a/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c
@@ -15,20 +15,14 @@
#include "hicn_vpp_comm.h"
#include <vapi/vapi.h>
-
-
-
#define APP_NAME "hicn_plugin"
#define MAX_OUTSTANDING_REQUESTS 4
#define RESPONSE_QUEUE_SIZE 2
-vapi_ctx_t g_vapi_ctx_instance=NULL;
+vapi_ctx_t g_vapi_ctx_instance = NULL;
// Use VAPI macros to define symbols
-
-
int hicn_connect_vpp() {
-
if (g_vapi_ctx_instance == NULL) {
vapi_error_e rv = vapi_ctx_alloc(&g_vapi_ctx_instance);
rv = vapi_connect(g_vapi_ctx_instance, APP_NAME, NULL,