From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01A16606A322 for ; Wed, 2 Dec 2026 20:11:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=EGcNj3LF; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=mQ5DkA9s DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=vv2zo8z+nH+YLHI8SJtNWVzOlgw15zz2hDYPUU5nHjM=; b=EGcNj3LFq1CwU0 0jekNyJlIwpoN0hJ+VourrXRCdA7AGRkNOBmbJB4M1zpWXe9McgNBIrTDgNQ4dHjlixMDZyiQu+Zr o09kyQWLnHKBn8W9zyyHKdU9gc4g07p3/u6JOY/MuVBVr5UKcg4BXCfU1ilIjTS3eB4ApnZVkrgFX v0iw5RVIE7dI8uG2d+ZISEWz1ujYBAFPo3N2+wgfR2wZuo1+Yz7VwFkUiOxhL3lr3XFdw4whDJs8o zBr0HvLnJvq92a1dE2cMz0/cbSRvPTjJd/7hdZPy9FBTzmm4LzeWeFe6etgBZbbj4y3J3hRPBNuli NaFHXi0F+Lk82QyRc27w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYpH9-0000000CZdf-0XBn; Wed, 02 Dec 2026 18:41:55 +0000 Received: from smtpout-03.galae.net ([185.246.85.4]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYpH6-0000000CZcS-2nWG for linux-arm-kernel@lists.infradead.org; Wed, 02 Dec 2026 18:41:54 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 402ED4E4184E; Wed, 2 Dec 2026 18:41:50 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 0D3DA6075F; Wed, 2 Dec 2026 18:41:50 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 417C811EA1D21; Wed, 02 Dec 2026 19:41:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796236908; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=vv2zo8z+nH+YLHI8SJtNWVzOlgw15zz2hDYPUU5nHjM=; b=mQ5DkA9sR3LK3vRNg6iGPiBNigMZzJOsJ6hBQ6HAALGUIew+ugfPv6s35mazlRd8I1pgZP 4PXwWOXkxLMh+pkV5clKZT9S99cw4Su0iSF9DRiBEoeSrOlQOdWY82WRQTBdktiDdAmveV +E8EyCrTr56oFFI/40mrk6RFD8YyxfyUMXYJ28ntNSfBJIXKctjdIvIJM1FlxvDb/QoHIh tSgKCN0R6+p7DUXAwboVhWlbLzw5LL3cS5yy8J6D2Oud0DKBhtbXeXoREsNNeztRJcelDL uGCUWIUJnq5jCRjaKE3bsSlspBUBo5cfE96NTUFGPzWqg+IYKyz0IIalp9hH/g== Message-ID: <9d384234-57e1-4ddd-9019-50448e1f6a4f@bootlin.com> Date: Wed, 2 Dec 2026 19:41:43 +0100 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net v2] net: stmmac: Advertise TX checksum offload only when supported To: Prabhakar , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Corinna Vinschen Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar References: <20261124132802.2003605-1-prabhakar.mahadev-lad.rj@bp.renesas.com> From: Maxime Chevallier Content-Language: en-US In-Reply-To: <20261124132802.2003605-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261202_104152_861403_218F1A58 X-CRM114-Status: GOOD ( 20.17 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hi, On 11/24/26 14:28, Prabhakar wrote: > From: Lad Prabhakar > > stmmac unconditionally adds IPv4 and IPv6 TX checksum offload to > hw_features and copies the resulting features to vlan_features. When > tx_coe is false, for example in threshold DMA mode on hardware with a > capability register, stmmac_fix_features() removes the flags from the > active features at registration, but vlan_features retains them. > > DSA user ports inherit vlan_features and can therefore advertise TX > checksum offload even though the conduit cannot perform it. > > Only add NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM to hw_features when > tx_coe is enabled. This prevents the unsupported features from being > propagated to DSA user ports and reports them as fixed off on the > conduit. > > The issue was discovered while using stmmac as the DSA CPU port on > RZ/T2H and RZ/N2H EVKs. The fix was tested with ethtool on the switch > ports of both EVKs. > > Fixes: 6b2c6e4a938f ("net: stmmac: propagate feature flags to vlan") > Signed-off-by: Lad Prabhakar Reviewed-by: Maxime Chevallier Maxime > --- > v2: > - Added fixes tag > - Updated commit message > - Targetted the patch to net instead of net-next > v1: https://lore.kernel.org/all/20261119185016.1789843-1-prabhakar.mahadev-lad.rj@bp.renesas.com/ > --- > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > index a685ce4638f61..d32d3e7b1b8c6 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > @@ -8147,8 +8147,9 @@ static int __stmmac_dvr_probe(struct device *device, > ndev->xdp_metadata_ops = &stmmac_xdp_metadata_ops; > ndev->xsk_tx_metadata_ops = &stmmac_xsk_tx_metadata_ops; > > - ndev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | > - NETIF_F_RXCSUM; > + ndev->hw_features = NETIF_F_SG | NETIF_F_RXCSUM; > + if (priv->plat->tx_coe) > + ndev->hw_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; > ndev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT | > NETDEV_XDP_ACT_XSK_ZEROCOPY; >