On Tue, 27 Oct 2026 at 07:31, Gagandeep Singh <[email protected]> wrote:
>
> From: Stephen Hemminger <[email protected]>
>
> The conversion loop is bounded only by num, which is not checked
> unless RTE_LIBRTE_DPAA_HWDEBUG is set. GCC on ppc64le and riscv
> therefore warns that bm_bufs[0] may be read uninitialized when
> copying the first entry into the RCR.
>
> Convert entry 0 unconditionally, as bman_release() does.
bman_release() looks wrong if called with num == 0 without debug flag.
This should be fixed (probably better in a followup patch as it does
not directly relate to the Fixes: tag).
It seems a simple fix is to not assign i variable in the first place
and remove the check on i before the for loop. Just rely on the for
loop check condition.
> Fixes: e55e2e2d0c66 ("bus/dpaa: optimize DPAA multi-entry buffer pool
> operations")
> Cc: [email protected]
>
> Signed-off-by: Gagandeep Singh <[email protected]>
> Signed-off-by: Stephen Hemminger <[email protected]>
This current fix lgtm though we don't have CI that ran on it because
CI tested it against main.
It should go through next-net where it can be squashed in the original commit.
--
David Marchand