From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org,
Ong Boon Leong <boon.leong.ong@intel.com>,
Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next 06/10] net: stmmac: simplify GSO/TSO test in stmmac_xmit()
Date: Sun, 29 Mar 2026 10:17:39 +0100 [thread overview]
Message-ID: <acjuM_ryTVHU9Ib_@shell.armlinux.org.uk> (raw)
In-Reply-To: <E1w6bL9-0000000ELu9-1quN@rmk-PC.armlinux.org.uk>
On Sat, Mar 28, 2026 at 09:37:07PM +0000, Russell King (Oracle) wrote:
> +static void stmmac_set_gso_types(struct stmmac_priv *priv, bool tso)
> +{
> + if (!tso) {
> + priv->gso_enabled_types = 0;
> + } else {
> + /* Manage oversized TCP frames for GMAC4 device */
> + priv->gso_enabled_types = SKB_GSO_TCPV4 | SKB_GSO_TCPV6;
> + if (priv->plat->core_type == DWMAC_CORE_GMAC4)
> + priv->gso_enabled_types |= SKB_GSO_UDP_L4;
I've been wondering whether keying all three of these off NETIF_F_TSO
is correct. Shouldn't SKB_GSP_UDP_L4 be dependent on NETIF_F_GSO_UDP_L4?
(The above code doesn't change the current driver behaviour, so this
would be a separate fix.)
> + }
> +}
> +
> /**
> * stmmac_tso_xmit - Tx entry point of the driver for oversized frames (TSO)
> * @skb : the socket buffer
> @@ -4671,7 +4683,6 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
> u32 queue = skb_get_queue_mapping(skb);
> int nfrags = skb_shinfo(skb)->nr_frags;
> unsigned int first_entry, tx_packets;
> - int gso = skb_shinfo(skb)->gso_type;
> struct stmmac_txq_stats *txq_stats;
> struct dma_desc *desc, *first_desc;
> struct stmmac_tx_queue *tx_q;
> @@ -4683,14 +4694,9 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
> if (priv->tx_path_in_lpi_mode && priv->eee_sw_timer_en)
> stmmac_stop_sw_lpi(priv);
>
> - /* Manage oversized TCP frames for GMAC4 device */
> - if (skb_is_gso(skb) && priv->tso) {
> - if (gso & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))
> - return stmmac_tso_xmit(skb, dev);
> - if (priv->plat->core_type == DWMAC_CORE_GMAC4 &&
> - (gso & SKB_GSO_UDP_L4))
> - return stmmac_tso_xmit(skb, dev);
> - }
> + if (skb_is_gso(skb) &&
> + skb_shinfo(skb)->gso_type & priv->gso_enabled_types)
> + return stmmac_tso_xmit(skb, dev);
I'm also wondering whether we should check gso_type in our
.ndo_features_check() method rather than here - if we get a GSO skb at
this point for a type that we don't recognise, surely it is wrong to
pass it via the normal skb transmission flow.
Yet more worms in the stmmac can... :/
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2026-03-29 9:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-28 21:36 [PATCH net-next 00/10] net: stmmac: TSO fixes/cleanups Russell King (Oracle)
2026-03-28 21:36 ` [PATCH net-next 01/10] net: stmmac: fix TSO support when some channels have TBS available Russell King (Oracle)
2026-03-29 9:40 ` Russell King (Oracle)
2026-03-29 14:03 ` Andrew Lunn
2026-03-29 17:42 ` Jakub Kicinski
2026-03-29 18:23 ` Russell King (Oracle)
2026-03-28 21:36 ` [PATCH net-next 02/10] net: stmmac: add TSO check for header length Russell King (Oracle)
2026-03-28 21:36 ` [PATCH net-next 03/10] net: stmmac: move TSO VLAN tag insertion to core code Russell King (Oracle)
2026-03-29 9:09 ` Russell King (Oracle)
2026-03-28 21:36 ` [PATCH net-next 04/10] net: stmmac: always enable channel TSO when supported Russell King (Oracle)
2026-03-28 21:37 ` [PATCH net-next 05/10] net: stmmac: fix .ndo_fix_features() Russell King (Oracle)
2026-03-28 21:37 ` [PATCH net-next 06/10] net: stmmac: simplify GSO/TSO test in stmmac_xmit() Russell King (Oracle)
2026-03-29 9:17 ` Russell King (Oracle) [this message]
2026-03-28 21:37 ` [PATCH net-next 07/10] net: stmmac: split out gso features setup Russell King (Oracle)
2026-03-28 21:37 ` [PATCH net-next 08/10] net: stmmac: make stmmac_set_gso_features() more readable Russell King (Oracle)
2026-03-28 21:37 ` [PATCH net-next 09/10] net: stmmac: add warning when TSO is requested but unsupported Russell King (Oracle)
2026-03-28 21:37 ` [PATCH net-next 10/10] net: stmmac: move "TSO supported" message to stmmac_set_gso_features() Russell King (Oracle)
2026-03-29 0:10 ` [PATCH net-next 00/10] net: stmmac: TSO fixes/cleanups Russell King (Oracle)
2026-03-29 18:11 ` Jakub Kicinski
2026-03-29 18:51 ` Russell King (Oracle)
2026-03-30 23:42 ` Jakub Kicinski
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=acjuM_ryTVHU9Ib_@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=boon.leong.ong@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.