@@ -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)
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(-)