Hi,

After thinking this again, it's cleaner for the API (and the user) if these two 
user metadata fields are kept separate (as they currently are). The 
user_ptr/_u64 is always present and user_data only when param.pkt.udata_size is 
non-zero. Implementations have different ways to store both of these into the 
packet descriptor (maybe pointer to user_data is not needed, but it can be 
found with a fixed offset, etc).

However the naming of these two could be cleaner (== highlight the 
dependencies):
- odp_packet_user_ptr/_u64()        could be renamed to 
odp_packet_userctx_ptr/_u64()
- odp_packet_user_data/_data_size() could be renamed to 
odp_packet_userarea/userarea_size()
- we should avoid confusion with similar terms in DPDK
  - mbuf.userdata == current odp_packet_user_ptr()
  - mbuf.udata64  == current odp_packet_user_u64()

Opinions? I can send a patch for renames and documentation improvements.


-Petri



> -----Original Message-----
> From: ext Zoltan Kiss [mailto:zoltan.k...@linaro.org]
> Sent: Tuesday, April 21, 2015 4:08 PM
> To: Bill Fischofer; lng-odp@lists.linaro.org; Savolainen, Petri (Nokia -
> FI/Espoo)
> Subject: Re: [lng-odp] [API-NEXT PATCHv4 0/6] Add packet user metadata
> support
> 
> It seems to me all questions were answered, is there anything which
> prevents applying this into master branch?
> Petri?
> 
> On 10/04/15 16:52, Bill Fischofer wrote:
> > v4 changes:
> > - Removed RFC status, patch is now ready for API-NEXT
> > - Added implementation of approved APIs
> > - Added user metadata tests to packet validation test
> >
> > v3 changes:
> > - Renamed odp_packet_user_metadata() to odp_packet_user_data()
> > - Split addr/size return, adding odp_packet_user_data_size()
> > - Moved udata_size to pkt structure within odp_pool_param_t
> >
> > v2 changes:
> > - Moved udata_size to odp_pool_param_t
> > - Renamed odp_packet_udata() to odp_packet_user_metadata()
> > - Removed odp_buffer_udata().  User metadata is for packets only
> >
> > RFC for proposed minimal API set for user metadata support
> > based on today's discussions.  Note that all initialization
> > and management of user metadata contents is the responsibility of
> > the ODP application. ODP APIs that copy system metadata will also
> > copy any associated user metadata as part of that operation, but
> > ODP will otherwise ignore these bytes.
> >
> > Bill Fischofer (6):
> >    api: packet: add user metadata APIs
> >    api: pool: add user metadata APIs
> >    linux-generic: buffer: restructure user mdatadata fields
> >    linux-generic: pool: add user metadata support
> >    linux-generic: packet: add user metadata support
> >    validation: packet: add user metadata tests
> >
> >   include/odp/api/packet.h                           | 20 ++++++++
> >   include/odp/api/pool.h                             |  4 ++
> >   .../linux-generic/include/odp_buffer_internal.h    |  4 +-
> >   platform/linux-generic/include/odp_pool_internal.h |  2 +-
> >   platform/linux-generic/odp_packet.c                | 34 ++++++++++++++
> >   platform/linux-generic/odp_pool.c                  | 34 +++++---------
> >   test/validation/odp_packet.c                       | 54
> ++++++++++++++++++++++
> >   7 files changed, 126 insertions(+), 26 deletions(-)
> >
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to