Showing results for 
Search instead for 
Did you mean: 

Ethernet MAC Driver Not Supporting More than one VLAN ID


Hi there, 

I am developing on an STM32MP157. We are trying to add two Linux virtual network interfaces that specify a VLAN ID using networkd. Specifically, we specify IDs 20 and 30. We do not specify VLAN ID 0. On boot, networkd successfully creates the first interface, but fails to create the second interface with the following error:


stm32-dwmac 5800a000.ethernet eth0: Adding VLAN ID 0 is not supported
stm32-dwmac 5800a000.ethernet eth0: Only single VLAN ID supported


 Looking at the stdwmac.c driver, I see


if (hw->vlan_filter[0] & GMAC_VLAN_TAG_VID) {
    netdev_err(dev, "Only single VLAN ID supported\n");


I have tried to enable the following kernel configs, to no avail. What is interesting is that with these enabled and not trying to use the VLAN IDs, I still see the `Adding VLAN ID 0 is not supported` error.




`BRIDGE_EBT_VLAN=m`, `VLAN_8021Q_GVRP=y`, `VLAN_8021Q_MVRP=y` are set by default. I have not changed these.

This post seems to have had the same issue, but isolated the issue to an incompatibility with an external switch driver. We are not using an external switch driver, and are only intending on VLAN filtering at the ethernet MAC of the STM32MP157.

For now, we are getting around the issue by using a virtual bridge interface, then connecting the VLAN interfaces to the bridge; however, we would like to know whether this is a configuration issue, or a limitation of the hardware.

Thank you!


As far as I can tell, there is no limitation on the number of VLAN filters mentioned in the reference manual RM0436. We are running kernel 5.15, and there is a known bug in the stmmac driver tangentially related to this, the patch for which is in kernel 6. I have backported the patch, but am still seeing this "Only single VLAN ID supported" error.