aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt32
-rw-r--r--apps/higet/CMakeLists.txt2
-rw-r--r--apps/http-proxy/CMakeLists.txt2
-rw-r--r--ctrl/facemgr/CMakeLists.txt2
-rw-r--r--ctrl/libhicnctrl/CMakeLists.txt2
-rw-r--r--ctrl/sysrepo-plugins/CMakeLists.txt (renamed from utils/sysrepo-plugins/CMakeLists.txt)0
-rw-r--r--ctrl/sysrepo-plugins/README.md (renamed from utils/sysrepo-plugins/README.md)0
-rw-r--r--ctrl/sysrepo-plugins/cmake/FindHicnLight.cmake (renamed from utils/sysrepo-plugins/cmake/FindHicnLight.cmake)0
-rw-r--r--ctrl/sysrepo-plugins/cmake/FindHicnPlugin.cmake (renamed from utils/sysrepo-plugins/cmake/FindHicnPlugin.cmake)0
-rw-r--r--ctrl/sysrepo-plugins/cmake/FindSysrepo.cmake (renamed from utils/sysrepo-plugins/cmake/FindSysrepo.cmake)0
-rw-r--r--ctrl/sysrepo-plugins/cmake/FindVPP.cmake (renamed from utils/sysrepo-plugins/cmake/FindVPP.cmake)0
-rw-r--r--ctrl/sysrepo-plugins/cmake/Packager.cmake (renamed from utils/sysrepo-plugins/cmake/Packager.cmake)0
-rw-r--r--ctrl/sysrepo-plugins/cmake/Packaging.cmake (renamed from utils/sysrepo-plugins/cmake/Packaging.cmake)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-light/CMakeLists.txt (renamed from utils/sysrepo-plugins/hicn-light/CMakeLists.txt)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-light/plugin/CMakeLists.txt (renamed from utils/sysrepo-plugins/hicn-light/plugin/CMakeLists.txt)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light.c (renamed from utils/sysrepo-plugins/hicn-light/plugin/hicn_light.c)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light.h (renamed from utils/sysrepo-plugins/hicn-light/plugin/hicn_light.h)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.c (renamed from utils/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.c)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.h (renamed from utils/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.h)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-light/plugin/model/hicn_model.c (renamed from utils/sysrepo-plugins/hicn-light/plugin/model/hicn_model.c)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-light/plugin/model/hicn_model.h (renamed from utils/sysrepo-plugins/hicn-light/plugin/model/hicn_model.h)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-light/plugin/model/tlock.c (renamed from utils/sysrepo-plugins/hicn-light/plugin/model/tlock.c)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-light/plugin/model/tlock.h (renamed from utils/sysrepo-plugins/hicn-light/plugin/model/tlock.h)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/CMakeLists.txt (renamed from utils/sysrepo-plugins/hicn-plugin/CMakeLists.txt)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.c (renamed from utils/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.c)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.h (renamed from utils/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.h)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c (renamed from utils/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h (renamed from utils/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c (renamed from utils/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.h (renamed from utils/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.h)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c (renamed from utils/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.h (renamed from utils/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.h)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/model/tlock.c (renamed from utils/sysrepo-plugins/hicn-plugin/plugin/model/tlock.c)0
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/model/tlock.h (renamed from utils/sysrepo-plugins/hicn-plugin/plugin/model/tlock.h)0
-rw-r--r--ctrl/sysrepo-plugins/yang/hicn/hicn.yang (renamed from utils/sysrepo-plugins/yang/hicn/hicn.yang)0
-rw-r--r--ctrl/sysrepo-plugins/yang/hicn/rpc_call_samples.xml (renamed from utils/sysrepo-plugins/yang/hicn/rpc_call_samples.xml)0
-rw-r--r--ctrl/sysrepo-plugins/yang/hicn/sysrepo_startup.xml (renamed from utils/sysrepo-plugins/yang/hicn/sysrepo_startup.xml)0
-rw-r--r--ctrl/sysrepo-plugins/yang/ietf/iana-if-type@2014-05-08.yang (renamed from utils/sysrepo-plugins/yang/ietf/iana-if-type@2014-05-08.yang)0
-rw-r--r--ctrl/sysrepo-plugins/yang/ietf/ietf-interfaces.yang (renamed from utils/sysrepo-plugins/yang/ietf/ietf-interfaces.yang)0
-rw-r--r--ctrl/sysrepo-plugins/yang/ietf/ietf-ip@2014-06-16.yang (renamed from utils/sysrepo-plugins/yang/ietf/ietf-ip@2014-06-16.yang)0
-rw-r--r--ctrl/sysrepo-plugins/yang/ietf/ietf-yang-types@2013-07-15.yang (renamed from utils/sysrepo-plugins/yang/ietf/ietf-yang-types@2013-07-15.yang)0
-rw-r--r--extras/hicn-extra-plugin/CMakeLists.txt (renamed from utils/extras/CMakeLists.txt)44
-rw-r--r--extras/hicn-extra-plugin/README.md (renamed from utils/extras/README.md)0
-rw-r--r--extras/hicn-extra-plugin/cmake/Modules/Packaging.cmake (renamed from utils/extras/cmake/Modules/Packaging.cmake)0
-rw-r--r--extras/hicn-extra-plugin/devices/rtnetlink/mapper.c (renamed from utils/extras/devices/rtnetlink/mapper.c)0
-rw-r--r--extras/hicn-extra-plugin/devices/rtnetlink/mapper.h (renamed from utils/extras/devices/rtnetlink/mapper.h)0
-rw-r--r--extras/hicn-extra-plugin/devices/rtnetlink/netns.c (renamed from utils/extras/devices/rtnetlink/netns.c)0
-rw-r--r--extras/hicn-extra-plugin/devices/rtnetlink/netns.h (renamed from utils/extras/devices/rtnetlink/netns.h)0
-rw-r--r--extras/hicn-extra-plugin/devices/rtnetlink/rtnl.c (renamed from utils/extras/devices/rtnetlink/rtnl.c)0
-rw-r--r--extras/hicn-extra-plugin/devices/rtnetlink/rtnl.h (renamed from utils/extras/devices/rtnetlink/rtnl.h)0
-rw-r--r--extras/hicn-extra-plugin/devices/rtnetlink/test.c (renamed from utils/extras/devices/rtnetlink/test.c)0
-rw-r--r--extras/hicn-extra-plugin/rtinject/tap_inject.c (renamed from utils/extras/rtinject/tap_inject.c)0
-rw-r--r--extras/hicn-extra-plugin/rtinject/tap_inject.h (renamed from utils/extras/rtinject/tap_inject.h)0
-rw-r--r--extras/hicn-extra-plugin/rtinject/tap_inject_netlink.c (renamed from utils/extras/rtinject/tap_inject_netlink.c)0
-rw-r--r--extras/hicn-extra-plugin/rtinject/tap_inject_node.c (renamed from utils/extras/rtinject/tap_inject_node.c)0
-rw-r--r--extras/hicn-extra-plugin/rtinject/tap_inject_tap.c (renamed from utils/extras/rtinject/tap_inject_tap.c)0
-rw-r--r--extras/libmemif/CMakeLists.txt68
-rw-r--r--extras/libmemif/CMakeLists1.patch58
-rw-r--r--extras/libmemif/CMakeLists2.patch42
-rw-r--r--extras/libmemif/cmake/Modules/Packaging.cmake29
-rw-r--r--hicn-light/CMakeLists.txt2
-rw-r--r--hicn-plugin/CMakeLists.txt25
-rw-r--r--lib/CMakeLists.txt4
-rw-r--r--libtransport/CMakeLists.txt47
-rw-r--r--libtransport/cmake/Modules/Packaging.cmake8
-rw-r--r--scripts/build-packages.sh20
-rw-r--r--utils/CMakeLists.txt2
67 files changed, 311 insertions, 78 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d1d75061..c0d689331 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,6 +28,7 @@ option(BUILD_APPS "Build the hicn apps" OFF)
option(BUILD_CTRL "Build the hicn control tools" ON)
option(BUILD_HICNPLUGIN "Build the hicn vpp plugin" OFF)
option(BUILD_HICNEXTRAPLUGIN "Build the hicn extra plugin" OFF)
+option(BUILD_SYSREPOPLUGIN "Build the sysrepo plugin" OFF)
list(APPEND dir_options
BUILD_LIBHICN
@@ -36,6 +37,10 @@ list(APPEND dir_options
BUILD_UTILS
BUILD_APPS
BUILD_CTRL
+ BUILD_HICNPLUGIN
+ BUILD_HICNEXTRAPLUGIN
+ BUILD_SYSREPOPLUGIN
+ BUILD_LIBMEMIF
)
set(BUILD_LIBHICN_DIR lib)
@@ -45,7 +50,9 @@ set(BUILD_UTILS_DIR utils)
set(BUILD_APPS_DIR apps)
set(BUILD_CTRL_DIR ctrl)
set(BUILD_HICNPLUGIN_DIR hicn-plugin)
-set(BUILD_HICNEXTRAPLUGIN_DIR utils/extras/)
+set(BUILD_SYSREPOPLUGIN_DIR ctrl/sysrepo-plugins)
+set(BUILD_HICNEXTRAPLUGIN_DIR extras/hicn-extra-plugin)
+set(BUILD_LIBMEMIF_DIR extras/libmemif)
## Add enabled components
foreach (opt ${dir_options})
@@ -69,11 +76,20 @@ set(HICN_CTRL hicn-ctrl)
set(LIBHICN_CTRL hicn-ctrl)
set(HICN_APPS hicn-apps)
set(FACE_MGR facemgr)
+set(LIBMEMIF memif)
if (BUILD_HICNPLUGIN AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
- list(APPEND subdirs
- ${BUILD_HICNPLUGIN_DIR}
- )
+ find_package(Libmemif)
+
+ if (NOT Libmemif_FOUND)
+ message(STATUS "Libmemif not found in the system. Building it as external project.")
+ list(INSERT subdirs 0
+ ${BUILD_LIBMEMIF_DIR}
+ )
+
+ unset(LIBMEMIF_INCLUDE_DIRS)
+ unset(LIBMEMIF_LIBRARIES)
+ endif()
list(APPEND HICN_BINARY_API_INCLUDE_DIRS
${PROJECT_BINARY_DIR}/hicn-plugin
@@ -83,20 +99,16 @@ if (BUILD_HICNPLUGIN AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
set(LIBTRANSPORT ${LIBTRANSPORT}-memif)
endif()
-if (BUILD_HICNEXTRAPLUGIN AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
- list(APPEND subdirs
- ${BUILD_HICNEXTRAPLUGIN_DIR}
- )
-endif()
-
## Libraries targets
set(LIBHICN_SHARED ${LIBHICN}.shared)
set(LIBTRANSPORT_SHARED ${LIBTRANSPORT}.shared)
set(LIBHICN_CTRL_SHARED ${LIBHICN_CTRL}.shared)
+set(LIBMEMIF_SHARED ${LIBMEMIF}.shared)
set(LIBHICN_STATIC ${LIBHICN}.static)
set(LIBTRANSPORT_STATIC ${LIBTRANSPORT}.static)
set(LIBHICN_CTRL_STATIC ${LIBHICN_CTRL}.static)
+set(LIBMEMIF_STATIC ${LIBMEMIF}.static)
## HEADER FILES
set(HICN_INCLUDE_DIRS "" "" CACHE INTERNAL "" FORCE)
diff --git a/apps/higet/CMakeLists.txt b/apps/higet/CMakeLists.txt
index d337f2620..83a13bcca 100644
--- a/apps/higet/CMakeLists.txt
+++ b/apps/higet/CMakeLists.txt
@@ -23,7 +23,7 @@ set(CMAKE_MODULE_PATH
)
if (NOT CMAKE_BUILD_TYPE)
- message(STATUS "No build type selected, default to Release")
+ message(STATUS "${PROJECT_NAME}: No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif ()
diff --git a/apps/http-proxy/CMakeLists.txt b/apps/http-proxy/CMakeLists.txt
index 0b97c0e5c..7e29edcf8 100644
--- a/apps/http-proxy/CMakeLists.txt
+++ b/apps/http-proxy/CMakeLists.txt
@@ -20,7 +20,7 @@ set(CMAKE_MODULE_PATH
)
if (NOT CMAKE_BUILD_TYPE)
- message(STATUS "No build type selected, default to Release")
+ message(STATUS "${PROJECT_NAME}: No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif ()
diff --git a/ctrl/facemgr/CMakeLists.txt b/ctrl/facemgr/CMakeLists.txt
index fcd221a98..f688dd2ca 100644
--- a/ctrl/facemgr/CMakeLists.txt
+++ b/ctrl/facemgr/CMakeLists.txt
@@ -21,7 +21,7 @@ endif()
project(facemgr)
if (NOT CMAKE_BUILD_TYPE)
- message(STATUS "No build type selected, default to Release")
+ message(STATUS "${PROJECT_NAME}: No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif()
diff --git a/ctrl/libhicnctrl/CMakeLists.txt b/ctrl/libhicnctrl/CMakeLists.txt
index 3a2358f65..cb1bd722c 100644
--- a/ctrl/libhicnctrl/CMakeLists.txt
+++ b/ctrl/libhicnctrl/CMakeLists.txt
@@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(libhicnctrl)
if (NOT CMAKE_BUILD_TYPE)
- message(STATUS "No build type selected, default to Release")
+ message(STATUS "${PROJECT_NAME}: No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif()
diff --git a/utils/sysrepo-plugins/CMakeLists.txt b/ctrl/sysrepo-plugins/CMakeLists.txt
index 91726161f..91726161f 100644
--- a/utils/sysrepo-plugins/CMakeLists.txt
+++ b/ctrl/sysrepo-plugins/CMakeLists.txt
diff --git a/utils/sysrepo-plugins/README.md b/ctrl/sysrepo-plugins/README.md
index 3f0ed2e34..3f0ed2e34 100644
--- a/utils/sysrepo-plugins/README.md
+++ b/ctrl/sysrepo-plugins/README.md
diff --git a/utils/sysrepo-plugins/cmake/FindHicnLight.cmake b/ctrl/sysrepo-plugins/cmake/FindHicnLight.cmake
index bce3265fa..bce3265fa 100644
--- a/utils/sysrepo-plugins/cmake/FindHicnLight.cmake
+++ b/ctrl/sysrepo-plugins/cmake/FindHicnLight.cmake
diff --git a/utils/sysrepo-plugins/cmake/FindHicnPlugin.cmake b/ctrl/sysrepo-plugins/cmake/FindHicnPlugin.cmake
index f50ed736e..f50ed736e 100644
--- a/utils/sysrepo-plugins/cmake/FindHicnPlugin.cmake
+++ b/ctrl/sysrepo-plugins/cmake/FindHicnPlugin.cmake
diff --git a/utils/sysrepo-plugins/cmake/FindSysrepo.cmake b/ctrl/sysrepo-plugins/cmake/FindSysrepo.cmake
index 4228ef93a..4228ef93a 100644
--- a/utils/sysrepo-plugins/cmake/FindSysrepo.cmake
+++ b/ctrl/sysrepo-plugins/cmake/FindSysrepo.cmake
diff --git a/utils/sysrepo-plugins/cmake/FindVPP.cmake b/ctrl/sysrepo-plugins/cmake/FindVPP.cmake
index 62abc29da..62abc29da 100644
--- a/utils/sysrepo-plugins/cmake/FindVPP.cmake
+++ b/ctrl/sysrepo-plugins/cmake/FindVPP.cmake
diff --git a/utils/sysrepo-plugins/cmake/Packager.cmake b/ctrl/sysrepo-plugins/cmake/Packager.cmake
index b19145025..b19145025 100644
--- a/utils/sysrepo-plugins/cmake/Packager.cmake
+++ b/ctrl/sysrepo-plugins/cmake/Packager.cmake
diff --git a/utils/sysrepo-plugins/cmake/Packaging.cmake b/ctrl/sysrepo-plugins/cmake/Packaging.cmake
index f5e8426fb..f5e8426fb 100644
--- a/utils/sysrepo-plugins/cmake/Packaging.cmake
+++ b/ctrl/sysrepo-plugins/cmake/Packaging.cmake
diff --git a/utils/sysrepo-plugins/hicn-light/CMakeLists.txt b/ctrl/sysrepo-plugins/hicn-light/CMakeLists.txt
index eea06592d..eea06592d 100644
--- a/utils/sysrepo-plugins/hicn-light/CMakeLists.txt
+++ b/ctrl/sysrepo-plugins/hicn-light/CMakeLists.txt
diff --git a/utils/sysrepo-plugins/hicn-light/plugin/CMakeLists.txt b/ctrl/sysrepo-plugins/hicn-light/plugin/CMakeLists.txt
index e1d3dd39a..e1d3dd39a 100644
--- a/utils/sysrepo-plugins/hicn-light/plugin/CMakeLists.txt
+++ b/ctrl/sysrepo-plugins/hicn-light/plugin/CMakeLists.txt
diff --git a/utils/sysrepo-plugins/hicn-light/plugin/hicn_light.c b/ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light.c
index ae436a8ad..ae436a8ad 100644
--- a/utils/sysrepo-plugins/hicn-light/plugin/hicn_light.c
+++ b/ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light.c
diff --git a/utils/sysrepo-plugins/hicn-light/plugin/hicn_light.h b/ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light.h
index 16f65e5c4..16f65e5c4 100644
--- a/utils/sysrepo-plugins/hicn-light/plugin/hicn_light.h
+++ b/ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light.h
diff --git a/utils/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.c b/ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.c
index 6c4f938ce..6c4f938ce 100644
--- a/utils/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.c
+++ b/ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.c
diff --git a/utils/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.h b/ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.h
index adb7737aa..adb7737aa 100644
--- a/utils/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.h
+++ b/ctrl/sysrepo-plugins/hicn-light/plugin/hicn_light_comm.h
diff --git a/utils/sysrepo-plugins/hicn-light/plugin/model/hicn_model.c b/ctrl/sysrepo-plugins/hicn-light/plugin/model/hicn_model.c
index 7cfb8363a..7cfb8363a 100644
--- a/utils/sysrepo-plugins/hicn-light/plugin/model/hicn_model.c
+++ b/ctrl/sysrepo-plugins/hicn-light/plugin/model/hicn_model.c
diff --git a/utils/sysrepo-plugins/hicn-light/plugin/model/hicn_model.h b/ctrl/sysrepo-plugins/hicn-light/plugin/model/hicn_model.h
index e6e857bff..e6e857bff 100644
--- a/utils/sysrepo-plugins/hicn-light/plugin/model/hicn_model.h
+++ b/ctrl/sysrepo-plugins/hicn-light/plugin/model/hicn_model.h
diff --git a/utils/sysrepo-plugins/hicn-light/plugin/model/tlock.c b/ctrl/sysrepo-plugins/hicn-light/plugin/model/tlock.c
index 2f7b11efa..2f7b11efa 100644
--- a/utils/sysrepo-plugins/hicn-light/plugin/model/tlock.c
+++ b/ctrl/sysrepo-plugins/hicn-light/plugin/model/tlock.c
diff --git a/utils/sysrepo-plugins/hicn-light/plugin/model/tlock.h b/ctrl/sysrepo-plugins/hicn-light/plugin/model/tlock.h
index 36698115a..36698115a 100644
--- a/utils/sysrepo-plugins/hicn-light/plugin/model/tlock.h
+++ b/ctrl/sysrepo-plugins/hicn-light/plugin/model/tlock.h
diff --git a/utils/sysrepo-plugins/hicn-plugin/CMakeLists.txt b/ctrl/sysrepo-plugins/hicn-plugin/CMakeLists.txt
index 4c3ef6d1a..4c3ef6d1a 100644
--- a/utils/sysrepo-plugins/hicn-plugin/CMakeLists.txt
+++ b/ctrl/sysrepo-plugins/hicn-plugin/CMakeLists.txt
diff --git a/utils/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.c b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.c
index 262e98553..262e98553 100644
--- a/utils/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.c
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.c
diff --git a/utils/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.h b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.h
index 4e48c8c29..4e48c8c29 100644
--- a/utils/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.h
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_plugin.h
diff --git a/utils/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c
index f044c5b1b..f044c5b1b 100644
--- a/utils/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c
diff --git a/utils/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h
index fd71dbaf2..fd71dbaf2 100644
--- a/utils/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h
diff --git a/utils/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c b/ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c
index f02605895..f02605895 100644
--- a/utils/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c
diff --git a/utils/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.h b/ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.h
index 0f6c7f8b4..0f6c7f8b4 100644
--- a/utils/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.h
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.h
diff --git a/utils/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c b/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c
index b49839c53..b49839c53 100644
--- a/utils/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c
diff --git a/utils/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.h b/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.h
index 6cb5d2710..6cb5d2710 100644
--- a/utils/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.h
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.h
diff --git a/utils/sysrepo-plugins/hicn-plugin/plugin/model/tlock.c b/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/tlock.c
index d27ae6492..d27ae6492 100644
--- a/utils/sysrepo-plugins/hicn-plugin/plugin/model/tlock.c
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/tlock.c
diff --git a/utils/sysrepo-plugins/hicn-plugin/plugin/model/tlock.h b/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/tlock.h
index 8cdfc8b5b..8cdfc8b5b 100644
--- a/utils/sysrepo-plugins/hicn-plugin/plugin/model/tlock.h
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/tlock.h
diff --git a/utils/sysrepo-plugins/yang/hicn/hicn.yang b/ctrl/sysrepo-plugins/yang/hicn/hicn.yang
index 484fec6f0..484fec6f0 100644
--- a/utils/sysrepo-plugins/yang/hicn/hicn.yang
+++ b/ctrl/sysrepo-plugins/yang/hicn/hicn.yang
diff --git a/utils/sysrepo-plugins/yang/hicn/rpc_call_samples.xml b/ctrl/sysrepo-plugins/yang/hicn/rpc_call_samples.xml
index db79fd4ef..db79fd4ef 100644
--- a/utils/sysrepo-plugins/yang/hicn/rpc_call_samples.xml
+++ b/ctrl/sysrepo-plugins/yang/hicn/rpc_call_samples.xml
diff --git a/utils/sysrepo-plugins/yang/hicn/sysrepo_startup.xml b/ctrl/sysrepo-plugins/yang/hicn/sysrepo_startup.xml
index f88e13ea2..f88e13ea2 100644
--- a/utils/sysrepo-plugins/yang/hicn/sysrepo_startup.xml
+++ b/ctrl/sysrepo-plugins/yang/hicn/sysrepo_startup.xml
diff --git a/utils/sysrepo-plugins/yang/ietf/iana-if-type@2014-05-08.yang b/ctrl/sysrepo-plugins/yang/ietf/iana-if-type@2014-05-08.yang
index 4138ba46e..4138ba46e 100644
--- a/utils/sysrepo-plugins/yang/ietf/iana-if-type@2014-05-08.yang
+++ b/ctrl/sysrepo-plugins/yang/ietf/iana-if-type@2014-05-08.yang
diff --git a/utils/sysrepo-plugins/yang/ietf/ietf-interfaces.yang b/ctrl/sysrepo-plugins/yang/ietf/ietf-interfaces.yang
index f66c205ce..f66c205ce 100644
--- a/utils/sysrepo-plugins/yang/ietf/ietf-interfaces.yang
+++ b/ctrl/sysrepo-plugins/yang/ietf/ietf-interfaces.yang
diff --git a/utils/sysrepo-plugins/yang/ietf/ietf-ip@2014-06-16.yang b/ctrl/sysrepo-plugins/yang/ietf/ietf-ip@2014-06-16.yang
index 79606cc07..79606cc07 100644
--- a/utils/sysrepo-plugins/yang/ietf/ietf-ip@2014-06-16.yang
+++ b/ctrl/sysrepo-plugins/yang/ietf/ietf-ip@2014-06-16.yang
diff --git a/utils/sysrepo-plugins/yang/ietf/ietf-yang-types@2013-07-15.yang b/ctrl/sysrepo-plugins/yang/ietf/ietf-yang-types@2013-07-15.yang
index ee58fa3ab..ee58fa3ab 100644
--- a/utils/sysrepo-plugins/yang/ietf/ietf-yang-types@2013-07-15.yang
+++ b/ctrl/sysrepo-plugins/yang/ietf/ietf-yang-types@2013-07-15.yang
diff --git a/utils/extras/CMakeLists.txt b/extras/hicn-extra-plugin/CMakeLists.txt
index d92ac4a68..6147afa1b 100644
--- a/utils/extras/CMakeLists.txt
+++ b/extras/hicn-extra-plugin/CMakeLists.txt
@@ -24,19 +24,19 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_C_STANDARD 11)
+include (Packaging)
+
# Check for memfd_create syscall
include(CheckSymbolExists)
CHECK_SYMBOL_EXISTS ( "__NR_memfd_create" "sys/syscall.h" HAVE_MEMFD_CREATE )
if ( HAVE_MEMFD_CREATE )
- add_definitions ( -DHAVE_MEMFD_CREATE )
+ add_definitions ( -DHAVE_MEMFD_CREATE )
endif()
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
- set(HICN_EXTRA_PLUGIN extra-plugin)
+ set(HICN_EXTRA_PLUGIN extra-plugin)
endif()
-include (Packaging)
-
# Dependencies
find_package(Vpp REQUIRED)
@@ -60,17 +60,20 @@ set(HICN_EXTRA_PLUGIN_HEADER_FILES
)
if (NOT VPP_HOME)
- set(VPP_HOME /usr)
+ set(VPP_HOME /usr)
endif()
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE "Release")
endif (NOT CMAKE_BUILD_TYPE)
-SET(EXTRA_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} CACHE STRING "extra_install_prefix")
+SET(EXTRA_INSTALL_PREFIX
+ ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
+ CACHE STRING "extra_install_prefix"
+)
if (CMAKE_BUILD_TYPE STREQUAL "Release")
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -march=native -O3 -g")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -march=native -O3 -g")
elseif (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -march=native -O0 -g")
add_definitions(-DCLIB_DEBUG -fPIC -fstack-protector-all)
@@ -80,25 +83,30 @@ include_directories(SYSTEM)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DEXTRA_VPP_PLUGIN=1")
+
add_library(hicn_extra_plugin SHARED
- ${HICN_EXTRA_PLUGIN_SOURCE_FILES})
+ ${HICN_EXTRA_PLUGIN_SOURCE_FILES}
+)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/vpp_plugins)
set(VPP_INSTALL_PLUGIN ${EXTRA_INSTALL_PREFIX}/vpp_plugins)
set_target_properties(hicn_extra_plugin
- PROPERTIES
- LINKER_LANGUAGE C
- INSTALL_RPATH ${VPP_INSTALL_PLUGIN}
- PREFIX ""
- LIBRARY_OUTPUT_NAME "hicn_router")
+ PROPERTIES
+ LINKER_LANGUAGE C
+ INSTALL_RPATH ${VPP_INSTALL_PLUGIN}
+ PREFIX ""
+ LIBRARY_OUTPUT_NAME "hicn_router"
+)
install(DIRECTORY
- DESTINATION ${VPP_INSTALL_PLUGIN}
- COMPONENT ${HICN_EXTRA_PLUGIN})
+ DESTINATION ${VPP_INSTALL_PLUGIN}
+ COMPONENT ${HICN_EXTRA_PLUGIN}
+)
install(TARGETS hicn_extra_plugin
- DESTINATION
- ${VPP_INSTALL_PLUGIN}
- COMPONENT ${HICN_EXTRA_PLUGIN})
+ DESTINATION
+ ${VPP_INSTALL_PLUGIN}
+ COMPONENT ${HICN_EXTRA_PLUGIN}
+)
diff --git a/utils/extras/README.md b/extras/hicn-extra-plugin/README.md
index 40363ef18..40363ef18 100644
--- a/utils/extras/README.md
+++ b/extras/hicn-extra-plugin/README.md
diff --git a/utils/extras/cmake/Modules/Packaging.cmake b/extras/hicn-extra-plugin/cmake/Modules/Packaging.cmake
index 69f63971f..69f63971f 100644
--- a/utils/extras/cmake/Modules/Packaging.cmake
+++ b/extras/hicn-extra-plugin/cmake/Modules/Packaging.cmake
diff --git a/utils/extras/devices/rtnetlink/mapper.c b/extras/hicn-extra-plugin/devices/rtnetlink/mapper.c
index ed4fa5634..ed4fa5634 100644
--- a/utils/extras/devices/rtnetlink/mapper.c
+++ b/extras/hicn-extra-plugin/devices/rtnetlink/mapper.c
diff --git a/utils/extras/devices/rtnetlink/mapper.h b/extras/hicn-extra-plugin/devices/rtnetlink/mapper.h
index 32e95d48f..32e95d48f 100644
--- a/utils/extras/devices/rtnetlink/mapper.h
+++ b/extras/hicn-extra-plugin/devices/rtnetlink/mapper.h
diff --git a/utils/extras/devices/rtnetlink/netns.c b/extras/hicn-extra-plugin/devices/rtnetlink/netns.c
index 19adb469a..19adb469a 100644
--- a/utils/extras/devices/rtnetlink/netns.c
+++ b/extras/hicn-extra-plugin/devices/rtnetlink/netns.c
diff --git a/utils/extras/devices/rtnetlink/netns.h b/extras/hicn-extra-plugin/devices/rtnetlink/netns.h
index 53effe5ce..53effe5ce 100644
--- a/utils/extras/devices/rtnetlink/netns.h
+++ b/extras/hicn-extra-plugin/devices/rtnetlink/netns.h
diff --git a/utils/extras/devices/rtnetlink/rtnl.c b/extras/hicn-extra-plugin/devices/rtnetlink/rtnl.c
index ed3db9e72..ed3db9e72 100644
--- a/utils/extras/devices/rtnetlink/rtnl.c
+++ b/extras/hicn-extra-plugin/devices/rtnetlink/rtnl.c
diff --git a/utils/extras/devices/rtnetlink/rtnl.h b/extras/hicn-extra-plugin/devices/rtnetlink/rtnl.h
index 3f96252c1..3f96252c1 100644
--- a/utils/extras/devices/rtnetlink/rtnl.h
+++ b/extras/hicn-extra-plugin/devices/rtnetlink/rtnl.h
diff --git a/utils/extras/devices/rtnetlink/test.c b/extras/hicn-extra-plugin/devices/rtnetlink/test.c
index 031748dd3..031748dd3 100644
--- a/utils/extras/devices/rtnetlink/test.c
+++ b/extras/hicn-extra-plugin/devices/rtnetlink/test.c
diff --git a/utils/extras/rtinject/tap_inject.c b/extras/hicn-extra-plugin/rtinject/tap_inject.c
index f41ae86c8..f41ae86c8 100644
--- a/utils/extras/rtinject/tap_inject.c
+++ b/extras/hicn-extra-plugin/rtinject/tap_inject.c
diff --git a/utils/extras/rtinject/tap_inject.h b/extras/hicn-extra-plugin/rtinject/tap_inject.h
index ec5121a09..ec5121a09 100644
--- a/utils/extras/rtinject/tap_inject.h
+++ b/extras/hicn-extra-plugin/rtinject/tap_inject.h
diff --git a/utils/extras/rtinject/tap_inject_netlink.c b/extras/hicn-extra-plugin/rtinject/tap_inject_netlink.c
index c0e0ce995..c0e0ce995 100644
--- a/utils/extras/rtinject/tap_inject_netlink.c
+++ b/extras/hicn-extra-plugin/rtinject/tap_inject_netlink.c
diff --git a/utils/extras/rtinject/tap_inject_node.c b/extras/hicn-extra-plugin/rtinject/tap_inject_node.c
index 73c296451..73c296451 100644
--- a/utils/extras/rtinject/tap_inject_node.c
+++ b/extras/hicn-extra-plugin/rtinject/tap_inject_node.c
diff --git a/utils/extras/rtinject/tap_inject_tap.c b/extras/hicn-extra-plugin/rtinject/tap_inject_tap.c
index a3ec9ffef..a3ec9ffef 100644
--- a/utils/extras/rtinject/tap_inject_tap.c
+++ b/extras/hicn-extra-plugin/rtinject/tap_inject_tap.c
diff --git a/extras/libmemif/CMakeLists.txt b/extras/libmemif/CMakeLists.txt
new file mode 100644
index 000000000..c9cea96f1
--- /dev/null
+++ b/extras/libmemif/CMakeLists.txt
@@ -0,0 +1,68 @@
+# Copyright (c) 2019 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set(CMAKE_MODULE_PATH
+ ${CMAKE_MODULE_PATH}
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/Modules"
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules"
+)
+
+include(ExternalProject)
+include(Packaging)
+
+if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
+ set(LIBMEMIF memif)
+endif()
+
+execute_process(
+ COMMAND bash -c "if [ ! -d vpp ]; then
+ git clone https://github.com/FDio/vpp.git -b stable/1908 vpp;
+ else
+ pushd vpp && git pull && popd;
+ fi"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+execute_process(
+ COMMAND ${CMAKE_COMMAND} -E
+ remove_directory ${CMAKE_CURRENT_BINARY_DIR}/libmemif
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+execute_process(
+ COMMAND ${CMAKE_COMMAND} -E
+ copy_directory vpp/extras/libmemif ${CMAKE_CURRENT_BINARY_DIR}/libmemif
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+execute_process(
+ COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_CURRENT_BINARY_DIR}/libmemif/src
+ ${CMAKE_CURRENT_BINARY_DIR}/libmemif/memif
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+execute_process(
+ COMMAND
+ ${CMAKE_COMMAND} -E
+ copy ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists1.patch libmemif/CMakeLists.txt
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+execute_process(
+ COMMAND ${CMAKE_COMMAND} -E
+ copy ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists2.patch libmemif/memif/CMakeLists.txt
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+include(Packaging)
+add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/libmemif ${CMAKE_CURRENT_BINARY_DIR}/libmemif) \ No newline at end of file
diff --git a/extras/libmemif/CMakeLists1.patch b/extras/libmemif/CMakeLists1.patch
new file mode 100644
index 000000000..f699a3ce5
--- /dev/null
+++ b/extras/libmemif/CMakeLists1.patch
@@ -0,0 +1,58 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
+
+project(memif)
+set(CMAKE_C_STANDARD 11)
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+
+include(CheckCCompilerFlag)
+include(CheckFunctionExists)
+
+execute_process(
+ COMMAND find ${VPP_SRC} -type d -name "cmake"
+ OUTPUT_VARIABLE CMAKE_DEPS_FOLDER
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+include(BuildMacros)
+
+if (NOT CMAKE_BUILD_TYPE)
+ message(STATUS "${PROJECT_NAME}: No build type selected, default to Release")
+ set(CMAKE_BUILD_TYPE "Release")
+endif ()
+
+set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -DMEMIF_DBG -DICMP_DBG")
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
+set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+set(CMAKE_INSTALL_MESSAGE NEVER)
+
+find_package(Threads REQUIRED)
+include_directories(${CMAKE_THREADS_INCLUDE_DIRS})
+
+check_function_exists(memfd_create HAVE_MEMFD_CREATE)
+if(${HAVE_MEMFD_CREATE})
+ add_definitions(-DHAVE_MEMFD_CREATE)
+endif()
+
+include_directories(src)
+set(LIBMEMIF memif)
+
+set(LIBMEMIF_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ "" CACHE INTERNAL
+ "" FORCE
+)
+
+add_subdirectory(memif) \ No newline at end of file
diff --git a/extras/libmemif/CMakeLists2.patch b/extras/libmemif/CMakeLists2.patch
new file mode 100644
index 000000000..69a7e773b
--- /dev/null
+++ b/extras/libmemif/CMakeLists2.patch
@@ -0,0 +1,42 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
+
+set(HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+
+list(APPEND MEMIF_HEADERS
+ libmemif.h
+ memif.h
+)
+
+list(APPEND MEMIF_PRIVATE_HEADERS
+ memif_private.h
+ socket.h
+)
+
+list(APPEND MEMIF_SOURCES
+ main.c
+ socket.c
+)
+
+include_directories(${HEADERS_DIR})
+
+build_library(${LIBMEMIF}
+ SHARED
+ SOURCES ${MEMIF_SOURCES}
+ INSTALL_HEADERS ${MEMIF_HEADERS}
+ LINK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}
+ INSTALL_ROOT_DIR memif
+ COMPONENT libmemif
+) \ No newline at end of file
diff --git a/extras/libmemif/cmake/Modules/Packaging.cmake b/extras/libmemif/cmake/Modules/Packaging.cmake
new file mode 100644
index 000000000..d6db75a72
--- /dev/null
+++ b/extras/libmemif/cmake/Modules/Packaging.cmake
@@ -0,0 +1,29 @@
+# Copyright (c) 2017-2019 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+######################
+# Packages section
+######################
+
+set(${LIBMEMIF}_DESCRIPTION
+ "Libmemif, shared memory interface"
+ CACHE STRING "Description for deb/rpm package."
+)
+
+set(${LIBMEMIF}_DEB_DEPENDENCIES
+ "" CACHE STRING "Dependencies for deb/rpm package."
+)
+
+set(${LIBMEMIF}_RPM_DEPENDENCIES
+ "" CACHE STRING "Dependencies for deb/rpm package."
+)
diff --git a/hicn-light/CMakeLists.txt b/hicn-light/CMakeLists.txt
index 31d189a3b..9edb146e4 100644
--- a/hicn-light/CMakeLists.txt
+++ b/hicn-light/CMakeLists.txt
@@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(hicn-light)
if (NOT CMAKE_BUILD_TYPE)
- message(STATUS "No build type selected, default to Release")
+ message(STATUS "${PROJECT_NAME}: No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif()
diff --git a/hicn-plugin/CMakeLists.txt b/hicn-plugin/CMakeLists.txt
index 15df64952..4a6d5e47d 100644
--- a/hicn-plugin/CMakeLists.txt
+++ b/hicn-plugin/CMakeLists.txt
@@ -207,12 +207,29 @@ elseif (CMAKE_BUILD_TYPE STREQUAL "Debug")
endif()
execute_process(COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/hicn)
+
# These files are missing from vpp binary distribution
execute_process(
- COMMAND curl https://git.fd.io/vpp/plain/src/vpp-api/vapi/vapi_json_parser.py?h=stable/1908 -o ${CMAKE_BINARY_DIR}/vapi_json_parser.py
- COMMAND curl https://git.fd.io/vpp/plain/src/vpp-api/vapi/vapi_c_gen.py?h=stable/1908 -o ${CMAKE_BINARY_DIR}/vapi_c_gen.py
- COMMAND curl https://git.fd.io/vpp/plain/src/vpp-api/vapi/vapi_cpp_gen.py?h=stable/1908 -o ${CMAKE_BINARY_DIR}/vapi_cpp_gen.py
- )
+ COMMAND
+ bash -c
+ "if [ ! -e ${CMAKE_BINARY_DIR}/vapi_json_parser.py ]; then
+ curl https://git.fd.io/vpp/plain/src/vpp-api/vapi/vapi_json_parser.py?h=stable/1908 -o ${CMAKE_BINARY_DIR}/vapi_json_parser.py;
+ fi;"
+)
+execute_process(
+ COMMAND
+ bash -c
+ "if [ ! -e ${CMAKE_BINARY_DIR}/vapi_c_gen.py ]; then
+ curl https://git.fd.io/vpp/plain/src/vpp-api/vapi/vapi_c_gen.py?h=stable/1908 -o ${CMAKE_BINARY_DIR}/vapi_c_gen.py;
+ fi;"
+)
+execute_process(
+ COMMAND
+ bash -c
+ "if [ ! -e ${CMAKE_BINARY_DIR}/vapi_cpp_gen.py ]; then
+ curl https://git.fd.io/vpp/plain/src/vpp-api/vapi/vapi_cpp_gen.py?h=stable/1908 -o ${CMAKE_BINARY_DIR}/vapi_cpp_gen.py;
+ fi;"
+)
add_custom_command(
COMMAND chmod +x ${CMAKE_BINARY_DIR}/vapi_json_parser.py ${CMAKE_BINARY_DIR}/vapi_c_gen.py ${CMAKE_BINARY_DIR}/vapi_cpp_gen.py
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 4c51f3daf..9d8267f5f 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -22,7 +22,7 @@ set(CMAKE_MODULE_PATH
)
if (NOT CMAKE_BUILD_TYPE)
- message(STATUS "No build type selected, default to Release")
+ message(STATUS "${PROJECT_NAME}: No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif()
@@ -36,7 +36,7 @@ include (Packaging)
option(CMAKE_BUILD_TEST "Build unit tests" OFF)
if (NOT CMAKE_BUILD_TYPE)
- message(STATUS "No build type selected, default to Release")
+ message(STATUS "${PROJECT_NAME}: No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif()
diff --git a/libtransport/CMakeLists.txt b/libtransport/CMakeLists.txt
index fb059e390..68e9efe77 100644
--- a/libtransport/CMakeLists.txt
+++ b/libtransport/CMakeLists.txt
@@ -25,7 +25,7 @@ include(DefaultConfiguration)
include(BuildMacros)
if (NOT CMAKE_BUILD_TYPE)
- message(STATUS "No build type selected, default to Release")
+ message(STATUS "${PROJECT_NAME}: No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif ()
@@ -58,15 +58,9 @@ set(INSTALL_INCLUDE_DIR include/hicn/transport)
if ((BUILD_HICNPLUGIN OR BUILD_MEMIF_CONNECTOR) AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
set(__vpp__ 1)
find_package(Vpp REQUIRED)
- find_package(Libmemif REQUIRED)
+
list(APPEND LIBTRANSPORT_INTERNAL_INCLUDE_DIRS
${VPP_INCLUDE_DIRS}
- ${LIBMEMIF_INCLUDE_DIRS}
- )
-
- list(APPEND LIBRARIES
- # ${VPP_INCLUDE_DIRS}
- ${LIBMEMIF_LIBRARIES}
)
endif ()
@@ -76,33 +70,54 @@ find_package_wrapper(Libparc REQUIRED)
find_package_wrapper(Asio REQUIRED)
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
- find_package_wrapper(Libhicn REQUIRED)
if (__vpp__)
find_package_wrapper(HicnBinaryApi REQUIRED)
+ find_package(Libmemif REQUIRED)
+
+ list(APPEND LIBRARIES
+ ${LIBMEMIF_LIBRARIES}
+ )
endif()
+
+ find_package_wrapper(Libhicn REQUIRED)
+
set(LIBTRANSPORT hicntransport)
set(LIBTRANSPORT_SHARED ${LIBTRANSPORT}.shared)
set(LIBTRANSPORT_STATIC ${LIBTRANSPORT}.static)
else()
- if (ANDROID_API)
+ if(ANDROID_API)
set(HICN_LIBRARIES ${LIBHICN_STATIC})
list(APPEND DEPENDENCIES
${LIBHICN_STATIC}
)
- else ()
+ else()
set(HICN_LIBRARIES ${LIBHICN_SHARED})
list(APPEND DEPENDENCIES
${LIBHICN_SHARED}
)
- endif ()
- if (__vpp__)
- list(APPEND DEPENDENCIES
- hicn_plugin
- )
+ if (__vpp__)
+ list(APPEND DEPENDENCIES
+ hicn_plugin
+ )
+
+ if (NOT Libmemif_FOUND)
+ list(APPEND DEPENDENCIES
+ ${LIBMEMIF_SHARED}
+ )
+
+ list(APPEND LIBRARIES
+ ${LIBMEMIF_SHARED}
+ )
+ endif()
+ endif()
endif()
endif()
+list(APPEND LIBTRANSPORT_INTERNAL_INCLUDE_DIRS
+ ${LIBMEMIF_INCLUDE_DIRS}
+)
+
include(Packaging)
find_package(Threads REQUIRED)
diff --git a/libtransport/cmake/Modules/Packaging.cmake b/libtransport/cmake/Modules/Packaging.cmake
index c7ba3d06d..bd6bfc11a 100644
--- a/libtransport/cmake/Modules/Packaging.cmake
+++ b/libtransport/cmake/Modules/Packaging.cmake
@@ -32,22 +32,22 @@ set(lib${LIBTRANSPORT}-devel_DESCRIPTION ${lib${LIBTRANSPORT}_DESCRIPTION}
if ((BUILD_MEMIF_CONNECTOR OR BUILD_HICNPLUGIN) AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
set(lib${LIBTRANSPORT}_DEB_DEPENDENCIES
- "lib${LIBHICN} (>= stable_version), libparc (>= 1.0), vpp (>= stable_version-release), vpp (<< next_version-release)"
+ "lib${LIBHICN} (>= stable_version), libparc (>= 1.0), libmemif (>= stable_version), vpp (>= stable_version-release), vpp (<< next_version-release)"
CACHE STRING "Dependencies for deb/rpm package."
)
set(lib${LIBTRANSPORT}_RPM_DEPENDENCIES
- "lib${LIBHICN} >= stable_version, libparc >= 1.0, vpp >= stable_version-release, vpp < next_version-release"
+ "lib${LIBHICN} >= stable_version, libparc >= 1.0, libmemif >= stable_version, vpp >= stable_version-release, vpp < next_version-release"
CACHE STRING "Dependencies for deb/rpm package."
)
set(lib${LIBTRANSPORT}-dev_DEB_DEPENDENCIES
- "lib${LIBTRANSPORT} (>= stable_version), libasio-dev (>= 1.10), libhicn-dev (>= stable_version), libparc-dev (>= 1.0), vpp-dev (>= stable_version-release), vpp-dev (<< next_version-release)"
+ "lib${LIBTRANSPORT} (>= stable_version), libasio-dev (>= 1.10), libhicn-dev (>= stable_version), libmemif-dev (>= stable_version), libparc-dev (>= 1.0), vpp-dev (>= stable_version-release), vpp-dev (<< next_version-release)"
CACHE STRING "Dependencies for deb/rpm package."
)
set(lib${LIBTRANSPORT}-dev_RPM_DEPENDENCIES
- "lib${LIBTRANSPORT} >= stable_version, asio-devel >= 1.10, lib${LIBHICN}-devel >= stable_version, libparc-devel >= 1.0, vpp-devel >= stable_version-release, vpp-devel < next_version-release"
+ "lib${LIBTRANSPORT} >= stable_version, asio-devel >= 1.10, lib${LIBHICN}-devel >= stable_version, libmemif-devel >= stable_version, libparc-devel >= 1.0, vpp-devel >= stable_version-release, vpp-devel < next_version-release"
CACHE STRING "Dependencies for deb/rpm package."
)
diff --git a/scripts/build-packages.sh b/scripts/build-packages.sh
index 45e2ddf92..c9856a0a0 100644
--- a/scripts/build-packages.sh
+++ b/scripts/build-packages.sh
@@ -24,8 +24,8 @@ PACKAGECLOUD_RELEASE_REPO_RPM="https://packagecloud.io/install/repositories/fdio
VPP_GIT_REPO="https://git.fd.io/vpp"
VPP_BRANCH="stable/1908"
-VPP_VERSION_DEB="19.08-release"
-VPP_VERSION_RPM="19.08-release.x86_64"
+VPP_VERSION_DEB="19.08.1-release"
+VPP_VERSION_RPM="19.08.1-release.x86_64"
BUILD_TOOLS_UBUNTU="build-essential doxygen"
LIBSSL_LIBEVENT_UBUNTU="libevent-dev libssl-dev"
@@ -73,19 +73,6 @@ setup_fdio_repo() {
fi
}
-MEMIF_HOME=""
-build_libmemif_static() {
- git clone ${VPP_GIT_REPO} -b ${VPP_BRANCH} vpp
- pushd vpp
- sed 's/SHARED/STATIC/g' src/cmake/library.cmake -i
- mkdir -p build-root/build-libmemif && pushd build-root/build-libmemif
- cmake ../../extras/libmemif/ -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_INSTALL_PREFIX=.
- make install
- MEMIF_HOME="$(pwd)"
- popd
- popd
-}
-
setup() {
# Figure out what system we are running on
if [ -f /etc/os-release ]; then
@@ -126,8 +113,6 @@ setup() {
export CC=${CC_COMPILER} CXX=${CXX_COMPILER}
fi
- build_libmemif_static
-
# do nothing but check compiler version
c++ --version
}
@@ -156,7 +141,6 @@ build_package() {
-DBUILD_HICNEXTRAPLUGIN=ON \
-DBUILD_LIBTRANSPORT=ON \
-DBUILD_APPS=ON \
- -DLIBMEMIF_HOME=${MEMIF_HOME} \
${SCRIPT_PATH}/..
make package
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index ad81427e7..5fc071734 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -23,7 +23,7 @@ set(CMAKE_MODULE_PATH
)
if (NOT CMAKE_BUILD_TYPE)
- message(STATUS "No build type selected, default to Release")
+ message(STATUS "${PROJECT_NAME}: No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif ()