diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2020-01-27 16:04:33 +0100 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2020-01-27 16:56:28 +0100 |
commit | b0768b35fb515b7c0a15c3c7d8c1227497c59786 (patch) | |
tree | 1e2b1318f680fffd555ddc26a48e4a4156b06dfc /libtransport/src/hicn/transport/core/vpp_forwarder_interface.h | |
parent | be54ac541c9700eaa9085bc8b4ee21b7a5f7e30a (diff) |
[HICN-488] Adding lock to vapi calls and manage vapi_connect in order to connect only once.
- Added library to hicn-plugin called safe_vapi that takes care of handling concurrent calls to the vapi.
- Removed dependency of libhicnctrl from libtransport and added dependency to safe_vapi.
- Added dependency to safe_vapi on libhicnctrl
Change-Id: Ie49e8319f64a50e7ed6a56e041db977c3b184cc5
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'libtransport/src/hicn/transport/core/vpp_forwarder_interface.h')
-rw-r--r-- | libtransport/src/hicn/transport/core/vpp_forwarder_interface.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libtransport/src/hicn/transport/core/vpp_forwarder_interface.h b/libtransport/src/hicn/transport/core/vpp_forwarder_interface.h index b9fd44dbe..da7507176 100644 --- a/libtransport/src/hicn/transport/core/vpp_forwarder_interface.h +++ b/libtransport/src/hicn/transport/core/vpp_forwarder_interface.h @@ -17,12 +17,15 @@ #include <hicn/transport/config.h> -extern "C" { -#include <hicn/ctrl.h> -} - #ifdef __vpp__ +#ifdef always_inline +#undef always_inline +#endif +extern "C" { +#include <vapi/vapi_safe.h> +}; + #include <hicn/transport/core/forwarder_interface.h> #include <hicn/transport/core/memif_connector.h> #include <hicn/transport/core/prefix.h> @@ -73,7 +76,7 @@ class VPPForwarderInterface uint32_t face_id1_; uint32_t face_id2_; bool is_consumer_; - hc_sock_t *sock_; + vapi_ctx_t *sock_; static std::mutex global_lock_; }; |