From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id A9D2A3975 for ; Tue, 25 Nov 2014 14:28:54 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 25 Nov 2014 05:36:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,455,1413270000"; d="scan'208";a="613732230" Received: from bricha3-mobl3.ger.corp.intel.com ([10.243.20.15]) by orsmga001.jf.intel.com with SMTP; 25 Nov 2014 05:39:44 -0800 Received: by (sSMTP sendmail emulation); Tue, 25 Nov 2014 13:39:43 +0025 Date: Tue, 25 Nov 2014 13:39:43 +0000 From: Bruce Richardson To: Thomas Monjalon Message-ID: <20141125133943.GB2300@bricha3-MOBL3> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4906267.1tRnJm3qQV@xps13> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) 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: Tue, 25 Nov 2014 13:28:55 -0000 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