From: Nicolai Buchwitz <nb@tipi-net.de>
To: "Théo Lebrun" <theo.lebrun@bootlin.com>
Cc: "Conor Dooley" <conor.dooley@microchip.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>,
"Russell King" <linux@armlinux.org.uk>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"Paolo Valerio" <pvalerio@redhat.com>,
"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
"Gregory CLEMENT" <gregory.clement@bootlin.com>,
"Benoît Monin" <benoit.monin@bootlin.com>,
"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Vineeth Karumanchi" <vineeth.karumanchi@amd.com>
Subject: Re: [PATCH net-next v9 2/3] net: macb: implement ethtool_ops.get|set_channels()
Date: Sat, 28 Nov 2026 13:52:49 +0100 [thread overview]
Message-ID: <a541c74979251cfff2494537f8d42ece@tipi-net.de> (raw)
In-Reply-To: <20261127-macb-set-channels-v9-2-0b3addec7886@bootlin.com>
Hi Théo
> [...]
> @@ -3405,16 +3427,28 @@ static void macb_context_swap_end(struct macb
> *bp,
>
> lockdep_assert_held(&bp->mac_cfg_lock);
>
> - /* Swap contexts & give buffer pointers to HW. */
> + /* Swap contexts & give buffer pointers to HW.
> + * !new_ctx means that the swap failed and we keep the old context.
> + */
>
> - old_ctx = bp->ctx;
> - WRITE_ONCE(bp->ctx, new_ctx);
> - wmb(); /* ensure IRQ enabled below read the new context */
> - macb_init_buffers(bp);
> + if (new_ctx) {
> + old_ctx = bp->ctx;
> + WRITE_ONCE(bp->ctx, new_ctx);
> + wmb(); /* ensure IRQ enabled below read the new context */
> +
> + macb_init_buffers(bp);
> +
> + /* Clear DQL (only on successful context swap). */
> + for (q = 0; q < bp->max_num_queues; ++q)
> + netdev_tx_reset_queue(netdev_get_tx_queue(bp->netdev,
> + q));
> + } else {
> + gem_shuffle_tx_rings(bp);
> + }
Under load the frame at txq->tail can already be sent, so index 0
has TX_USED after the shuffle. Doesn't Tx stall there?
Maybe reclaim completed frames before the shuffle?
> [...]
Thanks,
Nicolai
next prev parent reply other threads:[~2026-11-28 12:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 21:44 [PATCH net-next v9 0/3] net: macb: implement ethtool set channels count operation Théo Lebrun
2026-11-27 21:44 ` [PATCH net-next v9 1/3] net: macb: cache ENST config across link down/up Théo Lebrun
2026-11-28 12:50 ` Nicolai Buchwitz
2026-11-27 21:44 ` [PATCH net-next v9 2/3] net: macb: implement ethtool_ops.get|set_channels() Théo Lebrun
2026-11-28 12:52 ` Nicolai Buchwitz [this message]
2026-11-27 21:44 ` [PATCH net-next v9 3/3] net: macb: distribute evenly Tx SRAM segments Théo Lebrun
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=a541c74979251cfff2494537f8d42ece@tipi-net.de \
--to=nb@tipi-net.de \
--cc=andrew+netdev@lunn.ch \
--cc=benoit.monin@bootlin.com \
--cc=conor.dooley@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pvalerio@redhat.com \
--cc=tawfik.bayouk@mobileye.com \
--cc=theo.lebrun@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vineeth.karumanchi@amd.com \
--cc=vladimir.kondratiev@mobileye.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