diff mbox

linux-generic: packets: bugfix: set l2_offset in _odp_packet_parse()

Message ID 1420582376-30228-1-git-send-email-bill.fischofer@linaro.org
State Accepted
Commit 8997fdd428114b617caed8b11b7571eace18a791
Headers show

Commit Message

Bill Fischofer Jan. 6, 2015, 10:12 p.m. UTC
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 platform/linux-generic/odp_packet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bill Fischofer Jan. 6, 2015, 10:15 p.m. UTC | #1
This patch corrects a bug identified by Stuart.  _odp_packet_parse() was
not setting l2_offset to anything other than ODP_PACKET_OFFSET_INVALID,
which caused downstream issues for callers of odp_packet_l2_ptr().  It
should be part of v0.7.

Bill

On Tue, Jan 6, 2015 at 4:12 PM, Bill Fischofer <bill.fischofer@linaro.org>
wrote:

> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
> ---
>  platform/linux-generic/odp_packet.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/platform/linux-generic/odp_packet.c
> b/platform/linux-generic/odp_packet.c
> index eb0767a..257abec 100644
> --- a/platform/linux-generic/odp_packet.c
> +++ b/platform/linux-generic/odp_packet.c
> @@ -778,7 +778,7 @@ int _odp_packet_parse(odp_packet_t pkt)
>         pkt_hdr->error_flags.all  = 0;
>         pkt_hdr->input_flags.all  = 0;
>         pkt_hdr->output_flags.all = 0;
> -       pkt_hdr->l2_offset        = ODP_PACKET_OFFSET_INVALID;
> +       pkt_hdr->l2_offset        = 0;
>         pkt_hdr->l3_offset        = ODP_PACKET_OFFSET_INVALID;
>         pkt_hdr->l4_offset        = ODP_PACKET_OFFSET_INVALID;
>         pkt_hdr->payload_offset   = ODP_PACKET_OFFSET_INVALID;
> --
> 2.1.0
>
>
Mike Holmes Jan. 9, 2015, 9:27 p.m. UTC | #2
Applied

- dropped bugfix from subject.
If it is a specific reported bug we should  put the link to the bug in the
body with a short description in case the bug tracker is gone in the
future.
- Added short description from email
- Added Reported-by Stuart


On 7 January 2015 at 05:49, Stuart Haslam <stuart.haslam@arm.com> wrote:

> On Tue, Jan 06, 2015 at 10:12:56PM +0000, Bill Fischofer wrote:
> > Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
>
> Reviewed-by: Stuart Haslam <stuart.haslam@arm.com>
>
> > ---
> >  platform/linux-generic/odp_packet.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/platform/linux-generic/odp_packet.c
> b/platform/linux-generic/odp_packet.c
> > index eb0767a..257abec 100644
> > --- a/platform/linux-generic/odp_packet.c
> > +++ b/platform/linux-generic/odp_packet.c
> > @@ -778,7 +778,7 @@ int _odp_packet_parse(odp_packet_t pkt)
> >       pkt_hdr->error_flags.all  = 0;
> >       pkt_hdr->input_flags.all  = 0;
> >       pkt_hdr->output_flags.all = 0;
> > -     pkt_hdr->l2_offset        = ODP_PACKET_OFFSET_INVALID;
> > +     pkt_hdr->l2_offset        = 0;
> >       pkt_hdr->l3_offset        = ODP_PACKET_OFFSET_INVALID;
> >       pkt_hdr->l4_offset        = ODP_PACKET_OFFSET_INVALID;
> >       pkt_hdr->payload_offset   = ODP_PACKET_OFFSET_INVALID;
> > --
> > 2.1.0
> >
> >
>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
diff mbox

Patch

diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c
index eb0767a..257abec 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -778,7 +778,7 @@  int _odp_packet_parse(odp_packet_t pkt)
 	pkt_hdr->error_flags.all  = 0;
 	pkt_hdr->input_flags.all  = 0;
 	pkt_hdr->output_flags.all = 0;
-	pkt_hdr->l2_offset        = ODP_PACKET_OFFSET_INVALID;
+	pkt_hdr->l2_offset        = 0;
 	pkt_hdr->l3_offset        = ODP_PACKET_OFFSET_INVALID;
 	pkt_hdr->l4_offset        = ODP_PACKET_OFFSET_INVALID;
 	pkt_hdr->payload_offset   = ODP_PACKET_OFFSET_INVALID;