From: Nicolai Buchwitz <nb@tipi-net.de>
To: netdev-bot+sashiko@kernel.org
Cc: opendmb@gmail.com, florian.fainelli@broadcom.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com, justin.chen@broadcom.com,
bcm-kernel-feedback-list@broadcom.com, razor@blackwall.org,
kerneljasonxing@gmail.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: bcmgenet: cap the Tx queue threshold at the ring size
Date: Mon, 09 Nov 2026 21:28:48 +0100 [thread overview]
Message-ID: <62513008af14da4a6fb35e1a9566146dca0efbef.camel@tipi-net.de> (raw)
In-Reply-To: <179424433591.994134.17565447879442853727@kernel.org>
On Mon, 2026-11-09 at 17:12 +0000, netdev-bot+sashiko@kernel.org wrote:
> [...]
> [Severity: High]
>
> Does this fully fix the stall on queues 1 to 4 when
> CONFIG_MAX_SKB_FRAGS
> is 31 or more? The wake threshold is now capped, but the per-skb
> admission
> check at the top of bcmgenet_xmit() has not changed:
>
> bcmgenet_xmit() {
> ...
> if (ring->free_bds <= (nr_frags + 1)) {
> if (!netif_tx_queue_stopped(txq))
> netif_tx_stop_queue(txq);
> ret = NETDEV_TX_BUSY;
> goto out;
> }
> ...
> }
>
> free_bds can never be larger than ring->size (32). So an skb with
> nr_frags >= 31 gets rejected even when the ring is completely empty.
>
> In that case nothing is in flight, so no Tx-done interrupt arrives
> and
> bcmgenet_tx_poll() never wakes the queue. The watchdog is the only
> wake
> source left:
>
> dev_watchdog()
> bcmgenet_timeout()
> bcmgenet_tx_reclaim(dev, ring, true);
> BCMGENET_STATS64_INC((&ring->stats64), errors);
> netif_tx_wake_queue(txq);
>
> The qdisc then retries the same requeued skb and gets NETDEV_TX_BUSY
> again, so the queue stops again.
>
> Wouldn't that leave the queue, and every flow hashed to it, stuck for
> good? The "NETDEV WATCHDOG: transmit queue N timed out" message and
> the
> error count from the commit message would then come back every
> watchdog_timeo.
>
> The core does not keep such skbs away from the driver. The driver
> advertises NETIF_F_SG, and it has no ndo_features_check and no
> skb_linearize() fallback. Highly fragmented skbs can come from
> MSG_ZEROCOPY, from splice, or from forwarded traffic.
>
> Should bcmgenet_xmit() also handle skbs where nr_frags + 1 >= ring-
> >size?
> It could linearize or drop them, or clear NETIF_F_SG for them in
> ndo_features_check.
>
> > ring->clean_ptr = start_ptr;
> > ring->c_index = 0;
> > ring->free_bds = size;
>
> [ ... ]
Another angle, also pre-existing, but lets fix this properly with
another patch in v2. Long term goal should be to get rid of the
undersized queues (see my response to Florian)
--
pw-bot: cr
--
Nicolai Buchwitz <nb@tipi-net.de>
prev parent reply other threads:[~2026-11-09 20:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 14:10 Nicolai Buchwitz
2026-11-07 0:14 ` Florian Fainelli
2026-11-07 11:53 ` Nicolai Buchwitz
2026-11-09 17:12 ` netdev-bot+sashiko
2026-11-09 20:28 ` Nicolai Buchwitz [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=62513008af14da4a6fb35e1a9566146dca0efbef.camel@tipi-net.de \
--to=nb@tipi-net.de \
--cc=andrew+netdev@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=justin.chen@broadcom.com \
--cc=kerneljasonxing@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=pabeni@redhat.com \
--cc=razor@blackwall.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®