Re: [PATCH net-next v2 4/5] net: dsa: realtek: rtl8365mb: remove learn_limit_max private data member

From: Alvin Šipraga
Date: Sun Jun 12 2022 - 06:56:43 EST


On Sat, Jun 11, 2022 at 10:40:33PM -0300, Luiz Angelo Daros de Luca wrote:
> > The variable is just assigned the value of a macro, so it can be
> > removed.
>
> As I commented previously, the switches in this family with 10 ports
> do have a different value for RTL8365MB_LEARN_LIMIT_MAX.
> Once we add support for one of those models, we will somewhat revert this patch.

I wouldn't call that a revert, just normal development.

>
> I believe learn_limit_max would fit better inside the new static
> chip_info structure.

Other pedants may ask me what the point of such a patch is when the hardware is
not even supported. That was my main reason for not incorporating your
suggestion.

The other reason is that, having actually experimented with the learn limit
myself, I could in fact make my RTL8365MB-VC learn more than this presupposed
maximum the vendor driver uses. I think it also depends on whether IVL/SVL is in
use. So there might be more to it than you think.