On Tue, Nov 19, 2024 at 05:54:29PM -0800, Andre Muezerie wrote: > From: Konstantin Ananyev <[email protected]> > > 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 <[email protected]> > ---
Acked-by: Bruce Richardson <[email protected]>

