[PATCH net v2 3/6] net: stmmac: selftests: Check the dev->features for S-TAG offload testing

Nicolai Buchwitz nb at tipi-net.de
Thu Sep 10 11:13:18 PDT 2026


On 10.9.2026 17:14, Maxime Chevallier wrote:
> The S-TAG offload insertion incorrectly checks the dvlan (double vlan)
> DMA cap, which is different than S-TAG support. Use
> NETIF_F_HW_VLAN_STAG_TX to check if the feature is supported instead.
> 
> Note that this flag isn't set in stmmac yet, but contrary to ARP
> offload, this is a feature that has a chance to get there eventually so
> let's leave the selftest here for now. It'll report -EOPNOTSUPP in the
> meantime.
> 
> Fixes: 091810dbded9 ("net: stmmac: Introduce selftests support")
> Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c 
> b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
> index a8280834185c..f3a533bc6bb6 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
> @@ -1405,7 +1405,7 @@ static int stmmac_test_vlanoff(struct stmmac_priv 
> *priv)
> 
>  static int stmmac_test_svlanoff(struct stmmac_priv *priv)
>  {
> -	if (!priv->dma_cap.dvlan)
> +	if (!(priv->dev->features & NETIF_F_HW_VLAN_STAG_TX))
>  		return -EOPNOTSUPP;
>  	return stmmac_test_vlanoff_common(priv, true);
>  }

Reviewed-by: Nicolai Buchwitz <nb at tipi-net.de>

Thanks,
Nicolai



More information about the linux-arm-kernel mailing list