[PATCH] cfgfile: increase value length

David Marchand david.marchand at redhat.com
Thu Feb 1 11:32:54 CET 2024


On Wed, Dec 6, 2023 at 12:31 PM Vipin Varghese <vipin.varghese at amd.com> wrote:
>
> The default value for CFG_VALUE_LEN is set to 256 characters.
> This limits the parsing for longer strings in configuration file.
> Setting the default to 2048 characters increases the value array
> size in `struct rte_cfgfile_entry`.
>
> Files using cfgfile library are
> 1. drivers/net/mvpp2/
> 2. app/test-dma-perf/
> 3. app/test/
> 4. examples/qos_sched/
>
> The structure `rte_cfgfile_entry` is not included in DPDK libraries.
> Modifying from 256 to 2048 allows `app/test-dma-perf/main.c` helps to
> parse longer string as shared in https://bugs.dpdk.org/show_bug.cgi?id=1333
>
> Signed-off-by: Vipin Varghese <vipin.varghese at amd.com>
> Suggested-by: Ferruh Yigit <ferruh.yigit at amd.com>
> ---
>  lib/cfgfile/rte_cfgfile.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/cfgfile/rte_cfgfile.h b/lib/cfgfile/rte_cfgfile.h
> index 232c65c77b..401353c44e 100644
> --- a/lib/cfgfile/rte_cfgfile.h
> +++ b/lib/cfgfile/rte_cfgfile.h
> @@ -24,7 +24,7 @@ extern "C" {
>  #endif
>
>  #ifndef CFG_VALUE_LEN
> -#define CFG_VALUE_LEN 256
> +#define CFG_VALUE_LEN 2048
>  #endif
>
>  /** Configuration file */

Last time I looked at this code, I had the impression such a change
would break the ABI.

I see that the discussion stopped at a suggestion to change some parsing logic.
For now, I marked this patch as Changes requested.

Thanks.


-- 
David Marchand



More information about the dev mailing list