On Mon, Mar 22, 2021 at 07:54:19PM -0700, Stephen Hemminger wrote:
> On Mon, 22 Mar 2021 17:20:26 -0700
> Narcisa Ana Maria Vasile <navas...@linux.microsoft.com> wrote:
> 
> > @@ -59,7 +92,7 @@ void rte_thread_get_affinity(rte_cpuset_t *cpusetp);
> >   *
> >   * @return
> >   *   On success, zero.
> > - *   On failure, a negative number.
> > + *   On failure, return a positive errno-style error number.
> >   */
> 
> The common pattern in DPDK is to return a negative value for errors.
> There is a tradeoff here, should the wrapper functions just mimic what
> Posix API's do or not.
> 
> I prefer what this patch does; so users can just assume the rte_thread 
> functions
> all work exactly like the pthread versions.

yes, there was concern here that suddenly applying sign to errno
returned by an rte function that almost looks like a pthread function
will lead to a lot of misuse / confusion.

if this were to be changed at all i would suggest adopting more
consistently the use of rv = -1 and rte_errno set to indicate the error.

Reply via email to