No, the suggestion is that implementations understand that the application
assumes buffers are "naturally aligned" so the implementation can infer the
requested alignment from the specified headroom request.  So for example if
the user requests a hr of 10 that means the user expects the packet to be
offset by two bytes from an 8 byte alignment.  The implementation is free
to add to the requested hr as long as the result preserves the implied
alignment from the original request.  So giving an hr of 18 or 26 is OK.

Bill

On Monday, November 10, 2014, Shmulik Ladkani <[email protected]>
wrote:

> On Mon, 10 Nov 2014 15:34:50 -0600 Bill Fischofer <
> [email protected] <javascript:;>> wrote:
> > As noted before, the application stipulated headroom and tailroom are the
> > minimums it expects to see honored.  If they cannot be, then the
> allocation
> > fails.  The implementation is free to give more than requested, but not
> > less.
>
> If that is the case, users must express their alignment requirements
> explicitly.
>
> Think of the following user code:
>
>     headroom = 32; /* suffices for my uses */
>     headroom += 2; /* make sure ETH ends in a word aligned boundary */
>     odp_buffer_pool_set_headroom(pool, headroom);
>
> Now, if implementation is _free_ to give "more than requested" in an
> implementation-specific arbitrary fashion, then user's _implicit_
> alignment requirement gets lost.
>
> Point is, if NO alignment requirement parameter is passed, meaning user
> utilizes the headroom parameter to tell the implementation where data
> needs to be placed, then the implementation must place the data exactly
> at the point specified by the user ("head" + headroom).
>
> Or alternatively, if implementation is allowed to add its own arbitrary
> headroom, then it must also follow user's requested alignment which must
> be stated explicitly.
>
> Regards,
> Shmulik
>
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to