RE: [PATCH v2] net: dsa: drop some VLAs in switch.c

From: David Laight
Date: Tue May 08 2018 - 05:39:08 EST


From: Salvatore Mesoraca
> Sent: 07 May 2018 20:03
...
> This optimization will save us an allocation when number of ports is
> less than 32 or 64 (depending on arch).
> IMHO it's useful, if you consider that, right now, DSA works only with
> 12-ports switches.

Why not just error out if the number of ports is greater than the compile-time
limit?

Worry about dynamic allocation if you need a lot more than 64 ports.

David