From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 May 2017 01:31:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,417,1491289200"; d="scan'208";a="1154374128" Received: from gklab-246-073.igk.intel.com (HELO Sent) ([10.217.246.73]) by fmsmga001.fm.intel.com with SMTP; 30 May 2017 01:31:02 -0700 Received: by Sent (sSMTP sendmail emulation); Tue, 30 May 2017 10:31:15 +0200 From: Jacek Piasecki To: dev@dpdk.org Cc: bruce.richardson@intel.com, deepak.k.jain@intel.com, michalx.k.jastrzebski@intel.com Date: Tue, 30 May 2017 10:30:34 +0200 Message-Id: <1496133037-3014-1-git-send-email-jacekx.piasecki@intel.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 0/3] Add support for using a config file for DPDK 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: Tue, 30 May 2017 08:31:07 -0000 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