diff options
author | Enrico Loparco (eloparco) <eloparco@cisco.com> | 2021-06-24 09:15:41 +0200 |
---|---|---|
committer | Enrico Loparco (eloparco) <eloparco@cisco.com> | 2021-06-24 09:15:41 +0200 |
commit | 229385955109b866a23c4ac2aa03d4d11044c39d (patch) | |
tree | 0591f9c2fc4144d62330337cc2b94c63dfeded54 /hicn-plugin/src/cache_policies | |
parent | 6ffbb5ed61733b8dbef39b1a9d437e899e9359d7 (diff) |
[HICN-708] Rebase with master
Signed-off-by: Enrico Loparco (eloparco) <eloparco@cisco.com>
Change-Id: I2122e1d61dd3b2e039972624ffbdbcb3c5610159
Diffstat (limited to 'hicn-plugin/src/cache_policies')
-rw-r--r-- | hicn-plugin/src/cache_policies/cs_lru.h | 9 | ||||
-rw-r--r-- | hicn-plugin/src/cache_policies/cs_policy.h | 16 |
2 files changed, 22 insertions, 3 deletions
diff --git a/hicn-plugin/src/cache_policies/cs_lru.h b/hicn-plugin/src/cache_policies/cs_lru.h index 0a58912d6..3bd18060d 100644 --- a/hicn-plugin/src/cache_policies/cs_lru.h +++ b/hicn-plugin/src/cache_policies/cs_lru.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 Cisco and/or its affiliates. + * Copyright (c) 2017-2020 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -20,6 +20,13 @@ #include "../hashtb.h" #include "cs_policy.h" +/** + * @file cs_lru.h + * + * This file implements the LRU policy for the CS + */ + + extern hicn_cs_policy_vft_t hicn_cs_lru; /* diff --git a/hicn-plugin/src/cache_policies/cs_policy.h b/hicn-plugin/src/cache_policies/cs_policy.h index c1a9a44c9..0bf745915 100644 --- a/hicn-plugin/src/cache_policies/cs_policy.h +++ b/hicn-plugin/src/cache_policies/cs_policy.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 Cisco and/or its affiliates. + * Copyright (c) 2017-2020 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -18,6 +18,13 @@ #include "../hashtb.h" +/** + * @file cs_policy.h + * + * This file provides the needed structures to implement a CS policy + */ + + /* * Structure */ @@ -41,7 +48,12 @@ struct hicn_cs_policy_s; /** * @brief Definition of the virtual functin table for a cache policy. * - * A cache policy must implement three functions: insert, update, delete, trim. + * A cache policy must implement all the following functions: + * - insert: add a new element + * - update: update the position of an existing element + * - dequeue: remove an element from the list + * - delete_get: return the next element that should be removed trim + * - flush: clean the cs */ typedef struct hicn_cs_policy_vft_s { |