From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id D0D32377E for ; Mon, 10 Jul 2017 17:13:47 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 65B4020AB3; Mon, 10 Jul 2017 11:13:47 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 10 Jul 2017 11:13:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=IoOvSyd+j+GY/By WW804yW2XNeY3v6aJ35nbFB1yWfE=; b=Q/sOErs6IDFrkZO9qazfM77+a6F9A45 beiQE5/EDqG9N0vrOCJg+fnmZCVx7a+iez+ahcJEqwaFmNc0kXs0Z1I2L2O6u00Z 5XTpG1sr2bpu/YTQ4eWglOMTMcfphi+VcXH6j11sBhIiVuguF06+tZVKU3vkTTFR J94Bnw/7JAXw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=IoOvSyd+j+GY/ByWW804yW2XNeY3v6aJ35nbFB1yWfE=; b=AP7RL1O+ 9NYjyQI0VOrp5lp2II17yTb0g+98/quOp0Dn1EmV/b1nUfZBhW1yU0pVybYp4GbA t67UWkI0hwVDbsP3Vq8WQfdV+igX8QdRAu9o3jpwgj+5VXfrVHj28IO7SLW1kUk4 mFccOeAEyWY67wrmq8sBE1my843H1FmcxZaGCYfHMm9SltUkGq9OOtRUNjPnjj8r UjJuyY83QAG75Utw4i7stON6+NsLHM7CW3OYPW+vDOxROZxojL/h7Hm2iWiVRXil OhIVu/ha/yG5gxVOnsNYPkWuHWd8kt3fhdf8PfKn8IREid91/lHHggL8RCIN/R8b jPj1vCRrl3JUaw== X-ME-Sender: X-Sasl-enc: HfYUpdGStD0jR2tGl3eNbOVOezk9e/DRp7LzX33gM/Qt 1499699627 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1683924009; Mon, 10 Jul 2017 11:13:47 -0400 (EDT) From: Thomas Monjalon To: Jacek Piasecki , Cristian Dumitrescu Cc: dev@dpdk.org, bruce.richardson@intel.com, deepak.k.jain@intel.com, kubax.kozak@intel.com, michalx.k.jastrzebski@intel.com Date: Mon, 10 Jul 2017 17:13:46 +0200 Message-ID: <1578208.n1xhadrjJ3@xps> In-Reply-To: <1499690657-81150-1-git-send-email-jacekx.piasecki@intel.com> References: <1498560760-104196-2-git-send-email-jacekx.piasecki@intel.com> <1499690657-81150-1-git-send-email-jacekx.piasecki@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 0/5] 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: Mon, 10 Jul 2017 15:13:48 -0000 The maintainer of librte_cfgfile is Cristian (+Cc), please set him as recipient for next time. 10/07/2017 14:44, Jacek Piasecki: > 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. > > --- > v4: > Change members of structure cfgfile: > - struct *sections[] to *sections > - struct *entries[] to *entries > - remove free_sections and free_entries > Rework of existing cfgfile API functions to work with modified > rte_cfgfile struct. > Rework of malloc/realloc implementation due rte_cfgfile struct change, > reducing mulitiple mallocs. > Change return error codes for all library functions (errno.h) > Checkpatch fixes > 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 (5): > cfgfile: remove EAL dependency > cfgfile: change existing API functions > cfgfile: add new functions to API > cfgfile: rework of load function > test/cfgfile: add new unit test > > lib/Makefile | 3 +- > lib/librte_cfgfile/Makefile | 1 + > lib/librte_cfgfile/rte_cfgfile.c | 417 ++++++++++++++--------- > lib/librte_cfgfile/rte_cfgfile.h | 82 ++++- > lib/librte_cfgfile/rte_cfgfile_version.map | 11 + > test/test/test_cfgfile.c | 40 +++ > test/test/test_cfgfiles/etc/realloc_sections.ini | 128 +++++++ > 7 files changed, 514 insertions(+), 168 deletions(-) > create mode 100644 test/test/test_cfgfiles/etc/realloc_sections.ini > >