From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailer1.neclab.eu (mailer1.neclab.eu [195.37.70.40]) by dpdk.org (Postfix) with ESMTP id B2A463F9 for ; Wed, 26 Nov 2014 11:23:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mailer1.neclab.eu (Postfix) with ESMTP id 0D272108C48; Wed, 26 Nov 2014 11:34:10 +0100 (CET) X-Virus-Scanned: Amavisd on Debian GNU/Linux (netlab.nec.de) Received: from mailer1.neclab.eu ([127.0.0.1]) by localhost (atlas-a.office.hd [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D0cZ7CBdlXEt; Wed, 26 Nov 2014 11:34:09 +0100 (CET) X-ENC: Last-Hop-TLS-encrypted X-ENC: Last-Hop-TLS-encrypted Received: from METHONE.office.hd (methone.office.hd [192.168.24.54]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mailer1.neclab.eu (Postfix) with ESMTPS id E1E61108B3C; Wed, 26 Nov 2014 11:34:03 +0100 (CET) Received: from [10.1.2.10] (10.1.2.10) by skoll.office.hd (192.168.125.11) with Microsoft SMTP Server (TLS) id 14.3.210.2; Wed, 26 Nov 2014 11:34:03 +0100 Message-ID: <5475AC9B.8060406@neclab.eu> Date: Wed, 26 Nov 2014 11:34:03 +0100 From: Simon Kuenzer Organization: NEC Laboratories Europe User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Bruce Richardson , Thomas Monjalon References: <1416692622-28886-1-git-send-email-thomas.monjalon@6wind.com> <1416692622-28886-11-git-send-email-thomas.monjalon@6wind.com> <54744756.4010207@neclab.eu> <4906267.1tRnJm3qQV@xps13> <20141125133943.GB2300@bricha3-MOBL3> In-Reply-To: <20141125133943.GB2300@bricha3-MOBL3> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.1.2.10] Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 10/10] eal: add option --master-lcore 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: Wed, 26 Nov 2014 10:23:13 -0000 On 25.11.2014 14:39, Bruce Richardson wrote: > On Tue, Nov 25, 2014 at 01:45:22PM +0100, Thomas Monjalon wrote: >> Hi Simon, >> >> 2014-11-25 10:09, Simon Kuenzer: >>> thanks for your work. I have one (minor) comment for this patch that >>> should be fixed in a later version. >> >>>> + /* default master lcore is the first one */ >>>> + if (cfg->master_lcore == 0) >>>> + cfg->master_lcore = rte_get_next_lcore(-1, 0, 0); >>>> + >>> >>> Might be confusing if a user specifies --master-lcore 0 and uses a >>> coremask/corelist where core id 0 is not specified. >> >> Yes, in this corner case, master-lcore will be adjusted instead of having >> an error. >> >>> What about setting cfg->master_lcore to (RTE_MAX_LCORE + 1) on >>> initialization in order to distinguish if a master_lcore got specified >>> by the user or not? >> >> Even simpler, I can fix it by introducing a flag master_lcore_parsed and >> do the adjustment only if the option is not parsed. >> > I agree that that sounds like a simpler approach, since we already have flags > for what args are parsed or not. > > /Bruce > Fine with me :-). I also agree that having the flag is even a cleaner solution. Thanks, Simon