From 62f7b46d4c49d6e5bfb5b3b537bfcaf6503e7bac Mon Sep 17 00:00:00 2001 From: Alberto Compagno Date: Thu, 21 Nov 2019 11:59:54 +0000 Subject: [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 Change-Id: I8776c86952d50900aa504dd22aec521ed25c1dae --- hicn-plugin/src/hicn.api | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'hicn-plugin/src/hicn.api') diff --git a/hicn-plugin/src/hicn.api b/hicn-plugin/src/hicn.api index 2f33c901b..ba776c5f6 100644 --- a/hicn-plugin/src/hicn.api +++ b/hicn-plugin/src/hicn.api @@ -747,6 +747,18 @@ define hicn_api_register_prod_app_reply u32 faceid; }; +autoreply define hicn_api_face_prod_del +{ + /* Client identifier, set from api_main.my_client_index */ + u32 client_index; + + /* Arbitrary context, so client can match reply to request */ + u32 context; + + /* A Face ID to be deleted */ + u32 faceid; +}; + define hicn_api_register_cons_app { /* Client identifier, set from api_main.my_client_index */ @@ -774,6 +786,21 @@ define hicn_api_register_cons_app_reply vl_api_address_t src_addr6; /* Return value: new Face ID, ~0 means no Face was created */ + u32 faceid1; + + /* Return value: new Face ID, ~0 means no Face was created */ + u32 faceid2; +}; + +autoreply define hicn_api_face_cons_del +{ + /* Client identifier, set from api_main.my_client_index */ + u32 client_index; + + /* Arbitrary context, so client can match reply to request */ + u32 context; + + /* A Face ID to be deleted */ u32 faceid; }; -- cgit 1.2.3-korg