From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44BA9486405 for ; Fri, 11 Sep 2026 21:21:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789161678; cv=none; b=kQo0dG1cirLWYa4QFC/yiv+hwhKlCEyfFQ+K4J7Wl8P1wcjEKmwqeE89E0tXF0aQL9221wQ8vWHOwB7TjnLfEIMC4s+G06XcA8Z+jm+P1LdDKYh7MIx7NIhI3zP404+yU5XRxc0vJfKCKVqiLTE4aKTVX+G9tnPfxwE9vzotLuM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789161678; c=relaxed/simple; bh=WA2JBB0axH0muAjc04e2AE/HhIvgUjJOlD0AGPU4ExI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PDo/dL7BjnNC7lzaMGnjXdtDNZHGV34RGUP6lXarKaMqvTlGxycK9uNwzMu42K5/Tp35xOJp7sWI1GIdEJGN29TWW0je3W/FyeqUC884vqVUr0+pVVDS1NA4eEqKS2Nw9Wpt/b0OAHhhVdgILroHB5ZYtHSxoG4ewUwIblWzlHA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=rg4zCM4j; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="rg4zCM4j" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 595861A0226; Fri, 11 Sep 2026 21:21:15 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 2C4A2601A3; Fri, 11 Sep 2026 21:21:15 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1D88B11C7AFB3; Fri, 11 Sep 2026 23:21:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1789161669; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=eF2zdbvuflY5doNoW+50hx8vDNZ+Z3JDjCoh+Vqsa14=; b=rg4zCM4jIoD79xSsIv0sEGbwKw4LfyNp8x8Ch7e6QNCzO/Q8ayOupTucHT5HFR+q5woMS4 MeHpt2Vo73w3dgIa2xgAeDOC263ElleWLUhXb1QPAr3YoJH72EjW0TnqSaNTr4ZLvUD91u N7Z4vkA5mcT9EZKaGEfBrVoFfCPtIUbhZdCT+1/PsmYKf2pVbn1Iqz1EIgIvbvVPKpNuBe 59D+6Zz5uFrxcROKyzCpivEg3hHld90NVldvK7YPufe4+Zqf0BpemQQGT6LFVByp7G64+1 eZ39k1v+0b8ZGwarg3++yc5BE2/6LgCN0Yp6EusgaxuphNH3E614FpQ/YLMTIQ== From: Maxime Chevallier To: Andrew Lunn , davem@davemloft.net, Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , Heiner Kallweit , =?UTF-8?q?Alexis=20Lothor=C3=A9?= , Maxime Coquelin , Alexandre Torgue , Emil Renner Berthing , Minda Chen , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Jan Petrous , Ovidiu Panait , Jose.Abreu@synopsys.com, Nicolai Buchwitz Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, PKneuper@dspace.de, David Laight Subject: [PATCH net v3 3/6] net: stmmac: selftests: Check the dev->features for S-TAG offload testing Date: Fri, 11 Sep 2026 23:20:23 +0200 Message-ID: <20260911212028.1497613-4-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260911212028.1497613-1-maxime.chevallier@bootlin.com> References: <20260911212028.1497613-1-maxime.chevallier@bootlin.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 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") Reviewed-by: Nicolai Buchwitz Signed-off-by: Maxime Chevallier --- 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 df28741abf2b..7f5837d1fed9 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c @@ -1410,7 +1410,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); } -- 2.55.0