Re: [RFC net-next 3/4] net: dsa: motorcomm: Dynamically allocate port structures
From: Andrew Lunn
Date: Sun Jun 21 2026 - 05:07:30 EST
> > This seems pretty error prone. A missing check will result in an
> > opps. At least it will be obvious. How big is each port structure? Is
> > the memory saving worth it?
> >
> > Andrew
>
> It's about 1.4k per port for 5 dummy ports.
That adds up, so not allocating them makes sense.
Maybe check if the functions you are adding tests to can actually be
called for dummy ports. They should not have a netdev, so that often
means there is no path to call these functions.
Andrew