aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-05-19 11:46:19 +0200
committerAlberto Compagno <acompagn+fdio@cisco.com>2019-05-19 11:46:19 +0200
commite5d00b3fdb6294cfa0e65082885575029a3b5b8b (patch)
tree330b3138463b2ba6a5464ae04dde8b8dd4b025b5 /hicn-plugin/src
parentc4ead399d98d0f9084d6be1c3a44e27e8158b26a (diff)
[HICN-197] Reworked PIT/CS entry initialization to correctly initialize it when data are pushed to the CS from a local application.
Change-Id: I64a2bab413e74460b048f7c716630d9fcd5200cc Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src')
-rw-r--r--hicn-plugin/src/data_push_node.c2
-rw-r--r--hicn-plugin/src/pcs.h8
2 files changed, 9 insertions, 1 deletions
diff --git a/hicn-plugin/src/data_push_node.c b/hicn-plugin/src/data_push_node.c
index 8f9e137f7..8f9ecbb8e 100644
--- a/hicn-plugin/src/data_push_node.c
+++ b/hicn-plugin/src/data_push_node.c
@@ -128,7 +128,7 @@ hicn_new_data (vlib_main_t * vm, hicn_data_push_runtime_t * rt,
}
pitp = hicn_pit_get_data (nodep);
- hicn_pit_init_data (pitp);
+ hicn_cs_init_data (pitp);
pitp->shared.create_time = tnow;
if (dmsg_lifetime < HICN_PARAM_CS_LIFETIME_MIN
diff --git a/hicn-plugin/src/pcs.h b/hicn-plugin/src/pcs.h
index f87cccf8a..b9b40a3fb 100644
--- a/hicn-plugin/src/pcs.h
+++ b/hicn-plugin/src/pcs.h
@@ -256,6 +256,14 @@ hicn_pit_init_data (hicn_pcs_entry_t * p)
p->u.pit.faces.next_bucket = face_bkt - hicn_face_bucket_pool;
}
+/* Init pit/cs data block (usually inside hash table node) */
+static inline void
+hicn_cs_init_data (hicn_pcs_entry_t * p)
+{
+ p->shared.entry_flags = 0;
+ p->u.pit.faces.n_faces = 0;
+ p->u.pit.faces.is_overflow = 0;
+}
static inline f64