RFC needs to be dropped from the subject line before merge (== v4 without RFC). With that and correction of the doxygen issue below.
Reviewed-by: Petri Savolainen <[email protected]> > -----Original Message----- > From: [email protected] [mailto:lng-odp- > [email protected]] On Behalf Of ext Bill Fischofer > Sent: Thursday, March 26, 2015 6:57 PM > To: [email protected] > Cc: [email protected] > Subject: [lng-odp] [RFC API-NEXT PATCHv3] api: packet/pool: proposed APIs > for packet user metadata > > Signed-off-by: Bill Fischofer <[email protected]> > --- > > 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. > > include/odp/api/packet.h | 20 ++++++++++++++++++++ > include/odp/api/pool.h | 4 ++++ > 2 files changed, 24 insertions(+) > > diff --git a/include/odp/api/packet.h b/include/odp/api/packet.h > index a31c54d..840e152 100644 > --- a/include/odp/api/packet.h > +++ b/include/odp/api/packet.h > @@ -467,6 +467,26 @@ uint64_t odp_packet_user_u64(odp_packet_t pkt); > void odp_packet_user_u64_set(odp_packet_t pkt, uint64_t ctx); > > /** > + * Get address of user metadata associated with a packet > + * > + * @param pkt Packet handle > + * > + * @retval addr Address of the user metadata associated with > pkt I think the correct doxygen convention is @return + @retval: @return Address of the user... @retval NULL The packet has no ... -Petri > + * @retval NULL The packet has no user metadata. > + */ > +void *odp_packet_user_data(odp_packet_t pkt); > + > +/** > + * Get size of user metadata associated with a packet > + * > + * @param pkt Packet handle > + * > + * @return Number of bytes of user metadata associated > + * with pkt. > + */ > +uint32_t odp_packet_user_data_size(odp_packet_t pkt); > + > +/** > * Layer 2 start pointer > * > * Returns pointer to the start of the layer 2 header. Optionally, > outputs > 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 */ > } pkt; > struct { > uint32_t num; /**< Number of timeouts in the pool */ > -- > 2.1.0 > > > _______________________________________________ > lng-odp mailing list > [email protected] > http://lists.linaro.org/mailman/listinfo/lng-odp _______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
