> -----Original Message-----
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT
> Ilya Maximets
> Sent: Tuesday, December 08, 2015 4:48 PM
> To: Stuart Haslam; Elo, Matias (Nokia - FI/Espoo)
> Cc: lng-odp@lists.linaro.org
> Subject: Re: [lng-odp] validation: pktio: fix start_stop and send_failure
> tests
> 
> 
> 
> On 08.12.2015 17:38, Stuart Haslam wrote:
> > On Tue, Dec 08, 2015 at 12:21:06PM +0000, Elo, Matias (Nokia - FI/Espoo)
> wrote:
> >> Hi Ilya,
> >>
> >> I had completely missed your previous patch. You could also remove the
> two errno value checks in pktio_test_send_failure(). They are not defined
> in the API, so they should not be tested.
> >>
> >> -Matias
> >>
> >
> > It realise it's back-to-front, but IMO it would be better to document
> > that the errno must be set.
> >
> 
> I agree with that. There is so little set of functions, according to
> documentation, sets up errno.
> My opinion is that almost all functions should set it on errors, otherwise
> it useless.
> 
> Best regards, Ilya Maximets.


The problem with errno is that we'd need to define also a set of errno values 
and usage of those in a way that is valid for all implementations. Specifying 
errno's is easy on a single implementation but same errors may not be easily 
checked over multiple implementations.

So in this phase, I'd specify that generally ODP functions that return 
"failure" may set odp_errno with implementation specific, non-zero value. Errno 
could be logged and used for debugging, but not tested against in an 
application. App would always test e.g. ret < 0.

-Petri
 



 
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to