From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 553D2F72; Mon, 25 Jun 2018 18:58:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jun 2018 09:58:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,270,1526367600"; d="scan'208";a="66194892" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga004.fm.intel.com with ESMTP; 25 Jun 2018 09:58:19 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 25 Jun 2018 09:58:19 -0700 Received: from lcsmsx152.ger.corp.intel.com (10.186.165.231) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 25 Jun 2018 09:58:19 -0700 Received: from hasmsx105.ger.corp.intel.com ([169.254.1.185]) by LCSMSX152.ger.corp.intel.com ([169.254.4.228]) with mapi id 14.03.0319.002; Mon, 25 Jun 2018 19:58:16 +0300 From: "Stojaczyk, DariuszX" To: Olivier Matz , "Burakov, Anatoly" CC: "dev@dpdk.org" , "thomas.monjalon@6wind.com" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/2] eal/thread: fix return codes for rte_thread_setname() Thread-Index: AQHT/waWFWJFDjAbsUCMUdWEvRarc6RlpiaAgAtNDYCAAFeakA== Date: Mon, 25 Jun 2018 16:58:16 +0000 Message-ID: References: <1528461427-164113-1-git-send-email-dariuszx.stojaczyk@intel.com> <20180625143533.engmk4umgnwgmkm7@platinum> In-Reply-To: <20180625143533.engmk4umgnwgmkm7@platinum> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTRjNTVkOWMtYmM0Mi00NmQyLTgxYTctMmU0ZTdlOTk0ZTQyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJlNnBGUmdyNWw2VEdWbGtoc1FiMG5MTnJwXC9vVmxwV3hlRnB6Q2hHTnZTSFVqZlwvTHQ0WHFOdEd1SktYXC9cL1pSZiJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.103.102.240] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 1/2] eal/thread: fix return codes for rte_thread_setname() X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 16:58:31 -0000 > -----Original Message----- > From: Olivier Matz [mailto:olivier.matz@6wind.com] > Sent: Monday, June 25, 2018 4:36 PM > To: Burakov, Anatoly > Cc: Stojaczyk, DariuszX ; dev@dpdk.org; > thomas.monjalon@6wind.com; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 1/2] eal/thread: fix return codes for > rte_thread_setname() >=20 > 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. >=20 > Agree it should be split. >=20 > Reviewed-by: Olivier Matz >=20 > 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.