On Fri, 15 Aug 2025 14:26:07 +0000 Konstantin Ananyev <konstantin.anan...@huawei.com> wrote:
> > The code for ethdev callbacks was using variable length arrays > > which is a feature not supported on MSVC and later C standards. > > Replace with alloca(). > > I am not a big fun of such mechanical replacement of vla with alloca() > Specially in that particular case, we can have internal function that uses > fixed size array and in public one just call it several times in a loop. > Again, using VLA here is probably a real security breach, > as we put some assumptions on size of input arrays provided by user, > which we probably shouldn't. > > > Signed-off-by: Stephen Hemminger <step...@networkplumber.org> The other way to handle this is to break the loop into chunks. But it ends up being more awkward to read, and more complex.