Thread (15 messages) flat view 15 messages, 2 authors, 12d ago

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

From: Nicolai Buchwitz <hidden>
Date: 2026-09-10 18:13:30
Also in: linux-arm-kernel, lkml

On 10.9.2026 17:14, Maxime Chevallier wrote:
quoted hunk ↗ jump to hunk
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@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 <redacted>

Thanks,
Nicolai
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help