https://patches.linaro.org/42375/ posted by Petri and scheduled to be part
of 0.6.0 makes it very clear that this is a spec change to the operation of
push/pull head operations, not tail operations.  As I said, no harm in this
check being part of the latter, but it needs to be part of the former.

Bill

On Fri, Dec 19, 2014 at 5:18 PM, Taras Kondratiuk <
[email protected]> wrote:
>
> On 12/20/2014 01:07 AM, Bill Fischofer wrote:
> >
> >
> > On Fri, Dec 19, 2014 at 2:56 PM, Taras Kondratiuk
> > <[email protected] <mailto:[email protected]>>
> wrote:
> >     +static void _verify_tailroom_shift(odp_packet_t pkt,
> >     +                                  int shift)
> >     +{
> >     +       odp_packet_seg_t seg;
> >     +       uint32_t room;
> >     +       uint32_t seg_data_len, pkt_data_len;
> >     +       void *tail;
> >     +       char *tail_orig;
> >     +
> >     +       room = odp_packet_tailroom(pkt);
> >     +       pkt_data_len = odp_packet_len(pkt);
> >     +       tail_orig = odp_packet_tail(pkt);
> >     +
> >     +       seg = odp_packet_last_seg(pkt);
> >     +       CU_ASSERT(seg != ODP_SEGMENT_INVALID);
> >     +       seg_data_len = odp_packet_seg_data_len(pkt, seg);
> >     +
> >     +       if (shift >= 0) {
> >     +               uint32_t l2_off, l3_off, l4_off;
> >     +               l2_off = odp_packet_l2_offset(pkt);
> >     +               l3_off = odp_packet_l3_offset(pkt);
> >     +               l4_off = odp_packet_l4_offset(pkt);
> >     +
> >     +               tail = odp_packet_push_tail(pkt, shift);
> >     +
> >     +               CU_ASSERT(l2_off == odp_packet_l2_offset(pkt));
> >     +               CU_ASSERT(l3_off == odp_packet_l3_offset(pkt));
> >     +               CU_ASSERT(l4_off == odp_packet_l4_offset(pkt));
> >
> >
> > No harm with these being here, but they need to be part of
> > _verify_headroom_shift() since that was the main area of the recent spec
> > change.
>
> Let's update specification to state this clearly first. Current
> specification require only odp_packet_push_tail() to keep offsets.
>
> --
> Taras Kondratiuk
>
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to