Hi,

On Mon, 10 Nov 2014 22:49:25 -0600 Bill Fischofer <[email protected]> 
wrote:
> 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.

OK, this is fine.

So implementor MUST preserve the implicit offset "hint" provided by
user's headroom value (i.e. allowed to add extra number of headroom
bytes which is a multiple of an agreed alignment factor, preferrably
platform independent factor).

Meaning, such implementation isn't allowed:

#define IMPL_MAX_HEADROOM 128

    if (user_headroom > IMPL_MAX_HEADROOM)
        return -ERR_NOT_SUPP;
    actual_headroom = IMPL_MAX_HEADROOM; /* XXX: for ease of implementation */

This should be documented.

Regards,
Shmulik

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

Reply via email to