From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id DD9412B9D for ; Fri, 3 Mar 2017 01:54:53 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Mar 2017 16:54:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,234,1484035200"; d="scan'208";a="55251103" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga002.jf.intel.com with ESMTP; 02 Mar 2017 16:54:51 -0800 Date: Fri, 3 Mar 2017 08:53:37 +0800 From: Yuanhan Liu To: Bruce Richardson Cc: Allain Legacy , cristian.dumitrescu@intel.com, dev@dpdk.org, ian.jolliffe@windriver.com Message-ID: <20170303005337.GB18844@yliu-dev.sh.intel.com> References: <1488482971-170522-1-git-send-email-allain.legacy@windriver.com> <1488482971-170522-2-git-send-email-allain.legacy@windriver.com> <20170302211015.GA18940@bricha3-MOBL3.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170302211015.GA18940@bricha3-MOBL3.ger.corp.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 1/5] cfgfile: configurable comment character 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, 03 Mar 2017 00:54:54 -0000 On Thu, Mar 02, 2017 at 09:10:15PM +0000, Bruce Richardson wrote: > On Thu, Mar 02, 2017 at 02:29:27PM -0500, Allain Legacy wrote: > > The current cfgfile comment character is hardcoded to ';'. This commit > > introduces a configuration attribute to allow an application to select a > > different character. This is to ease adoption by applications that have an > > existing configuration file which may use a different comment character. > > For instance, an application may already have a configuration file that > > uses the '#' as the comment character. > > > > Signed-off-by: Allain Legacy > > --- > > config/common_base | 1 + > > lib/librte_cfgfile/rte_cfgfile.c | 2 +- > > 2 files changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/config/common_base b/config/common_base > > index aeee13e..32a42d7 100644 > > --- a/config/common_base > > +++ b/config/common_base > > @@ -477,6 +477,7 @@ CONFIG_RTE_LIBRTE_TIMER_DEBUG=n > > # Compile librte_cfgfile > > # > > CONFIG_RTE_LIBRTE_CFGFILE=y > > +CONFIG_RTE_LIBRTE_CFGFILE_COMMENT_CHAR=';' > > > > We are trying to avoid adding in extra build-time options to DPDK, so > can you please rework this patch to make it a run-time option instead. +1 for making it a run-time option. --yliu > Perhaps just add a set_comment_char() API call to the library. If this > is a setting per cfgfile instance it would then allow applications to > simultaneously use files with different formats. For example, if in > future we use cfgfile library to configure DPDK EAL, a preexisting file > for that shipped with DPDK may conflict in format with an > application-specific one. > > /Bruce