[lng-odp] [API-NEXT PATCH v3 8/9] queue: handle return value of odp_queue_enq()

2015-06-05 Thread Zoltan Kiss
Unsent packet has to be released. If the event type is obvious from the context, use directly the relevant release functions, otherwise odp_event(free). Wider error handling is attempted, but this patch can't fix all the flaws in the many calling functions of odp_queue_enq() Signed-off-by: Zoltan

Re: [lng-odp] [API-NEXT PATCH v3 8/9] queue: handle return value of odp_queue_enq()

2015-06-09 Thread Savolainen, Petri (Nokia - FI/Espoo)
Although implementation (linux-generic) is using the API calls, it can do short cuts e.g. ensure that queue_enq will never fail (abort instead of fail) and then exploit that knowledge. The implementation gets more complex if any "API call" it uses can fail as specified by the API spec. > ---

Re: [lng-odp] [API-NEXT PATCH v3 8/9] queue: handle return value of odp_queue_enq()

2015-06-29 Thread Zoltan Kiss
Hi, So you say instead of returning I should use an ODP_ABORT()? Zoli On 09/06/15 14:46, Savolainen, Petri (Nokia - FI/Espoo) wrote: Although implementation (linux-generic) is using the API calls, it can do short cuts e.g. ensure that queue_enq will never fail (abort instead of fail) and the

Re: [lng-odp] [API-NEXT PATCH v3 8/9] queue: handle return value of odp_queue_enq()

2015-06-30 Thread Ola Liljedahl
On 29 June 2015 at 20:16, Zoltan Kiss wrote: > Hi, > > So you say instead of returning I should use an ODP_ABORT()? > If an ODP function cannot succeed or fail cleanly (e.g. internal side effects unrolled, internal state consistent), it must not return at all. Calling ODP_ABORT is one way of achi

Re: [lng-odp] [API-NEXT PATCH v3 8/9] queue: handle return value of odp_queue_enq()

2015-06-30 Thread Savolainen, Petri (Nokia - FI/Espoo)
Yes, abort on schedule queue failures (scheduler internal errors). -Petri From: ext Ola Liljedahl [mailto:ola.liljed...@linaro.org] Sent: Tuesday, June 30, 2015 1:18 PM To: Zoltan Kiss Cc: Savolainen, Petri (Nokia - FI/Espoo); lng-odp@lists.linaro.org Subject: Re: [lng-odp] [API-NEXT PATCH v3 8