Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-29 Thread José Pekkarinen
On Monday 29 February 2016 06:47:26 EXT Bill Fischofer wrote: > A bit of history may be helpful here. Originally we used typedefs in ODP > fairly casually, as in: > > typedef uint32_t odp_queue_t; > typedef uint32_t odp_pool_t; > > etc. > > Unfortunately typedefs in C are not strongly typed,

Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-29 Thread Bill Fischofer
A bit of history may be helpful here. Originally we used typedefs in ODP fairly casually, as in: typedef uint32_t odp_queue_t; typedef uint32_t odp_pool_t; etc. Unfortunately typedefs in C are not strongly typed, meaning that you could pass a queue handle to an API that was expecting a pool

Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-29 Thread José Pekkarinen
On Monday 29 February 2016 05:52:23 EXT Bill Fischofer wrote: > I thought you were using ODP in an application. This sounds like you're > creating your own ODP implementation, in which case the result is that you > have a properly typed definition of ODP_QUEUE_INVALID of type odp_queue_t. > In

Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-29 Thread Bill Fischofer
I thought you were using ODP in an application. This sounds like you're creating your own ODP implementation, in which case the result is that you have a properly typed definition of ODP_QUEUE_INVALID of type odp_queue_t. In this case the assignment works so I guess I'm now confused what the

Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-29 Thread Bill Fischofer
On Mon, Feb 29, 2016 at 12:59 AM, José Pekkarinen wrote: > On Friday 26 February 2016 08:58:05 EXT Bill Fischofer wrote: > > > You can set an odp_queue_t variable to ODP_QUEUE_INVALID as an initial > > > value but not as an alternative to odp_queue_destroy(). If you

Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-28 Thread José Pekkarinen
On Friday 26 February 2016 08:58:05 EXT Bill Fischofer wrote: > You can set an odp_queue_t variable to ODP_QUEUE_INVALID as an initial > value but not as an alternative to odp_queue_destroy(). If you want to > defer the destroy operation that's fine, however you still need to remember > the

Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-26 Thread Bala Manoharan
Regards, Bala On 26 February 2016 at 12:41, José Pekkarinen 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 > > > >

Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-25 Thread José Pekkarinen
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

Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-25 Thread Bala Manoharan
Regards, Bala On 26 February 2016 at 11:51, José Pekkarinen wrote: > On Thursday 25 February 2016 15:01:11 EXT Bill Fischofer wrote: > > > On Thu, Feb 25, 2016 at 12:39 PM, José Pekkarinen < > jose.pekkari...@nokia.com > > > > wrote: > > > > > > > > On Thursday 25

Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-25 Thread José Pekkarinen
On Thursday 25 February 2016 15:01:11 EXT Bill Fischofer wrote: > On Thu, Feb 25, 2016 at 12:39 PM, José Pekkarinen > wrote: > > > > On Thursday 25 February 2016 11:54:31 EXT Bill Fischofer wrote: > > > Anything with an initial underscore (like _odp_cast_scalar()) is

Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-25 Thread Bill Fischofer
On Thu, Feb 25, 2016 at 12:39 PM, José Pekkarinen wrote: > On Thursday 25 February 2016 11:54:31 EXT Bill Fischofer wrote: > > > Anything with an initial underscore (like _odp_cast_scalar()) is an > > > implementation-internal API (in this case, linux-generic) and is

Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-25 Thread José Pekkarinen
On Thursday 25 February 2016 11:54:31 EXT Bill Fischofer wrote: > Anything with an initial underscore (like _odp_cast_scalar()) is an > implementation-internal API (in this case, linux-generic) and is most > definitely neither portable nor subject to any release-to-release > compatibility

Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-25 Thread Bill Fischofer
Anything with an initial underscore (like _odp_cast_scalar()) is an implementation-internal API (in this case, linux-generic) and is most definitely neither portable nor subject to any release-to-release compatibility guarantees, so I'd highly discourage trying to use them. If I understand your

Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-25 Thread José Pekkarinen
On Thursday 25 February 2016 18:57:47 EXT Bala Manoharan wrote: > On 22 February 2016 at 18:04, José Pekkarinen > > 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

Re: [lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-25 Thread Bala Manoharan
On 22 February 2016 at 18:04, José Pekkarinen 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

[lng-odp] [PATCH] Provide a generic function to invalidate a queue.

2016-02-22 Thread José Pekkarinen
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. This eases the case when odp_queue_t is defined as an union and the type of this queue is set as a member of the given union.