From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 885C6A00BE; Mon, 25 Apr 2022 10:55:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7986841109; Mon, 25 Apr 2022 10:55:07 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 79F3B410E6 for ; Mon, 25 Apr 2022 10:55:06 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id C19F020E8C82; Mon, 25 Apr 2022 01:55:05 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C19F020E8C82 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1650876905; bh=erNg1WEBtskggYFmR09M97xcg2wmrGJzqwbMWnRh4Ck=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZP8IkH2Vf70ljhgmy8B1dqEL3oSCSNrNTYPVjfBskBx7NHAbGE6+RaibyfnQg9Jwr 1U+1OpLvVg7F2ZBzmdQfq6pHRUbRqpavVdv0ksUwjWYJxAGayssrysrOT9DQCz/Sad Iyl1SetrH+Ct7LdYhBXwKjK4hexi2LchUzy8v/D8= Date: Mon, 25 Apr 2022 01:55:05 -0700 From: Tyler Retzlaff To: David Marchand Cc: dev , Thomas Monjalon , Dmitry Kozlyuk , "Burakov, Anatoly" , Narcisa Vasile Subject: Re: [PATCH v3 3/4] eal: implement functions for get/set thread affinity Message-ID: <20220425085505.GE15936@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1648819793-18948-1-git-send-email-roretzla@linux.microsoft.com> <1649835795-9344-1-git-send-email-roretzla@linux.microsoft.com> <1649835795-9344-4-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Apr 25, 2022 at 10:26:58AM +0200, David Marchand wrote: > On Wed, Apr 13, 2022 at 9:43 AM Tyler Retzlaff > wrote: > > > > Implement functions for getting/setting thread affinity. > > Threads can be pinned to specific cores by setting their > > affinity attribute. > > > > note: rte_convert_cpuset_to_affinity has a limitation that all cpus of > > the set belong to the same processor group. > > > > Signed-off-by: Narcisa Vasile > > Signed-off-by: Tyler Retzlaff > > [snip] > > > diff --git a/lib/eal/windows/rte_thread.c b/lib/eal/windows/rte_thread.c > > index d730bb4..032b09f 100644 > > --- a/lib/eal/windows/rte_thread.c > > +++ b/lib/eal/windows/rte_thread.c > > @@ -6,7 +6,8 @@ > > #include > > #include > > #include > > -#include > > + > > +#include "eal_windows.h" > > > > struct eal_tls_key { > > DWORD thread_index; > > @@ -146,3 +147,131 @@ struct eal_tls_key { > > } > > return output; > > } > > + > > +static int > > +rte_convert_cpuset_to_affinity(const rte_cpuset_t *cpuset, > > + PGROUP_AFFINITY affinity) > > This is Windows only, static code. > Please don't use rte_ prefix. > > For static code, I see no need for a prefix at all. agreed. will fix in next revision. > > > -- > David Marchand