From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 613BD1B185; Thu, 14 Feb 2019 17:12:27 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2019 08:12:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,369,1544515200"; d="scan'208";a="320419024" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.251.90.29]) ([10.251.90.29]) by fmsmga005.fm.intel.com with ESMTP; 14 Feb 2019 08:12:24 -0800 To: David Marchand , dev@dpdk.org Cc: olivier.matz@6wind.com, ktraynor@redhat.com, stable@dpdk.org References: <1550074412-31285-1-git-send-email-david.marchand@redhat.com> <1550151042-9764-1-git-send-email-david.marchand@redhat.com> From: "Burakov, Anatoly" Message-ID: <32bd2385-b979-12f8-26ef-e03e28e53462@intel.com> Date: Thu, 14 Feb 2019 16:12:24 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <1550151042-9764-1-git-send-email-david.marchand@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 1/2] eal: fix potential incorrect pinning for ctrl threads 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: Thu, 14 Feb 2019 16:12:28 -0000 On 14-Feb-19 1:30 PM, David Marchand wrote: > pthread_setaffinity_np returns a >0 value on error. > We could end up letting the ctrl threads on the current process cpu > affinity. > > Fixes: d651ee4919cd ("eal: set affinity for control threads") > Signed-off-by: David Marchand > --- > lib/librte_eal/common/eal_common_thread.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c > index 48ef4d6..a3985ce 100644 > --- a/lib/librte_eal/common/eal_common_thread.c > +++ b/lib/librte_eal/common/eal_common_thread.c > @@ -209,7 +209,7 @@ static void *rte_thread_init(void *arg) > CPU_SET(rte_get_master_lcore(), &cpuset); > > ret = pthread_setaffinity_np(*thread, sizeof(cpuset), &cpuset); > - if (ret < 0) > + if (ret) > goto fail; > > ret = pthread_barrier_wait(¶ms->configured); > CC: stable? -- Thanks, Anatoly