Re: [PATCH net-next] net: ethernet: ti: am65-cpsw: Add priv-flag for Switch VLAN Aware mode

Andrew Lunn
2024-02-29T15:33:17Z

On Thu, Feb 29, 2024 at 04:37:06PM +0530, Siddharth Vadapalli wrote:
> On Thu, Feb 29, 2024 at 12:52:07PM +0200, Roger Quadros wrote:
> >
> >
> > On 29/02/2024 11:27, Siddharth Vadapalli wrote:
> > > On Wed, Feb 28, 2024 at 02:36:55PM +0100, Andrew Lunn wrote:
> > >>> What if there is no kernel behavior associated with it? How can it be mimicked
> > >>> then?
> > >>
> > >> Simple. Implement the feature in software in the kernel for
> > >> everybody. Then offload it to your hardware.
> > >>
> > >> Your hardware is an accelerator. You use it to accelerate what linux
> > >> can already do. If Linux does not have the feature your accelerator
> > >> has, that accelerator feature goes unused.
> > >
> > > Is it acceptable to have a macro in the Ethernet Driver to conditionally
> > > disable/enable the feature (via setting the corresponding bit in the
> > > register)?

Please re-read my sentence above.

Your hardware is an accelerate for what Linux already does. That is
the key point here. Please understand that. Once you understand that
point, everything else becomes simple.

Does linux have this feature? If yes, accelerate it. If no, you have
something in your hardware which is currently not usable.

Andrew