diff options
author | Mauro Sardara <msardara@cisco.com> | 2021-07-20 13:20:35 +0200 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2021-07-20 13:29:03 +0200 |
commit | b4353c871463c06ed47db1ed9c3106f9dd201838 (patch) | |
tree | dd8e670e597a4e10bf214adf926ade5f135ce52c /hicn-plugin/src/cache_policies/cs_lru.h | |
parent | f62e74657d802555db61345eaa46362b09b12e88 (diff) |
HICN-716 Upgrade to VPP 21.06
Also:
- Format hicn-plugin code
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: I0f4626fdeaf0fc5ae1f43904ca006b092e3e9d5f
Diffstat (limited to 'hicn-plugin/src/cache_policies/cs_lru.h')
-rw-r--r-- | hicn-plugin/src/cache_policies/cs_lru.h | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/hicn-plugin/src/cache_policies/cs_lru.h b/hicn-plugin/src/cache_policies/cs_lru.h index 3bd18060d..c939b45df 100644 --- a/hicn-plugin/src/cache_policies/cs_lru.h +++ b/hicn-plugin/src/cache_policies/cs_lru.h @@ -26,47 +26,40 @@ * This file implements the LRU policy for the CS */ - extern hicn_cs_policy_vft_t hicn_cs_lru; /* * Insert a new CS element at the head of the CS LRU */ -void -hicn_cs_lru_insert (hicn_pit_cs_t * pcs, hicn_hash_node_t * pnode, - hicn_pcs_entry_t * entry, hicn_cs_policy_t * lru); - +void hicn_cs_lru_insert (hicn_pit_cs_t *pcs, hicn_hash_node_t *pnode, + hicn_pcs_entry_t *entry, hicn_cs_policy_t *lru); /* * Dequeue an LRU element, for example when it has expired. */ -void -hicn_cs_lru_dequeue (hicn_pit_cs_t * pcs, hicn_hash_node_t * pnode, - hicn_pcs_entry_t * entry, hicn_cs_policy_t * lru); +void hicn_cs_lru_dequeue (hicn_pit_cs_t *pcs, hicn_hash_node_t *pnode, + hicn_pcs_entry_t *entry, hicn_cs_policy_t *lru); /* * Move a CS LRU element to the head, probably after it's been used. */ -void -hicn_cs_lru_update_head (hicn_pit_cs_t * pcs, hicn_hash_node_t * pnode, - hicn_pcs_entry_t * entry, hicn_cs_policy_t * lru); +void hicn_cs_lru_update_head (hicn_pit_cs_t *pcs, hicn_hash_node_t *pnode, + hicn_pcs_entry_t *entry, hicn_cs_policy_t *lru); -void -hicn_cs_lru_delete_get (hicn_pit_cs_t * p, hicn_cs_policy_t * policy, - hicn_hash_node_t ** node, hicn_pcs_entry_t ** pcs, - hicn_hash_entry_t ** hash_entry); +void hicn_cs_lru_delete_get (hicn_pit_cs_t *p, hicn_cs_policy_t *policy, + hicn_hash_node_t **node, hicn_pcs_entry_t **pcs, + hicn_hash_entry_t **hash_entry); /* * Remove a batch of nodes from the CS LRU, copying their node indexes into * the caller's array. We expect this is done when the LRU size exceeds the * CS's limit. Return the number of removed nodes. */ -int hicn_cs_lru_trim (hicn_pit_cs_t * pcs, u32 * node_list, int sz, - hicn_cs_policy_t * lru); - +int hicn_cs_lru_trim (hicn_pit_cs_t *pcs, u32 *node_list, int sz, + hicn_cs_policy_t *lru); -int hicn_cs_lru_flush (vlib_main_t * vm, struct hicn_pit_cs_s *pitcs, - hicn_cs_policy_t * state); +int hicn_cs_lru_flush (vlib_main_t *vm, struct hicn_pit_cs_s *pitcs, + hicn_cs_policy_t *state); #endif /* // __LRU_H__ */ /* |