From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH] eal: fix recording of detected/enabled logical cores Date: Fri, 26 Jul 2013 14:13:16 +0200 Message-ID: <20130726121316.GL7849@6wind.com> References: <1374839749-28143-1-git-send-email-thomas.monjalon@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev-VfR2kkLFssw@public.gmane.org To: Thomas Monjalon Return-path: Content-Disposition: inline In-Reply-To: <1374839749-28143-1-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On Fri, Jul 26, 2013 at 01:55:49PM +0200, Thomas Monjalon wrote: > From: Ivan Boule > > 1) In the EAL initialization phase, invoke the function rte_eal_cpu_init > to detect the set of running cores (and enable them by default) before > processing the [enabled] core mask option that is performed during the > parsing of EAL arguments. > > 2) In the function rte_eal_cpu_init(): > - to parse the set of all running logical cores on the machine, do not > use the RTE_LCORE_FOREACH macro that considers the set of already > detected cores... > Instead, use a standard loop based on the RTE_MAX_LCORE constant. > - explicitely set to ROLE_RTE the role of each detected logical core > that is recorded in the EAL configuration, as all running cores are > enabled by default. > > 3) In the function eal_parse_coremask(), update the "lcore_count" field > of the EAL configuration with the effective number of logical cores > that are set in the mask of enabled logical cores. > > Signed-off-by: Ivan Boule > --- > lib/librte_eal/linuxapp/eal/eal.c | 8 +++++--- > lib/librte_eal/linuxapp/eal/eal_lcore.c | 12 ++++++++---- > 2 files changed, 13 insertions(+), 7 deletions(-) Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND