[Patch v2] net/mana: use rte_pktmbuf_alloc_bulk for allocating RX WQEs
Long Li
longli at microsoft.com
Fri Feb 2 02:22:41 CET 2024
> > I think another approach is to use VLA by default, but for Windows use alloc().
>
> a few thoughts on VLAs you may consider. not to be regarded as a strong
> objection.
>
> indications are that standard C will gradually phase out VLAs because they're
> generally accepted as having been a bad idea. that said compilers that implement
> them will probably keep them forever.
>
> VLAs generate a lot of code relative to just using a more permanent allocation.
> may not show up in your performance tests but you also may not want it on your
> hotpath either.
>
> mana doesn't currently support windows, are there plans to support windows? if
> never then i suppose VLAs can be used since all the toolchains you care about
> have them. though it does raise the bar, cause more work, later refactor, carry
> regression risk should you change your mind and choose to port to windows.
>
> accepting the use of VLAs anywhere in dpdk prohibits general checkpatches
> and/or compiling with compiler options that detect and flag their inclusion as a
> part of the CI without having to add exclusion logic for drivers that are allowed to
> use them.
>
I agree we need to keep the code consistent. I submitted v4 using fixed array.
Thanks,
Long
More information about the dev
mailing list