diff options
author | 2019-01-19 17:28:57 +0100 | |
---|---|---|
committer | 2019-01-19 17:35:54 +0100 | |
commit | c7f942175b8c25c77ddc21561b52e3e6b5620b80 (patch) | |
tree | d9cecc4574ae9ed2f4a9e041010c8794e6001363 /hicn-plugin/src/pcs.h | |
parent | d13d37534d9449dd54277af664310d5f957dc44a (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/pcs.h')
-rwxr-xr-x | hicn-plugin/src/pcs.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hicn-plugin/src/pcs.h b/hicn-plugin/src/pcs.h index 375a7d537..3ce40c9a3 100755 --- a/hicn-plugin/src/pcs.h +++ b/hicn-plugin/src/pcs.h @@ -247,7 +247,9 @@ hicn_pit_get_data (hicn_hash_node_t * node) static inline void hicn_pit_init_data (hicn_pcs_entry_t * p) { - memset (p, 0, sizeof (hicn_pcs_entry_t)); + p->shared.entry_flags = 0; + p->u.pit.faces.n_faces = 0; + p->u.pit.faces.is_overflow = 0; hicn_face_bucket_t *face_bkt; pool_get (hicn_face_bucket_pool, face_bkt); @@ -363,7 +365,6 @@ hicn_pcs_delete_internal (hicn_pit_cs_t * pitcs, } hicn_hashtb_delete (pitcs->pcs_table, node, hash_entry->he_msb64); - memset (*pcs_entryp, 0, sizeof (hicn_pcs_entry_t)); *pcs_entryp = NULL; } @@ -386,7 +387,6 @@ hicn_pit_to_cs (vlib_main_t * vm, hicn_pit_cs_t * pitcs, dpo_vft->hicn_dpo_unlock_dpo_ctx (hicn_dpo_id); /* Flush faces */ hicn_faces_flush (&(pcs_entry->u.pit.faces)); - memset (&(pcs_entry->u.cs), ~0, sizeof (hicn_cs_entry_t)); hash_entry->he_flags |= HICN_HASH_ENTRY_FLAG_CS_ENTRY; node->hn_flags |= HICN_HASH_NODE_CS_FLAGS; |