Re: [PATCH v6 6/6] net/mlx5: fix LTO stringop-overflow warning

Dariusz Sosnowski
2026-02-06T09:51:35Z

On Thu, Feb 05, 2026 at 09:55:58AM -0800, Stephen Hemminger wrote:
> When LTO inlines mlx5dr_action_prepare_decap_l3_data() into
> its callers, GCC sees the 64-byte stack buffer 'mh_data' but
> cannot prove num_of_actions is bounded, producing a false
> -Wstringop-overflow warning.
>
> Add __rte_assume(num_of_actions <= DECAP_L3_NUM_ACTIONS_W_VLAN)
> so GCC can verify the loop stays within buffer bounds.
>
> Bugzilla ID: 1710
> Fixes: f8c8a6d8440d ("net/mlx5/hws: add action object")
> Cc: stable@dpdk.org
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>