diff mbox series

[v2,9/11] linux-gen: packet: compress packet offset table

Message ID 1505221212-27163-10-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v2,1/11] linux-gen: packet: roll back to copy based references | expand

Commit Message

Github ODP bot Sept. 12, 2017, 1 p.m. UTC
From: Petri Savolainen <petri.savolainen@linaro.org>


Use uint16_t (instead of size_t) for offsets and thus decrease
size of the offset table into one fourth.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
/** Email created from pull request 170 (psavol:master-packet-ref-rework)
 ** https://github.com/Linaro/odp/pull/170
 ** Patch: https://github.com/Linaro/odp/pull/170.patch
 ** Base sha: fb3f36cec108ce9c55241d9f0e66d4832a552b8a
 ** Merge commit sha: bab9e010b5432ba0f2ff0651313a85a6a1b563c2
 **/
 .../include/odp/api/plat/packet_types.h            | 28 +++++++++++-----------
 1 file changed, 14 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/include/odp/api/plat/packet_types.h b/platform/linux-generic/include/odp/api/plat/packet_types.h
index 41468bec..96379ebf 100644
--- a/platform/linux-generic/include/odp/api/plat/packet_types.h
+++ b/platform/linux-generic/include/odp/api/plat/packet_types.h
@@ -74,33 +74,33 @@  typedef enum {
 /** @internal Packet header field offsets for inline functions */
 typedef struct _odp_packet_inline_offset_t {
 	/** @internal field offset */
-	size_t data;
+	uint16_t data;
 	/** @internal field offset */
-	size_t seg_len;
+	uint16_t seg_len;
 	/** @internal field offset */
-	size_t frame_len;
+	uint16_t frame_len;
 	/** @internal field offset */
-	size_t headroom;
+	uint16_t headroom;
 	/** @internal field offset */
-	size_t tailroom;
+	uint16_t tailroom;
 	/** @internal field offset */
-	size_t pool;
+	uint16_t pool;
 	/** @internal field offset */
-	size_t input;
+	uint16_t input;
 	/** @internal field offset */
-	size_t segcount;
+	uint16_t segcount;
 	/** @internal field offset */
-	size_t user_ptr;
+	uint16_t user_ptr;
 	/** @internal field offset */
-	size_t user_area;
+	uint16_t user_area;
 	/** @internal field offset */
-	size_t user_area_size;
+	uint16_t user_area_size;
 	/** @internal field offset */
-	size_t flow_hash;
+	uint16_t flow_hash;
 	/** @internal field offset */
-	size_t timestamp;
+	uint16_t timestamp;
 	/** @internal field offset */
-	size_t input_flags;
+	uint16_t input_flags;
 
 } _odp_packet_inline_offset_t;