The posted patch aligns the requested user metadata to a multiple of 8
bytes and in fact rounds the requested size to a multiple of 8 as well.
The size returned by odp_packet_user_data_size() is the actual byte size
requested, however.

On Thu, Apr 16, 2015 at 7:18 AM, Ola Liljedahl <[email protected]>
wrote:

> On 16 April 2015 at 13:44, Savolainen, Petri (Nokia - FI/Espoo) <
> [email protected]> wrote:
>
>>
>>
>> > -----Original Message-----
>> > From: lng-odp [mailto:[email protected]] On Behalf Of
>> ext
>> > Taras Kondratiuk
>> > Sent: Thursday, April 16, 2015 12:07 PM
>> > To: Bill Fischofer; [email protected]
>> > Subject: Re: [lng-odp] [API-NEXT PATCHv4 2/6] api: pool: add user
>> metadata
>> > APIs
>> >
>> > On 04/10/2015 06:52 PM, Bill Fischofer wrote:
>> > > Signed-off-by: Bill Fischofer <[email protected]>
>> > > ---
>> > >   include/odp/api/pool.h | 4 ++++
>> > >   1 file changed, 4 insertions(+)
>> > >
>> > > diff --git a/include/odp/api/pool.h b/include/odp/api/pool.h
>> > > index 241b98a..0092132 100644
>> > > --- a/include/odp/api/pool.h
>> > > +++ b/include/odp/api/pool.h
>> > > @@ -76,6 +76,10 @@ typedef struct odp_pool_param_t {
>> > >                                              The maximum value is
>> defined by
>> > >
>> ODP_CONFIG_PACKET_SEG_LEN_MAX.
>> > >                                              Use 0 for default. */
>> > > +                   uint32_t udata_size; /**< User metadata size in
>> > > +                                           bytes. Specify as 0 if no
>> > > +                                           user metadata is to be
>> > > +                                           associated with the pkt */
>> >
>> > Should it be a minimum size of metadata? Implementation may round it up.
>>
>> Agree. No harm to let implementation to round it up.
>>
> The implementation does what it has to do (in order to work, in order to
> be efficient etc). The question is what is returned when you ask for the
> size of the user data. I say that the implementation should then return the
> specified size, not any rounded size. So any rounding would not be directly
> visible to the user.
>
>
>
>>
>> -Petri
>>
>> >
>> > >             } pkt;
>> > >             struct {
>> > >                     uint32_t num;    /**< Number of timeouts in the
>> pool */
>> > >
>> >
>> > _______________________________________________
>> > lng-odp mailing list
>> > [email protected]
>> > https://lists.linaro.org/mailman/listinfo/lng-odp
>> _______________________________________________
>> lng-odp mailing list
>> [email protected]
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
>
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to