Netdev List
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Prabhakar <prabhakar.csengg@gmail.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Corinna Vinschen <vinschen@redhat.com>
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 <prabhakar.csengg+renesas@gmail.com>,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH net v2] net: stmmac: Advertise TX checksum offload only when supported
Date: Wed, 2 Dec 2026 19:41:43 +0100	[thread overview]
Message-ID: <9d384234-57e1-4ddd-9019-50448e1f6a4f@bootlin.com> (raw)
In-Reply-To: <20261124132802.2003605-1-prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi,

On 11/24/26 14:28, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> 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 <prabhakar.mahadev-lad.rj@bp.renesas.com>

Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>

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;
>  


      parent reply	other threads:[~2026-12-02 18:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 13:28 [PATCH net v2] net: stmmac: Advertise TX checksum offload only when supported Prabhakar
2026-11-25 13:30 ` netdev-bot+sashiko
2026-11-26 11:37   ` Lad, Prabhakar
2026-12-02 18:41 ` Maxime Chevallier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9d384234-57e1-4ddd-9019-50448e1f6a4f@bootlin.com \
    --to=maxime.chevallier@bootlin.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=prabhakar.csengg+renesas@gmail.com \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=vinschen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox