Re: [Enable Designware XGMAC VLAN Stripping Feature v2 1/1] net: stmmac: dwxgmac2: Add support for HW-accelerated VLAN Stripping

From: Andrew Lunn
Date: Mon Jun 10 2024 - 08:31:07 EST


On Fri, Jun 07, 2024 at 04:09:37AM +0000, Ng, Boon Khai wrote:
> >
> > Do you have access to all the reference documentation for the IP driven in
> > dwmac4_core.c, dwxgmac2_core.c and stmmac_main.c? Is it just VLAN which
> > is the same, and everything else is different? Or are other blocks of the
> > hardware also identical and the code should be shared?
> > If VLAN is all that is identical, then stammc_vlan.c would make sense.
>
> Hi Andrew, I only have access to the document for
> dwmac4_core.c and dwxgmac2_core.c

O.K. So please do look at the VLAN code in other places and see if any
can be shared.

, I notice that in the linux mainline
> https://github.com/torvalds/linux/tree/master/drivers/net/ethernet/stmicro/
> stmmac
>
> it does have stmmac_est.c and stmmac_ptp.c to that support for both
> dwmac4 and dwxgmac2, with that I think it is suitable for introducing
> another file called stmmac_vlan?

Yes, stmmac_vlan.c is O.K.

Andrew