summaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/hashtb.c
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-01-19 17:28:57 +0100
committerAlberto Compagno <acompagn+fdio@cisco.com>2019-01-19 17:35:54 +0100
commitc7f942175b8c25c77ddc21561b52e3e6b5620b80 (patch)
treed9cecc4574ae9ed2f4a9e041010c8794e6001363 /hicn-plugin/src/hashtb.c
parentd13d37534d9449dd54277af664310d5f957dc44a (diff)
Improved performance on data-fwd node:
- Removed full pit entry initialization in favor of a lighter initialization on few fields - Squeezed pit entry size in order to store only the number of incomplete faces (as set in HICN_PARAM_PIT_ENTRY_PHOPS_MAX). The bitmap size is now determined by HICN_PARAM_FACES_MAX and optimized to do a fast lookup Replaced the field is_appface with the field flags in the hicn_buffer_t: - is_appface is now a flag with value 0x01 (HICN_BUFFER_FLAGS_FACE_IS_APP) - Added flag HICN_BUFFER_FLAGS_PKT_LESS_TWO_CL (0x02) to handle the copy of pkt with length < than 2*CACHE_LINES (in this case cloning is prevented by the cloning function in vpp). Such flag is initialized by the incoming face of the pkt. Change-Id: Ia956fd5719a28ee29f7fa2fd23d283964743efd8 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/hashtb.c')
-rwxr-xr-xhicn-plugin/src/hashtb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hicn-plugin/src/hashtb.c b/hicn-plugin/src/hashtb.c
index 332da350d..0bdb91c0d 100755
--- a/hicn-plugin/src/hashtb.c
+++ b/hicn-plugin/src/hashtb.c
@@ -409,6 +409,8 @@ hicn_hashtb_init_entry (hicn_hash_entry_t * entry, u32 nodeidx,
/* Clear out some other fields in the entry */
entry->he_flags = 0;
entry->locks = locks;
+ entry->vft_id = 0;
+ entry->dpo_ctx_id = 0;
}
/*
@@ -506,6 +508,8 @@ loop_buckets:
node->bucket_id = current_bucket_id;
node->entry_idx = i;
+ (*hash_entry)->vft_id = *vft_id;
+ (*hash_entry)->dpo_ctx_id = *dpo_ctx_id;
if (is_overflow)
node->hn_flags |= HICN_HASH_NODE_OVERFLOW_BUCKET;
@@ -590,6 +594,8 @@ loop_buckets:
node->bucket_id = (newbkt - h->ht_overflow_buckets);
node->entry_idx = 1;
node->hn_flags |= HICN_HASH_NODE_OVERFLOW_BUCKET;
+ (*hash_entry)->vft_id = *vft_id;
+ (*hash_entry)->dpo_ctx_id = *dpo_ctx_id;
}
else
{
@@ -600,6 +606,8 @@ loop_buckets:
node->bucket_id = (newbkt - h->ht_overflow_buckets);
node->entry_idx = 0;
node->hn_flags |= HICN_HASH_NODE_OVERFLOW_BUCKET;
+ (*hash_entry)->vft_id = *vft_id;
+ (*hash_entry)->dpo_ctx_id = *dpo_ctx_id;
}
}