diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-11-21 11:59:54 +0000 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-11-22 12:47:14 +0000 |
commit | 62f7b46d4c49d6e5bfb5b3b537bfcaf6503e7bac (patch) | |
tree | 35e206900cf6a1535df2b3439a55e0fdd9091a7f /libtransport/src | |
parent | ae6f3b8e1f55fc4bb7807c293850d3cb46cab1fd (diff) |
[HICN-405] Added application face delete
Added two new messages in the binary api:
- hicn_api_face_cons_del to delete a consumer face
- hicn_api_face_prod_del to delete a producer face
Added the corresponding commands in the vpp_api_test for debugging and testing
Reworked the cache policy structure to add a new function that flash the content store
from the content coming from the destroyed producer face. This is required since the CS
while each producer face has its own lru list. Removing only the producer face without
flushing the CS from the content coming from the producer face will lead to a segfault
in case there is a hit in the CS as the lru no longer exists and it won't be possible
to update the head of the lru.
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Change-Id: I8776c86952d50900aa504dd22aec521ed25c1dae
Diffstat (limited to 'libtransport/src')
-rw-r--r-- | libtransport/src/hicn/transport/core/hicn_binary_api.c | 3 | ||||
-rw-r--r-- | libtransport/src/hicn/transport/core/hicn_binary_api.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libtransport/src/hicn/transport/core/hicn_binary_api.c b/libtransport/src/hicn/transport/core/hicn_binary_api.c index aea2f09f7..17ffc5ebe 100644 --- a/libtransport/src/hicn/transport/core/hicn_binary_api.c +++ b/libtransport/src/hicn/transport/core/hicn_binary_api.c @@ -169,7 +169,8 @@ static void vl_api_hicn_api_register_cons_app_reply_t_handler( ip_address_decode(&mp->src_addr4, (ip46_address_t *)params->src4); ip_address_decode(&mp->src_addr6, (ip46_address_t *)params->src6); - params->face_id = clib_host_to_net_u32(mp->faceid); + params->face_id1 = clib_host_to_net_u32(mp->faceid1); + params->face_id2 = clib_host_to_net_u32(mp->faceid2); vpp_binary_api_unlock_waiting_thread(binary_api->vpp_api); } diff --git a/libtransport/src/hicn/transport/core/hicn_binary_api.h b/libtransport/src/hicn/transport/core/hicn_binary_api.h index 50590917f..323d22fea 100644 --- a/libtransport/src/hicn/transport/core/hicn_binary_api.h +++ b/libtransport/src/hicn/transport/core/hicn_binary_api.h @@ -47,7 +47,8 @@ typedef struct { typedef struct { ip_address_t* src4; ip_address_t* src6; - uint32_t face_id; + uint32_t face_id1; + uint32_t face_id2; } hicn_consumer_output_params; typedef struct { |