diff mbox series

[API-NEXT,v1,16/19] linux-gen: packet: compress packet offset table

Message ID 1505422809-5632-17-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v1,1/19] travis: fix powerpc test name | expand

Commit Message

Github ODP bot Sept. 14, 2017, 9 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>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
/** Email created from pull request 179 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/179
 ** Patch: https://github.com/Linaro/odp/pull/179.patch
 ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1
 ** Merge commit sha: ada61f5ba5f940d03a95893940c21028d4c75d19
 **/
 .../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;