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

From: Ng, Boon Khai
Date: Tue Jun 04 2024 - 02:05:53 EST



> You should generalize the existing functions into some other file within
> stmmac/ folder and call those functions from both dwmac4_core and
> dwxgmac2_core.
> Do the rework of existing function & callers first and add the new bits in
> another patch in the patch series.
>

Hi Ilpo, do you mean I should create a new file for example,
stammc_vlan.c, and move the common vlan function inside?
so that it can be called either from dwmac4_core, dwxgmac2_core
or stmmac_main.c? or maybe I should just consolidate them into
stmmac_main.c?

> Unfortunately, it's hard to catch copy-paste like this from other files when not
> very familiar with the driver.
>
I totally understand that, while I think Andrew has already call them out
In the previous thread.