diff mbox

linux-generic: packets: disable offset adjustments

Message ID 1418781435-20628-1-git-send-email-bill.fischofer@linaro.org
State New
Headers show

Commit Message

Bill Fischofer Dec. 17, 2014, 1:57 a.m. UTC
Disable packet offset adjustments on packet head push/pull operations
as requested by Petri

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 platform/linux-generic/include/odp_packet_internal.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h
index 515c127..068f969 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -198,13 +198,15 @@  static inline void *packet_map(odp_packet_hdr_t *pkt_hdr,
 			  pkt_hdr->headroom + pkt_hdr->frame_len);
 }
 
+#define ENABLE_OFFSET_UPDATES 0
+
 #define pull_offset(x, len) do { \
-	if (x != ODP_PACKET_OFFSET_INVALID) \
+	if (ENABLE_OFFSET_UPDATES && x != ODP_PACKET_OFFSET_INVALID) \
 		x = x < len ? ODP_PACKET_OFFSET_INVALID : x - len; \
 	} while (0)
 
 #define push_offset(x, len) do { \
-	if (x != ODP_PACKET_OFFSET_INVALID) \
+	if (ENABLE_OFFSET_UPDATES && x != ODP_PACKET_OFFSET_INVALID) \
 		x += len; \
 	} while (0)