From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.246.85.4 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796236921; b=U0YU4AfewIaR+Pe8fdIPs79PlzWKzTKGcoo/qbru0iqr4hCDtZxlktD+38l7M6xAESBq 3wQp9/rrZv4IbwoovrHyWt5/YswlATJHY6ygOFkLSZl6DFZ2863xG4O7L2s38XVtgYlLa rkbfQDTYfBbyH7U4nZUqLSgVzvHkDHZtud0yOnNziRa2qSszw3TTPzewbCHQz3WTChjOs lvbzyWk6bIb8YqChRGpNkwVmDn+nsAh9nC5qnAqk/W9+vSljfJ8CyiNnmFXxyyUVQ+9FC bxI3t8yq903qBEFFHD33sWbkIgqV2/CKBIfk6bjOHGuNi27xRinuHYll5otDS3Krrdg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796236921; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References:From: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding: X-Last-TLS-Session-Version; bh=vv2zo8z+nH+YLHI8SJtNWVzOlgw15zz2hDYPUU5nHjM=; b=yF8eeFMaviNGdxjdktebB5G+zsusNHeuWadcEFgEmfVCDoP5CpcCZXidWQy93b5LqTc8 HWyNWI+tT/tDb1txIROJebMwbmaRH3OcLKfWXP6JZMvNAhlC2SAVhpQSWpBxX+X6v5knO XkNErz+mlk9NSQ4EdXj0iZUWk+89wKkgy/h40kp3Tn4hNWFyr1IcJ0Z6vdxa1SL+SZAjT gPUuqd3ozafY687KW+PI+X/aOdDIMQ50LpPdYAw9yyGWxi3dp8RlxjMYiXl6lr1f49ckX /kltmrWbzIaq48D+RwwuulScbjPZSQGvMGmxaIEYsrxiiS0+hQeyOsHQK73F+5WM2dA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=mQ5DkA9s; arc=none smtp.remote-ip=185.246.85.4 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 B43D1606A6A1 for ; Wed, 2 Dec 2026 18:41:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B43D1606A6A1 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.a=rsa-sha256 header.s=dkim header.b=mQ5DkA9s 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-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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 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; >