From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jacek Piasecki Subject: [PATCH 0/3] Add support for using a config file for DPDK Date: Tue, 30 May 2017 10:30:34 +0200 Message-ID: <1496133037-3014-1-git-send-email-jacekx.piasecki@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: bruce.richardson@intel.com, deepak.k.jain@intel.com, michalx.k.jastrzebski@intel.com To: dev@dpdk.org Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 4A2162986 for ; Tue, 30 May 2017 10:31:06 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Michal Jastrzebski This patch introduce a mechanism for running dpdk application with parameters provided by configuration file. New API for cfgfile library allows to create a cfgfile at runtime, add new section and add entry in a section - opens up the possibility to have applications dynamically build up a proper DPDK configuration, rather than having to have a pre-existing one. A new API for EAL takes a config file data type - either loaded from file, or built up programmatically in the application - and extracts DPDK parameters from it to be used when eal init is called. This allows apps to have an alternative method to configure EAL, other than via command-line parameters. Testpmd application is used to the demonstrate the new eal API. If a --cfgfile-path option is passed into command line non EAL section, then the file is loaded and used by app. If a file called config.ini is present in current working directory, and no --cfgfile-path option is passed in, config.ini file will be loaded and used by app. Currently *.ini file format is supported, but we would like to demonstrate in v2 how alternative config file formats could be used. Other work planned for v2: support for subsections – allowing to pass i.e. [DPDK.vdev0] and its parameters, cleanup to EAL API and testpmd. Jacek Piasecki (1): cfgfile: add new API functions Kuba Kozak (2): eal: add functions parsing EAL arguments app/testpmd: changed example to parse options from cfg file app/test-pmd/config.ini | 16 ++ app/test-pmd/parameters.c | 135 ++++++++++- app/test-pmd/testpmd.c | 51 +++- app/test-pmd/testpmd.h | 2 +- lib/Makefile | 6 +- lib/librte_cfgfile/Makefile | 1 + lib/librte_cfgfile/rte_cfgfile.c | 293 +++++++++++++---------- lib/librte_cfgfile/rte_cfgfile.h | 52 ++++ lib/librte_cfgfile/rte_cfgfile_version.map | 9 + lib/librte_eal/bsdapp/eal/Makefile | 4 + lib/librte_eal/bsdapp/eal/eal.c | 128 +++++++++- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 5 + lib/librte_eal/common/include/rte_eal.h | 6 + lib/librte_eal/linuxapp/eal/Makefile | 3 + lib/librte_eal/linuxapp/eal/eal.c | 108 ++++++++- lib/librte_eal/linuxapp/eal/rte_eal_version.map | 4 + mk/rte.app.mk | 2 +- 17 files changed, 684 insertions(+), 141 deletions(-) create mode 100644 app/test-pmd/config.ini -- 1.7.9.5