diff mbox series

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

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

Commit Message

Github ODP bot Sept. 8, 2017, 2 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: 360c1d34b52a2356619b9290811862b9de41de00
 ** Merge commit sha: e19cce86ab00ccd959d2c3c82c0786ec6da19ba7
 **/
 .../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 41468becf..96379ebf9 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;