summaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/cache_policies/cs_lru.h
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin/src/cache_policies/cs_lru.h')
-rw-r--r--hicn-plugin/src/cache_policies/cs_lru.h33
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__ */
/*