From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id DCE673975 for ; Tue, 25 Nov 2014 13:34:55 +0100 (CET) Received: by mail-wg0-f45.google.com with SMTP id b13so760297wgh.4 for ; Tue, 25 Nov 2014 04:45:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=Rv6xW7J9BMpcFc1+2KT2H5vZWZNSEoJoHGqHSiZBANY=; b=IPiJe6NqAKwajs9eTfk1bQqNguh2tRPdnI070eMrL+1aEI2tqSKp9+i8T/oFi2SfNp JpPx+ss35YEonWdOiu0X3Y0s3hRGyw1i0YAPCyscEQT30VLQJNEKIXHpzaktYy4dvmGv ZcrVozYQ/EtNb2YfN0YaB5r4LnjhcRDpnSjw77KdUHINsipOHEmkcZoG1RjOv75hDWp/ lHRfmmp2uNYeo1oC4dI1OCj2n9hqW8asH7rSHN0m8OtQ+n4tCcbSyDfRLA02iVrY0FIb MpYPjpZpc8iu1iQ2In+/IGPRz5XJ6MDwMWI43TgHtzMwHNXj/MEpMVy3H5gTrrqeM6Mc 2ARQ== X-Gm-Message-State: ALoCoQkNkkFUTns5weDtPNA5zga62VV8XVN0PPRUX9zlSDU6/KLGy/dcfLnWc9BLO7B6CH7lsjCb X-Received: by 10.180.92.129 with SMTP id cm1mr8422788wib.33.1416919548168; Tue, 25 Nov 2014 04:45:48 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id a8sm16324287wiz.21.2014.11.25.04.45.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Nov 2014 04:45:47 -0800 (PST) From: Thomas Monjalon To: Simon Kuenzer Date: Tue, 25 Nov 2014 13:45:22 +0100 Message-ID: <4906267.1tRnJm3qQV@xps13> Organization: 6WIND User-Agent: KMail/4.14.2 (Linux/3.17.2-1-ARCH; KDE/4.14.2; x86_64; ; ) In-Reply-To: <54744756.4010207@neclab.eu> 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> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 12:34:56 -0000 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. -- Thomas