From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 72E9A2BF3; Mon, 25 Jun 2018 16:35:38 +0200 (CEST) Received: from rsa59-2-82-233-193-189.fbx.proxad.net ([82.233.193.189] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fXSb8-0001l9-13; Mon, 25 Jun 2018 16:36:07 +0200 Received: by droids-corp.org (sSMTP sendmail emulation); Mon, 25 Jun 2018 16:35:33 +0200 Date: Mon, 25 Jun 2018 16:35:33 +0200 From: Olivier Matz To: "Burakov, Anatoly" Cc: Dariusz Stojaczyk , dev@dpdk.org, thomas.monjalon@6wind.com, stable@dpdk.org 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 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH 1/2] eal/thread: fix return codes for rte_thread_setname() X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 14:35:38 -0000 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?