Once we add the ability to attach additional segments to a packet (as is being discussed in other threads) we may wish to revisit the concept of "extensible" headroom/tailroom. As long as packets can be extended there's no logical reason why headroom/tailroom need be limited to a single segment.
On Thu, Jan 14, 2016 at 6:03 AM, Bala Manoharan <bala.manoha...@linaro.org> wrote: > Maximum headroom is defined in ODP_PACKET_MAX_HEADROOM and is an > implementation specific value and will not be greater than uint32/2. > > Having said that the current definition of headroom in ODP is that it > will not exceed a single segment meaning the headroom will NOT > overflow by adding an empty segment before. > > Regarding returning the previous allocated headroom, IMO it is a stale > value and is of no significance to the existing application. If you > have any use-case in mind for returning previous headroom pls share. > > Regards, > Bala > > > On 13 January 2016 at 22:29, Ivan Khoronzhuk <ivan.khoronz...@linaro.org> > wrote: > > It can be used to restore headroom later. Does it possible a headroom > > to be > sizeof(int32)/2? > > > > Signed-off-by: Ivan Khoronzhuk <ivan.khoronz...@linaro.org> > > --- > > include/odp/api/packet_io.h | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h > > index cf92751..7b9d82a 100644 > > --- a/include/odp/api/packet_io.h > > +++ b/include/odp/api/packet_io.h > > @@ -356,12 +356,12 @@ int odp_pktio_skip_set(odp_pktio_t pktio, uint32_t > offset); > > * Must not exceed the implementation > > * defined ODP_PACKET_MAX_HEADROOM. > > * > > - * @retval 0 on success > > + * @retval prevoius headroom > > * @retval <0 on failure > > * > > * @note Optional. > > */ > > -int odp_pktio_headroom_set(odp_pktio_t pktio, uint32_t headroom); > > +int32_t odp_pktio_headroom_set(odp_pktio_t pktio, int32_t headroom); > > > > /** > > * Get printable value for an odp_pktio_t > > -- > > 1.9.1 > > > > _______________________________________________ > > lng-odp mailing list > > lng-odp@lists.linaro.org > > https://lists.linaro.org/mailman/listinfo/lng-odp > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
_______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp