[dpdk-dev] [PATCH 1/5] cfgfile: configurable comment character
Bruce Richardson
bruce.richardson at intel.com
Thu Mar 2 22:10:15 CET 2017
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 <allain.legacy at windriver.com>
> ---
> 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.
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
More information about the dev
mailing list