From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 0A7A337A6 for ; Fri, 30 Jun 2017 13:20:22 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2017 04:20:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,286,1496127600"; d="scan'208";a="119349339" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.28]) by orsmga005.jf.intel.com with SMTP; 30 Jun 2017 04:20:17 -0700 Received: by (sSMTP sendmail emulation); Fri, 30 Jun 2017 12:20:16 +0100 Date: Fri, 30 Jun 2017 12:20:16 +0100 From: Bruce Richardson To: Jacek Piasecki Cc: dev@dpdk.org, deepak.k.jain@intel.com Message-ID: <20170630112016.GF14776@bricha3-MOBL3.ger.corp.intel.com> References: <1498474759-102089-2-git-send-email-jacekx.piasecki@intel.com> <1498559210-104084-1-git-send-email-jacekx.piasecki@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1498559210-104084-1-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 v3 0/4] Rework cfgfile API to enable apps config file support 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: Fri, 30 Jun 2017 11:20:23 -0000 On Tue, Jun 27, 2017 at 12:26:46PM +0200, Jacek Piasecki wrote: > New API for cfgfile library allows to create a cfgfile at runtime, add new > section, add entry in a section, update existing entry and save cfgfile > structure to INI file - opens up the possibility to have applications > dynamically build up a proper DPDK configuration, rather than > having to have a pre-existing one. Due the new API functions, simplification > of load() function was made. One new unit test to TEST app was added. It > contains an example of a large INI file whose parsing requires multiple > reallocation of memory. > > --- > v3: > split one patchset into two distinct patchsets: > 1. cfgfile library and TEST app changes > 2. EAL changes and examples (this patchset depends on cfgfile) > v2: > lib eal: > Rework of rte_eal_configure(struct rte_cfgfile *cfg, char *prgname). > Now this function load data from cfg structure and did initial > initialization of EAL arguments. Vdev argument are stored in different > subsections eg. DPDK.vdev0, DPDK.vdev1 etc. After execution of this > function it is necessary to call rte_eal_init to complete EAL > initialization. There is no more merging arguments from different > sources (cfg file and command line). > Added non_eal_configure to testpmd application. > Function maintain the same functionality as rte_eal_configure but > for non-eal arguments. > Added config JSON feature to testpmd last patch from patchset contain > example showing use of .json configuration files. > > lib cfgfile: > Rework of add_section(), add_entry() new implementation > New members allocated_entries/sections, free_entries/sections > in rte_cfgfile structure, change in array of pointers > **sections, **entries instead of *sections[], *entries[] > Add set_entry() to update/overwrite already existing entry in cfgfile > struct > Add save() function to save on disc cfgfile structure in INI format > Rework of existing load() function simplifying the code > Add unit test realloc_sections() in TEST app for testing realloc/malloc > of new API functions, add test for save() function > > Jacek Piasecki (3): > cfgfile: remove EAL dependency > cfgfile: add new functions to API > test/cfgfile: add new unit test > > Kuba Kozak (1): > cfgfile: rework of load function > This looks a good set to have. Some cleanup work needed on the code, but from a high-level implementation view, it's fine. Once issues flagged by me are fixed: Acked-by: Bruce Richardson