From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 1E6DB7CC3 for ; Wed, 31 May 2017 17:46:07 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 May 2017 08:46:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,424,1493708400"; d="scan'208";a="863181816" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.42]) by FMSMGA003.fm.intel.com with SMTP; 31 May 2017 08:46:00 -0700 Received: by (sSMTP sendmail emulation); Wed, 31 May 2017 16:46:00 +0100 Date: Wed, 31 May 2017 16:46:00 +0100 From: Bruce Richardson To: Jacek Piasecki Cc: dev@dpdk.org, deepak.k.jain@intel.com, michalx.k.jastrzebski@intel.com, Kuba Kozak Message-ID: <20170531154559.GA46408@bricha3-MOBL3.ger.corp.intel.com> References: <1496133037-3014-1-git-send-email-jacekx.piasecki@intel.com> <1496133037-3014-3-git-send-email-jacekx.piasecki@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1496133037-3014-3-git-send-email-jacekx.piasecki@intel.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.8.1 (2017-04-11) Subject: Re: [dpdk-dev] [PATCH 2/3] eal: add functions parsing EAL arguments X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 15:46:08 -0000 On Tue, May 30, 2017 at 10:30:36AM +0200, Jacek Piasecki wrote: > From: Kuba Kozak > > added function rte_eal_configure which translate > options from config file into argc, **argv form. > > changed function rte_eal_init to meld > argc, argv** options from config file with > these from command line and then parse as > before > Hi, while this approach to merging the values from two sources (config struct and cmdline) works, I'm not sure it's the best way to implement this. I would have thought it more logical to separate out cmdline args into name-value pairs to add to the cfgfile struct internally instead. However, this has the disadvantage of forcing a dependency on cfgfile, or adding a third name-value pair struct to DPDK [after kvargs, which supports flat pairs, and cfgfile, which supports sections and pairs]. Using the cfgfile struct also saves us from "flattening out" hierarchical information we may wish to add in the config file. For example, consider the following cfgfile structure: [DPDK] lcores = 20-25 socket-mem = 2048, 1024 vdevs = 2 [DPDK.vdev0] name = eth_pcap0 rx_pcap = /path/to/file tx_pcap = /path/to/other_file [DPDK.vdev1] name = eth_tap0 iface = iface_arg Longer term, it would be good to keep those vdev entries separated as passed as such to the driver, rather than merging them back into a single string to be separated out again by kvargs lib. /Bruce