The purpose of the note was to expand on the case of len = 0. Are you saying this is not needed? The consensus on the Wednesday arch call was that it was, hence this patch.
On Thu, May 28, 2015 at 5:40 AM, Savolainen, Petri (Nokia - FI/Espoo) < [email protected]> wrote: > > * ... The > * packet is initialized with data pointers and lengths set according to > the > * specified len, ... > > The current documentation covers functionality also when len is 0. We > should minimize @note content over all the APIs, otherwise the actual API > spec gets fragmented. API documentation and functionality is the same for > len == 0, len == 1, ... In all the cases, implementation decides on packet > segmentation in limits of pool parameters. > > If needed, we could add: > > @note Zero is a valid 'len' value > > > -Petri > > > > -----Original Message----- > > From: lng-odp [mailto:[email protected]] On Behalf Of ext > > Bill Fischofer > > Sent: Wednesday, May 27, 2015 6:51 PM > > To: [email protected] > > Subject: [lng-odp] [API-NEXT PATCH 2/2] api-next: packet: clarify use of > 0 > > len on odp_packet_alloc() > > > > Signed-off-by: Bill Fischofer <[email protected]> > > --- > > include/odp/api/packet.h | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/include/odp/api/packet.h b/include/odp/api/packet.h > > index 3a454b5..ea124df 100644 > > --- a/include/odp/api/packet.h > > +++ b/include/odp/api/packet.h > > @@ -73,6 +73,16 @@ extern "C" { > > * @note The default headroom and tailroom used for packets is specified > > by > > * the ODP_CONFIG_PACKET_HEADROOM and ODP_CONFIG_PACKET_TAILROOM defines > > in > > * odp_config.h. > > + * > > + * @note The len parameter sets the initial length of the allocated > > packet. > > + * If specified as 0, the implementation will allocate a packet of a > > default > > + * length chosen by the implementation based on the pool create > > parameters > > + * and will then set the actual length of the packet to 0. The result is > > + * the same as if the following sequence had been called by the > > application: > > + * @code > > + * pkt = odp_packet_alloc(pool, default_len); > > + * odp_packet_reset(pkt, 0); > > + * @endcode > > */ > > odp_packet_t odp_packet_alloc(odp_pool_t pool, uint32_t len); > > > > -- > > 2.1.0 > > > > _______________________________________________ > > 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
