aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-08-22 10:00:17 +0000
committerGerrit Code Review <gerrit@fd.io>2019-08-22 10:00:17 +0000
commit7d14523ac8e0708e8877cce7f3a21a340740dd47 (patch)
tree3c131f3f52276c483967fadc44b365e2a80f3a7a
parentae1a51414080f89e5dcf2d0c1bf8cd51b38abf63 (diff)
parent3abde45db1b56c5876029964d10c889e0f1ddfbb (diff)
Merge "[HICN-263] DO_NOT_MERGE Updating hicn-plugin and libtransport to vpp_1908"
-rw-r--r--hicn-plugin/CMakeLists.txt8
-rw-r--r--hicn-plugin/README.md10
-rw-r--r--hicn-plugin/src/data_fwd.h4
-rw-r--r--hicn-plugin/src/strategy.c2
-rw-r--r--libtransport/src/hicn/transport/core/memif_connector.cc16
-rw-r--r--libtransport/src/hicn/transport/core/memif_connector.h2
-rw-r--r--scripts/build-packages.sh6
-rw-r--r--scripts/build-sysrepo.sh6
8 files changed, 30 insertions, 24 deletions
diff --git a/hicn-plugin/CMakeLists.txt b/hicn-plugin/CMakeLists.txt
index 04ca6df9b..15df64952 100644
--- a/hicn-plugin/CMakeLists.txt
+++ b/hicn-plugin/CMakeLists.txt
@@ -209,11 +209,9 @@ 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/1904 -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/1904 -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/1904 -o ${CMAKE_BINARY_DIR}/vapi_cpp_gen.py
- COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/vnet/adj
- COMMAND curl https://git.fd.io/vpp/plain/src/vnet/adj/adj_midchain.h?h=stable/1904 -o ${CMAKE_CURRENT_BINARY_DIR}/vnet/adj/adj_midchain.h
+ 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
)
add_custom_command(
diff --git a/hicn-plugin/README.md b/hicn-plugin/README.md
index d6a4dbc2d..8a9acae1c 100644
--- a/hicn-plugin/README.md
+++ b/hicn-plugin/README.md
@@ -64,14 +64,14 @@ hICN-plugin has been tested in:
Build dependencies:
-- VPP 19.04
+- VPP 19.08
- DEB packages (can be found https://packagecloud.io/fdio/release/install):
- libvppinfra-dev
- vpp-dev
Running dependencies:
-- VPP 19.04
+- VPP 19.08
- DEB packages (can be found https://packagecloud.io/fdio/release/install):
- vpp
- vpp-plugin-core
@@ -209,9 +209,9 @@ hicn face app {add intfc <sw_if> {prod prefix <hicn_prefix> cs_size <size_in_pac
`hicn face ip`: manipulates ip application faces in the forwarder.
```
-hicn face ip {add local <src_address> remote <dst_address> intfc <sw_if>} | {del id <face_id>}
- <src_address> :the IPv4 or IPv6 local IP address to bind to
- <dst_address> :the IPv4 or IPv6 address of the remote system
+hicn face ip {[add local <src_address>] remote <dst_address> intfc <sw_if>} | {del id <face_id>}
+ <src_address> :the IPv4 or IPv6 local IP address to bind to (not mandatory, if not specified the local address is one of the address assigned to sw_if)
+ <dst_address> :the IPv4 or IPv6 address of the remote system
<sw_if> :software interface on thop of which we create the face
<face_id> :id of the face to remove
```
diff --git a/hicn-plugin/src/data_fwd.h b/hicn-plugin/src/data_fwd.h
index c001e5af5..55434a024 100644
--- a/hicn-plugin/src/data_fwd.h
+++ b/hicn-plugin/src/data_fwd.h
@@ -83,7 +83,7 @@ vlib_buffer_clone_256_2 (vlib_main_t * vm, u32 src_buffer, u32 * buffers,
vlib_buffer_t *d = vlib_get_buffer (vm, buffers[i]);
d->current_data = s->current_data;
d->current_length = head_end_offset;
- d->trace_index = s->trace_index;
+ d->trace_handle = s->trace_handle;
d->total_length_not_including_first_buffer = s->current_length -
head_end_offset;
@@ -94,7 +94,7 @@ vlib_buffer_clone_256_2 (vlib_main_t * vm, u32 src_buffer, u32 * buffers,
}
d->flags = s->flags | VLIB_BUFFER_NEXT_PRESENT;
d->flags &= ~VLIB_BUFFER_EXT_HDR_VALID;
- d->trace_index = s->trace_index;
+ d->trace_handle = s->trace_handle;
clib_memcpy_fast (d->opaque, s->opaque, sizeof (s->opaque));
clib_memcpy_fast (d->opaque2, s->opaque2, sizeof (s->opaque2));
clib_memcpy_fast (vlib_buffer_get_current (d),
diff --git a/hicn-plugin/src/strategy.c b/hicn-plugin/src/strategy.c
index 747e155b1..a6c058e4f 100644
--- a/hicn-plugin/src/strategy.c
+++ b/hicn-plugin/src/strategy.c
@@ -186,7 +186,7 @@ hicn_forward_interest_fn (vlib_main_t * vm,
vlib_buffer_t *b1;
b1 = vlib_get_buffer (vm, from[1]);
CLIB_PREFETCH (b1, CLIB_CACHE_LINE_BYTES, LOAD);
- CLIB_PREFETCH (&b1->trace_index, 2 * CLIB_CACHE_LINE_BYTES,
+ CLIB_PREFETCH (&b1->trace_handle, 2 * CLIB_CACHE_LINE_BYTES,
STORE);
}
/* Dequeue a packet buffer */
diff --git a/libtransport/src/hicn/transport/core/memif_connector.cc b/libtransport/src/hicn/transport/core/memif_connector.cc
index a77f14839..43dfab345 100644
--- a/libtransport/src/hicn/transport/core/memif_connector.cc
+++ b/libtransport/src/hicn/transport/core/memif_connector.cc
@@ -139,14 +139,22 @@ int MemifConnector::createMemif(uint32_t index, uint8_t mode, char *s) {
args.num_m2s_rings = 1;
strncpy((char *)args.interface_name, IF_NAME, strlen(IF_NAME) + 1);
args.mode = memif_interface_mode_t::MEMIF_INTERFACE_MODE_IP;
- args.socket_filename = (uint8_t *)socket_filename_.c_str();
- TRANSPORT_LOGD("Socket filename: %s", args.socket_filename);
+ int err;
+
+ err= memif_create_socket (&args.socket, socket_filename_.c_str(),
+ nullptr);
+
+ if (TRANSPORT_EXPECT_FALSE(err != MEMIF_ERR_SUCCESS)) {
+ throw errors::RuntimeException(memif_strerror(err));
+ }
+
+ TRANSPORT_LOGD("Socket filename: %s", socket_filename_.c_str());
args.interface_id = index;
/* last argument for memif_create (void * private_ctx) is used by user
to identify connection. this context is returned with callbacks */
- int err;
+
/* default interrupt */
if (s == nullptr) {
err = memif_create(&c->conn, &args, onConnect, onDisconnect, onInterrupt,
@@ -204,7 +212,7 @@ int MemifConnector::deleteMemif() {
return 0;
}
-int MemifConnector::controlFdUpdate(int fd, uint8_t events) {
+int MemifConnector::controlFdUpdate(int fd, uint8_t events, void *private_ctx) {
/* convert memif event definitions to epoll events */
if (events & MEMIF_FD_EVENT_DEL) {
return MemifConnector::main_event_reactor_.delFileDescriptor(fd);
diff --git a/libtransport/src/hicn/transport/core/memif_connector.h b/libtransport/src/hicn/transport/core/memif_connector.h
index ef100e3fb..4f43c97ef 100644
--- a/libtransport/src/hicn/transport/core/memif_connector.h
+++ b/libtransport/src/hicn/transport/core/memif_connector.h
@@ -78,7 +78,7 @@ class MemifConnector : public Connector {
int deleteMemif();
- static int controlFdUpdate(int fd, uint8_t events);
+ static int controlFdUpdate(int fd, uint8_t events, void *private_ctx);
static int onConnect(memif_conn_handle_t conn, void *private_ctx);
diff --git a/scripts/build-packages.sh b/scripts/build-packages.sh
index aeb356e20..45e2ddf92 100644
--- a/scripts/build-packages.sh
+++ b/scripts/build-packages.sh
@@ -22,10 +22,10 @@ PACKAGECLOUD_RELEASE_REPO_DEB="https://packagecloud.io/install/repositories/fdio
PACKAGECLOUD_RELEASE_REPO_RPM="https://packagecloud.io/install/repositories/fdio/release/script.rpm.sh"
VPP_GIT_REPO="https://git.fd.io/vpp"
-VPP_BRANCH="stable/1904"
+VPP_BRANCH="stable/1908"
-VPP_VERSION_DEB="19.04.2-release"
-VPP_VERSION_RPM="19.04.2-release.x86_64"
+VPP_VERSION_DEB="19.08-release"
+VPP_VERSION_RPM="19.08-release.x86_64"
BUILD_TOOLS_UBUNTU="build-essential doxygen"
LIBSSL_LIBEVENT_UBUNTU="libevent-dev libssl-dev"
diff --git a/scripts/build-sysrepo.sh b/scripts/build-sysrepo.sh
index 4192f7e12..7d83cac14 100644
--- a/scripts/build-sysrepo.sh
+++ b/scripts/build-sysrepo.sh
@@ -23,10 +23,10 @@ PACKAGECLOUD_RELEASE_REPO_DEB="https://packagecloud.io/install/repositories/fdio
PACKAGECLOUD_RELEASE_REPO_RPM="https://packagecloud.io/install/repositories/fdio/release/script.rpm.sh"
VPP_GIT_REPO="https://git.fd.io/vpp"
-VPP_BRANCH="stable/1901"
+VPP_BRANCH="stable/1908"
-VPP_VERSION_DEB="19.04-release"
-VPP_VERSION_RPM="19.04-release.x86_64"
+VPP_VERSION_DEB="19.08-release"
+VPP_VERSION_RPM="19.08-release.x86_64"
BUILD_TOOLS_UBUNTU="build-essential doxygen"
LIBSSL_LIBEVENT_UBUNTU="libevent-dev libssl-dev"