On 2024/11/22 18:08, Konstantin Ananyev wrote:
> 
> 
>> -----Original Message-----
>> From: Fengchengwen <fengcheng...@huawei.com>
>> Sent: Friday, November 22, 2024 1:33 AM
>> To: Andre Muezerie <andre...@linux.microsoft.com>; dev@dpdk.org
>> Cc: Konstantin Ananyev <konstantin.anan...@huawei.com>
>> Subject: Re: [PATCH v12 04/21] ethdev: remove use of VLAs for Windows built 
>> code
>>
>> On 2024/11/22 5:41, Andre Muezerie wrote:
>>> From: Konstantin Ananyev <konstantin.anan...@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.
>>
>> It will invoke PMD ops multi-times, I'm not sure whether all drivers
>> impl correctly.
> 
> Hmm..., but then there is a bug in the driver that has to be fixed, no?

Yes, such bug need to be fixed.

In this case, we maybe need more review on PMD's impl.

> 
>> And it also belong control-path, so suggest use the call/free as 1&3 case.
>>
> 

Reply via email to