aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2022-08-25 15:19:33 +0000
committerMauro Sardara <msardara@cisco.com>2022-08-26 09:22:06 +0000
commit456a47ffcfb256beaae0b04d9021035c0e154ace (patch)
tree71ac9a44716c50e6381425b80f6ece15a1086e9b /hicn-plugin
parent020099fdb3b1a0fa482f8813c7a7147c1720fbc8 (diff)
feat: resize hicn_buffer_t to 24 byes
Ref: HICN-746 Change-Id: I70d526aa81c158a128408cff7e7a2d8e09ceb01a Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'hicn-plugin')
-rw-r--r--hicn-plugin/src/CMakeLists.txt2
-rw-r--r--hicn-plugin/src/hicn.h30
2 files changed, 16 insertions, 16 deletions
diff --git a/hicn-plugin/src/CMakeLists.txt b/hicn-plugin/src/CMakeLists.txt
index 3b89e4b53..e05ba1fec 100644
--- a/hicn-plugin/src/CMakeLists.txt
+++ b/hicn-plugin/src/CMakeLists.txt
@@ -180,7 +180,7 @@ set(COMPILE_DEFINITIONS
if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
list(APPEND COMPILE_DEFINITIONS
"-DHICN_DDEBUG"
- # "-DCLIB_DEBUG"
+ "-DCLIB_DEBUG"
)
endif()
diff --git a/hicn-plugin/src/hicn.h b/hicn-plugin/src/hicn.h
index 84d268357..3d8aa2998 100644
--- a/hicn-plugin/src/hicn.h
+++ b/hicn-plugin/src/hicn.h
@@ -68,31 +68,31 @@ typedef struct
u32 dpo_ctx_id;
/**
- * hICN buffer flags (1)
+ * Cached packet info
*/
- u8 flags;
+ u16 port;
+ u16 payload_type;
+ hicn_lifetime_t lifetime;
/**
* Ingress face (4)
*/
hicn_face_id_t face_id;
- /*
- hicn_packet_type_t type;
- hicn_packet_format_t format;
- hicn_name_t name;
- */
- u16 port;
- u16 payload_type;
- hicn_lifetime_t lifetime;
+ /**
+ * hICN buffer flags (1)
+ */
+ u8 flags;
} hicn_buffer_t;
-STATIC_ASSERT (offsetof (hicn_buffer_t, pcs_entry_id) == 28, "");
-STATIC_ASSERT (offsetof (hicn_buffer_t, vft_id) == 32, "");
-STATIC_ASSERT (offsetof (hicn_buffer_t, dpo_ctx_id) == 36, "");
-STATIC_ASSERT (offsetof (hicn_buffer_t, flags) == 40, "");
+STATIC_ASSERT (offsetof (hicn_buffer_t, pcs_entry_id) == 24, "");
+STATIC_ASSERT (offsetof (hicn_buffer_t, vft_id) == 28, "");
+STATIC_ASSERT (offsetof (hicn_buffer_t, dpo_ctx_id) == 32, "");
+STATIC_ASSERT (offsetof (hicn_buffer_t, port) == 36, "");
+STATIC_ASSERT (offsetof (hicn_buffer_t, payload_type) == 38, "");
+STATIC_ASSERT (offsetof (hicn_buffer_t, lifetime) == 40, "");
STATIC_ASSERT (offsetof (hicn_buffer_t, face_id) == 44, "");
-// STATIC_ASSERT (offsetof (hicn_buffer_t, name) == 48, "");
+STATIC_ASSERT (offsetof (hicn_buffer_t, flags) == 48, "");
// + name = 16+4 = 20
// opaque : u32[14] = 56
STATIC_ASSERT (sizeof (hicn_buffer_t) <=