I sent a patch to replace this one. It's better to remove offset manipulation 
code altogether than leave it there disabled.

-Petri



> -----Original Message-----
> From: [email protected] [mailto:lng-odp-
> [email protected]] On Behalf Of ext Bill Fischofer
> Sent: Wednesday, December 17, 2014 3:57 AM
> To: [email protected]
> Subject: [lng-odp] [PATCH] linux-generic: packets: disable offset
> adjustments
> 
> Disable packet offset adjustments on packet head push/pull operations
> as requested by Petri
> 
> Signed-off-by: Bill Fischofer <[email protected]>
> ---
>  platform/linux-generic/include/odp_packet_internal.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> 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)
> 
> --
> 1.8.3.2
> 
> 
> _______________________________________________
> lng-odp mailing list
> [email protected]
> http://lists.linaro.org/mailman/listinfo/lng-odp

_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to