Regards,
Bala

On 26 February 2016 at 12:41, José Pekkarinen <jose.pekkari...@nokia.com>
wrote:

>
>
> Hi,
>
>
>
> > > And this is what we want, to have more flexibility to set this to
> invalid,
>
> > > as the only way to do a pure assignation to ODP_QUEUE_INVALID for
> unions
>
> > > is
>
> > > setting ODP_QUEUE_INVALID as stated in the following line.
>
> > >
>
> > >
>
> > >
>
> > > #define ODP_QUEUE_INVALID _odp_cast_scalar(odp_queue_t, ~(unsigned)0)
>
> > >
>
> > > > If you have created the queue
>
> > > >
>
> > > > via odp_queue_create() and received a handle for it then you at some
>
> > >
>
> > > point
>
> > >
>
> > > > need to do a corresponding odp_queue_destroy() queue to free up any
> ODP
>
> > > >
>
> > > > resources associated with that queue. Simply throwing away the handle
>
> > > >
>
> > > > would result in resource leakage.
>
> > >
>
> > > Sure, odp_queue_destroy should be called, but it takes more processing
>
> > > time than just setting the queue to invalid, and it can be performed
> when
>
> > > no demanding network load is coming.
>
> >
>
> > If the queue is successfully create by the implementation and a valid
> queue
>
> > handle is returned then odp_queue_destroy() function is required to clear
>
> > any HW resources allocated by the implementation. So that handle cannot
> be
>
> > set to invalid by the application.
>
> >
>
>
>
> Yes, that is for sure, but does it have to be cleaned up immediately? Is
> there no way to delay the processing of the destroy function until we are
> not in a hurry?
>

That depends on your application since if you are delaying cleaning up a
queue you might actually deny creating new queue as the platform might
overruns the total amount of queue supported.

Also just to be clear, odp handles are opaque to the application and it
does not have the right to set the handle to INVALID directly. It has to go
through the implementation to INVALIDATE a handle and currently the only
way is to call odp_xxx_destroy() API.

Regards,
Bala

>
>
> Best regards.
>
>
>
> José.
>
>
>
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to