From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH 2/3] eal: add functions parsing EAL arguments Date: Wed, 31 May 2017 16:46:00 +0100 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 Cc: dev@dpdk.org, deepak.k.jain@intel.com, michalx.k.jastrzebski@intel.com, Kuba Kozak To: Jacek Piasecki 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) Content-Disposition: inline In-Reply-To: <1496133037-3014-3-git-send-email-jacekx.piasecki@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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