[PATCH v9 04/21] ethdev: remove use of VLAs for Windows built code
Bruce Richardson
bruce.richardson at intel.com
Wed Nov 20 09:53:50 CET 2024
On Tue, Nov 19, 2024 at 05:54:29PM -0800, Andre Muezerie wrote:
> From: Konstantin Ananyev <konstantin.ananyev at huawei.com>
>
> 1) ./lib/ethdev/rte_ethdev.c:3244:16
> : warning: ISO C90 forbids variable length array ‘xstats_names’
> 2) ./lib/ethdev/rte_ethdev.c:3345:17
> : warning: ISO C90 forbids variable length array ‘ids_copy’
> 3) ./lib/ethdev/rte_ethdev.c:3538:16
> : warning: ISO C90 forbids variable length array ‘xstats’
> 4) ./lib/ethdev/rte_ethdev.c:3554:17
> : warning: ISO C90 forbids variable length array ‘ids_copy’
>
> For 1) and 3) - just replaced VLA with arrays allocated from heap.
> As I understand xstats extraction belongs to control-path, so extra
> calloc/free is hopefully acceptable.
> Also ethdev xstats already doing that within
> rte_eth_xstats_get_id_by_name().
> For 2) and 4) changed the code to use fixed size array and call
> appropriate devops function several times, if needed.
>
> Signed-off-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
More information about the dev
mailing list