On Thursday 25 February 2016 18:57:47 EXT Bala Manoharan wrote:
> On 22 February 2016 at 18:04, José Pekkarinen
<[email protected]>
>
> wrote:
> > To provide support of different definitions of odp_queue_t
> > it's good to have a proper mechanism to set the queue invalid
> > in case any error during the transmission happen.
>
> What is the expectation from the implementation when an application
> invalidates a queue?
> The linux-generic implementation does not actually do anything.
>
> Regards,
> Bala
>
Hi,
If the queue in question is in a bigger structure, like, for
instance, an interface, and we fail during the initialization of it, even if
the
queue is ok, we want to ensure that the queue is not used until we are
able to cleanup the rest of the structure from memory.
For this purpose, ofp sets the queue to invalid almost
immediately, by direct assignation. Unfortunately, for unions, direct
assignation from a member of the union doesn't work if you don't name
the member you want to use. And here it should be when we want to
provide a platform function that defines this assignation, using the
member of the union.
There is a workaround though, which is to define
ODP_QUEUE_INVALID symbol using _odp_cast_scalar in odp. With this, the
assignation works right away, but we need to compare through
odp_queue_to_u64.
Best regards.
José.
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp