FYI The DTS failure for this series on patchwork for the MTU testsuite is
coming from a different patch than this one. Once I have that resolved, I
will put in a retest for this series which will clear up that MTU testsuite
failure.

On Mon, Sep 8, 2025 at 5:21 PM Thomas Monjalon <tho...@monjalon.net> wrote:

> After an upgrade to MinGW version 13, compilation breaks:
>
> In function 'rte_bbdev_queue_ops_dump':
> lib/bbdev/rte_bbdev.c:1269:63: error:
>         '%s' directive argument is null [-Werror=format-overflow=]
>         fprintf(f, "  Enqueue Status Counters %s %" PRIu64 "\n",
>
> The enqueue status string may be null if the index is too high,
> because RTE_BBDEV_ENQ_STATUS_SIZE_MAX is defined to include
> padding for future enum insertion.
> This padding case must be checked
> to avoid printing a dump of a non-existing status.
>
> Fixes: 353e3639d458 ("bbdev: add queue debug dump")
> Cc: sta...@dpdk.org
>
> Signed-off-by: Thomas Monjalon <tho...@monjalon.net>
> Acked-by: Bruce Richardson <bruce.richard...@intel.com>
> Acked-by: Hemant Agrawal <hemant.agra...@nxp.com>
> ---
> v2: make status_str variable local
> ---
>  lib/bbdev/rte_bbdev.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
> index e0f8c8eb0d..e76124532d 100644
> --- a/lib/bbdev/rte_bbdev.c
> +++ b/lib/bbdev/rte_bbdev.c
> @@ -1264,11 +1264,15 @@ rte_bbdev_queue_ops_dump(uint16_t dev_id, uint16_t
> queue_id, FILE *f)
>                         dev->data->name, queue_id);
>         fprintf(f, "  Last Enqueue Status %s\n",
>
> rte_bbdev_enqueue_status_str(q_data->enqueue_status));
> -       for (i = 0; i < RTE_BBDEV_ENQ_STATUS_SIZE_MAX; i++)
> +       for (i = 0; i < RTE_BBDEV_ENQ_STATUS_SIZE_MAX; i++) {
> +               const char *status_str = rte_bbdev_enqueue_status_str(i);
> +               if (status_str == NULL)
> +                       continue;
>                 if (q_data->queue_stats.enqueue_status_count[i] > 0)
>                         fprintf(f, "  Enqueue Status Counters %s %" PRIu64
> "\n",
> -                                       rte_bbdev_enqueue_status_str(i),
> +                                       status_str,
>
> q_data->queue_stats.enqueue_status_count[i]);
> +       }
>         stats = &dev->data->queues[queue_id].queue_stats;
>
>         fprintf(f, "  Enqueue Count %" PRIu64 " Warning %" PRIu64 " Error
> %" PRIu64 "\n",
> --
> 2.51.0
>
>

Reply via email to