> -----Original Message-----
> From: Olivier Matz [mailto:[email protected]]
> Sent: Monday, June 25, 2018 4:36 PM
> To: Burakov, Anatoly <[email protected]>
> Cc: Stojaczyk, DariuszX <[email protected]>; [email protected];
> [email protected]; [email protected]
> Subject: Re: [dpdk-dev] [PATCH 1/2] eal/thread: fix return codes for
> rte_thread_setname()
>
> On Mon, Jun 18, 2018 at 11:00:55AM +0100, Burakov, Anatoly wrote:
> > On 08-Jun-18 1:37 PM, Dariusz Stojaczyk wrote:
> > > The doc says this function returns negative errno
> > > on error, but it currently returns either -1 or
> > > positive errno.
> > >
> > > It was incorrectly assumed that pthread_setname_np()
> > > returns negative error numbers. It always returns
> > > positive ones, so this patch negates its return value
> > > before returning.
> > >
> > > While here, also ignore rte_thread_setname() failure
> > > in rte_ctrl_thread_create() and print a debug message
> > > instead.
> > >
> > > Fixes: 3901ed99c2f8 ("eal: fix thread naming on FreeBSD")
> > > Cc: [email protected]
> > > Cc: [email protected]
> > >
> > > Signed-off-by: Dariusz Stojaczyk <[email protected]>
> > > ---
> >
> > For patch contents,
> >
> > Acked-by: Anatoly Burakov <[email protected]>
> >
> > However, maybe this should be split in two patches.
>
> Agree it should be split.
>
> Reviewed-by: Olivier Matz <[email protected]>
>
> Out of curiosity, do you have a use-case where rte_thread_setname()
> fails? The only reason I see is a too long name. Why this error
> should be ignored?
I don't have any use-case like that. It's just that the error is not fatal and
we can physically continue creating the thread. EAL does the same thing for the
lcore threads.