RE: [PATCH v10 5/9] test: fix format overflow warning in ACL test

Marat Khalili
2026-01-02T14:33:07Z

> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Monday 29 December 2025 21:59
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>; stable@dpdk.org; Anatoly Burakov
> <anatoly.burakov@intel.com>; Cristian Dumitrescu <cristian.dumitrescu@intel.com>; Pablo de Lara
> <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH v10 5/9] test: fix format overflow warning in ACL test
>
> This test has an array of input lines, but the two dimensional
> array confuses compiler length checks. Convert to an array
> of pointers to fixed strings which avoids the problem.
> Make both variables static since not shared with other code.
>
> Fixes: 5205954791cb ("app/test: packet framework unit tests")
> Cc: stable@dpdk.org
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
> app/test/test_table_acl.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/app/test/test_table_acl.c b/app/test/test_table_acl.c
> index dff9bddfb9..94edf37234 100644
> --- a/app/test/test_table_acl.c
> +++ b/app/test/test_table_acl.c
> @@ -317,7 +317,7 @@ parse_cb_ipv4_rule_del(char *str, struct rte_table_acl_rule_delete_params *v)
> * separated by ' : ', just ':'. It's a lot more readable and
> * cleaner, IMO.
> */
> -char lines[][128] = {
> +static const char * const lines[] = {
> "@0.0.0.0/0 0.0.0.0/0 0:65535 0:65535 2/0xff", /* Protocol check */
> "@192.168.3.1/32 0.0.0.0/0 0:65535 0:65535 0/0", /* Src IP checl */
> "@0.0.0.0/0 10.4.4.1/32 0:65535 0:65535 0/0", /* dst IP check */
> @@ -325,7 +325,7 @@ char lines[][128] = {
> "@0.0.0.0/0 0.0.0.0/0 0:65535 206:206 0/0", /* dst port check */
> };
>
> -char line[128];
> +static char line[128];
>
>
> static int
> --
> 2.51.0

I feel like both could also be made local to setup_acl_pipeline.

With or without this optimization,

Acked-by: Marat Khalili <marat.khalili@huawei.com>