summaryrefslogtreecommitdiffstats
path: root/hicn-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin')
-rw-r--r--hicn-plugin/CMakeLists.txt8
-rw-r--r--hicn-plugin/src/data_fwd_node.c2
-rw-r--r--hicn-plugin/src/data_push_node.c2
-rw-r--r--hicn-plugin/src/strategy.c3
4 files changed, 9 insertions, 6 deletions
diff --git a/hicn-plugin/CMakeLists.txt b/hicn-plugin/CMakeLists.txt
index 01ac26c7c..e8347c150 100644
--- a/hicn-plugin/CMakeLists.txt
+++ b/hicn-plugin/CMakeLists.txt
@@ -222,16 +222,16 @@ execute_process(
COMMAND
bash -c
"if [ ! -e ${CMAKE_CURRENT_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_CURRENT_BINARY_DIR}/vapi_json_parser.py;
+ curl https://raw.githubusercontent.com/FDio/vpp/stable/1908/src/vpp-api/vapi/vapi_json_parser.py -o ${CMAKE_CURRENT_BINARY_DIR}/vapi_json_parser.py;
fi;
if [ ! -e ${CMAKE_CURRENT_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_CURRENT_BINARY_DIR}/vapi_c_gen.py;
+ curl https://raw.githubusercontent.com/FDio/vpp/stable/1908/src/vpp-api/vapi/vapi_c_gen.py -o ${CMAKE_CURRENT_BINARY_DIR}/vapi_c_gen.py;
fi;
if [ ! -e ${CMAKE_CURRENT_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_CURRENT_BINARY_DIR}/vapi_cpp_gen.py;
+ curl https://raw.githubusercontent.com/FDio/vpp/stable/1908/src/vpp-api/vapi/vapi_cpp_gen.py -o ${CMAKE_CURRENT_BINARY_DIR}/vapi_cpp_gen.py;
fi;
if [ ! -e ${CMAKE_CURRENT_BINARY_DIR}/vnet/ip/ip_types.api ]; then
- curl https://git.fd.io/vpp/plain/src/vnet/ip/ip_types.api?h=stable/1908 -o ${CMAKE_CURRENT_BINARY_DIR}/vnet/ip/ip_types.api;
+ curl https://raw.githubusercontent.com/FDio/vpp/stable/1908/src/vnet/ip/ip_types.api -o ${CMAKE_CURRENT_BINARY_DIR}/vnet/ip/ip_types.api;
fi;
chmod +x ${CMAKE_CURRENT_BINARY_DIR}/vapi_json_parser.py ${CMAKE_CURRENT_BINARY_DIR}/vapi_c_gen.py ${CMAKE_CURRENT_BINARY_DIR}/vapi_cpp_gen.py"
)
diff --git a/hicn-plugin/src/data_fwd_node.c b/hicn-plugin/src/data_fwd_node.c
index ca3baaa0d..1bb064fcf 100644
--- a/hicn-plugin/src/data_fwd_node.c
+++ b/hicn-plugin/src/data_fwd_node.c
@@ -399,7 +399,7 @@ hicn_satisfy_faces (vlib_main_t * vm, u32 bi0,
* Mark the buffer as smaller than TWO_CL. It will be stored as is in the CS, without excluding
* the hicn_header. Cloning is not possible, it will be copied.
*/
- if (b0->current_length < (buffer_advance + (CLIB_CACHE_LINE_BYTES * 2)))
+ if (b0->current_length <= (buffer_advance + (CLIB_CACHE_LINE_BYTES * 2)))
{
/* In this case the packet is copied. We don't need to add a reference as no buffer are
* chained to it.
diff --git a/hicn-plugin/src/data_push_node.c b/hicn-plugin/src/data_push_node.c
index ff28b4dea..21ebae16f 100644
--- a/hicn-plugin/src/data_push_node.c
+++ b/hicn-plugin/src/data_push_node.c
@@ -74,7 +74,7 @@ prep_buffer_for_cs (vlib_main_t * vm, vlib_buffer_t * b0, u8 isv6)
* Mark the buffer as smaller than TWO_CL. It will be stored as is in the CS, without excluding
* the hicn_header. Cloning is not possible, it will be copied.
*/
- if (b0->current_length < (buffer_advance + (CLIB_CACHE_LINE_BYTES * 2)))
+ if (b0->current_length <= (buffer_advance + (CLIB_CACHE_LINE_BYTES * 2)))
{
/* In this case the packet is copied. We don't need to add a reference as no buffer are
* chained to it.
diff --git a/hicn-plugin/src/strategy.c b/hicn-plugin/src/strategy.c
index 62c2ddc8b..15c0dc720 100644
--- a/hicn-plugin/src/strategy.c
+++ b/hicn-plugin/src/strategy.c
@@ -117,6 +117,9 @@ hicn_new_interest (hicn_strategy_runtime_t * rt, vlib_buffer_t * b0,
hicn_store_internal_state (b0, hicnb0->name_hash, node_id0,
dpo_ctx_id0, vft_id0, hash_entry_id,
bucket_id, bucket_is_overflow);
+ // We need to take a lock as the lock is not taken on the hash
+ // entry because it is a CS entry (hash_insert function).
+ hash_entry->locks++;
*next =
is_cs0 ? HICN_STRATEGY_NEXT_INTEREST_HITCS :
HICN_STRATEGY_NEXT_INTEREST_HITPIT;