From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH 1/2] eal/thread: fix return codes for rte_thread_setname() Date: Mon, 25 Jun 2018 16:35:33 +0200 Message-ID: <20180625143533.engmk4umgnwgmkm7@platinum> References: <1528461427-164113-1-git-send-email-dariuszx.stojaczyk@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Dariusz Stojaczyk , dev@dpdk.org, thomas.monjalon@6wind.com, stable@dpdk.org To: "Burakov, Anatoly" Return-path: Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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: thomas.monjalon@6wind.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Dariusz Stojaczyk > > --- > > For patch contents, > > Acked-by: Anatoly Burakov > > However, maybe this should be split in two patches. Agree it should be split. Reviewed-by: Olivier Matz 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?