From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by dpdk.org (Postfix) with ESMTP id 54E835927 for ; Fri, 26 Jul 2013 14:13:01 +0200 (CEST) Received: by mail-wi0-f172.google.com with SMTP id c10so764403wiw.17 for ; Fri, 26 Jul 2013 05:13:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:x-gm-message-state; bh=O5fcMelXgu83x7Bh6osG5Zjzn3YWyLtrcvkTYeOwGF8=; b=G3J7Hjc7m07J3Pjkiq7D6EIDZkoNmbT9yd6Zx/g3Fd+dG4ihOr24Tp+WRRXoi9J0sU qdm+sydXtsUtzv9XDl0L5So9Z2btr41SU0ImOz8P+FaMTOl6NQPAqahQms457zhLjYUd cs5d2XiGU40IsAmpkRjGOwpcCVfGqKtcB8vAmLNa625Cx1qgOBm/Gmpf/upltOwfrRMz Yk1J+EJyR7UjSKkguF/7xkL9Iv0IaVI91CsjUF++hZy1pyrwQpMoVsIf/F7yQCTsty2g I+TnVnj7Iv6QbHaEfNPE6uATlb3tHEDaZVTSaqmMpc/dobs6aVpc0IGudC81J4TOByP+ 8VMQ== X-Received: by 10.194.110.39 with SMTP id hx7mr34155594wjb.4.1374840804186; Fri, 26 Jul 2013 05:13:24 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id s19sm4333813wik.11.2013.07.26.05.13.20 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 26 Jul 2013 05:13:23 -0700 (PDT) Date: Fri, 26 Jul 2013 14:13:16 +0200 From: Adrien Mazarguil To: Thomas Monjalon 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 Content-Disposition: inline In-Reply-To: <1374839749-28143-1-git-send-email-thomas.monjalon@6wind.com> X-Gm-Message-State: ALoCoQmooYjlj+VEM++dQD40uQqLxmGsuJeIhetKSUHBxLCGQT2i0OITwPwOfyXuk5auCo57MY58 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] eal: fix recording of detected/enabled logical cores X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jul 2013 12:13:01 -0000 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