mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rao, Nikhil" <nikhirao@amd.com>
To: "Nikhil P. Rao" <nikhil.rao@amd.com>,
	Brett Creeley <brett.creeley@amd.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>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Breno Leitao <leitao@debian.org>,
	Eric Joyner <eric.joyner@amd.com>,
	Abhijit Gangurde <abhijit.gangurde@amd.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH net v2 2/2] ionic: limit TSO segments to the minimum Tx ring size
Date: Fri, 20 Nov 2026 11:58:41 -0800	[thread overview]
Message-ID: <41a95b7e-9690-44be-9960-08f959081a13@amd.com> (raw)
In-Reply-To: <20261117-b4-ionic-tso-max-segs-v2-2-f9792566c5d5@amd.com>

On 11/17/2026 11:18 AM, Nikhil P. Rao wrote:
> ionic uses one Tx descriptor per TSO segment, and a Tx ring holds at
> most num_descs - 1 of them. The driver does not set tso_max_segs, so
> the stack can hand it GSO skbs with more segments than the Tx ring
> can hold. ionic_tx() then stops the queue waiting for descriptors
> that can never become free, and the netdev watchdog fires repeatedly.
> 
> This was hit in production: guest TCP traffic with an MSS below 64
> produced 64 KB GSO skbs on the default 1024-entry ring.
> 
> Raise the minimum Tx ring size to IONIC_MIN_TX_DESC (128), for the
> hwstamp and kdump Tx rings as well, and set tso_max_segs to
> IONIC_MIN_TX_DESC - 1 so that every Tx ring can hold the largest TSO
> skb. Larger GSO skbs are segmented in software. 127 segments still
> covers a 64 KB skb at the 536 byte default MSS.
> 
> IONIC_MIN_TXRX_DESC now only applies to Rx, so rename it to
> IONIC_MIN_RX_DESC.
> 
> Tested on an AMD Pensando NIC with GSO frames of about 1500 segments,
> injected through a tap with a virtio-net header and redirected to the
> ionic netdev with tc mirred: without this patch the Tx queue stalls and
> the watchdog fires, and with it they are sent.
> 
> Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling")
> Cc: stable@vger.kernel.org
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Link: https://lore.kernel.org/all/20261112082753.6ee90fc8@kernel.org/
> Signed-off-by: Nikhil P. Rao <nikhil.rao@amd.com>
> Reviewed-by: Brett Creeley <brett.creeley@amd.com>
> ---
>   drivers/net/ethernet/pensando/ionic/ionic_dev.h     |  3 ++-
>   drivers/net/ethernet/pensando/ionic/ionic_ethtool.c |  4 ++--
>   drivers/net/ethernet/pensando/ionic/ionic_lif.c     | 10 ++++++----
>   3 files changed, 10 insertions(+), 7 deletions(-)
> 
[...]
A note for the stable backport: on kernels before v6.19 this patch alone
does not stop the stall for guest traffic. A guest's GSO skb arrives as
SKB_GSO_DODGY with gso_segs still 0, so gso_features_check() never sees
it exceed gso_max_segs. That is the production case here: guest TCP
forwarded through the host to an ionic VF. be1b70ab21cb ("net: init
shinfo->gso_segs from qdisc_pkt_len_init()") fills in gso_segs before
that check.

Tested on v6.8 with an AMD Pensando NIC, using the same tap + tc mirred
injection: with this series alone the Tx queue still stalls; with
be1b70ab21cb added (a one-line backport there) the frames are sent.

So the stable tag on this patch should have been:

Cc: stable@vger.kernel.org # 6.18.x and older: be1b70ab21cb: net: init 
shinfo->gso_segs from qdisc_pkt_len_init()


      reply	other threads:[~2026-11-20 19:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 19:18 [PATCH net v2 0/2] ionic: fix Tx stalls on TSO skbs larger than the Tx ring Nikhil P. Rao
2026-11-17 19:18 ` [PATCH net v2 1/2] ionic: reject Tx ring sizes below the minimum Nikhil P. Rao
2026-11-17 19:18 ` [PATCH net v2 2/2] ionic: limit TSO segments to the minimum Tx ring size Nikhil P. Rao
2026-11-20 19:58   ` Rao, Nikhil [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=41a95b7e-9690-44be-9960-08f959081a13@amd.com \
    --to=nikhirao@amd.com \
    --cc=abhijit.gangurde@amd.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=brett.creeley@amd.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=eric.joyner@amd.com \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikhil.rao@amd.com \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®