Netdev List
 help / color / mirror / Atom feed
From: Kordian Chmielewski <kudzo51@gmail.com>
To: netdev-bot+sashiko@kernel.org
Cc: netdev@vger.kernel.org, "Florian Fainelli" <f.fainelli@gmail.com>,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Rafał Miłecki" <rafal@milecki.pl>,
	bcm-kernel-feedback-list@broadcom.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>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 1/6] net: bcm4908_enet: fix the TX ring wrap
Date: Sat, 14 Nov 2026 00:57:42 +0100	[thread overview]
Message-ID: <20261113235742.516908-1-kudzo51@gmail.com> (raw)
In-Reply-To: <179460252768.2199510.4667025168810979943@kernel.org>

On Fri, 13 Nov 2026 20:42:07 +0000, netdev-bot+sashiko@kernel.org wrote:
> - [Medium] net: bcm4908_enet: missing barriers and late write_idx update
>   on TX ring

Both parts are older than this series, and this patch doesn't change
them.

For the barriers, v3 adds a patch in which each side publishes its
index with smp_store_release() and reads the other side's index with
smp_load_acquire() before it touches the slots. It also covers the
bcm4908_enet_poll_tx() issue below.

As for the late write_idx update, start_xmit() has updated write_idx
after kicking the DMA since the driver was added, but that only became
a race when the TX interrupt support moved the TX cleanup out of
start_xmit(). In v3, start_xmit() publishes write_idx right after the
descriptor, before the MMIO write that kicks the DMA, so the window no
longer spans that write. As the review says, though, it can still be
there if the channel is busy with earlier frames and picks up the
descriptor as soon as it sees OWN. I'll look at it separately.

> Pre-existing issues:
> - [High] When the device tree has no "tx" interrupt, TX completions never
>   run, so the queue stop/wake design this patch adds cannot work.

The v1 review found this too. Without the TX interrupt, open() never
enables the TX NAPI, so nothing frees the sent frames and TX stops for
good once the queue is stopped, and stop() hangs in napi_disable().
Every in-tree device tree that uses this driver has the TX interrupt.
Florian, Rafał, would you rather have the driver require it (and the
binding say so), or poll the ring on a timer when it is missing? I'd
send that after this series.

> - [High] bcm4908_enet_poll_tx() reads the producer index without a lock
>   or ordering, then reads descriptor and slot contents with no read…

Covered by the new patch in v3, as above.

  reply	other threads:[~2026-11-13 23:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 19:50 [PATCH net v2 0/6] net: bcm4908_enet: TX ring and DMA fixes Kordian Chmielewski
2026-11-12 19:50 ` [PATCH net v2 1/6] net: bcm4908_enet: fix the TX ring wrap Kordian Chmielewski
2026-11-12 22:24   ` Florian Fainelli
2026-11-13 20:42   ` netdev-bot+sashiko
2026-11-13 23:57     ` Kordian Chmielewski [this message]
2026-11-12 19:50 ` [PATCH net v2 2/6] net: bcm4908_enet: drop a TX frame whose DMA mapping failed Kordian Chmielewski
2026-11-12 22:21   ` Florian Fainelli
2026-11-12 19:50 ` [PATCH net v2 3/6] net: bcm4908_enet: release the TX ring on stop Kordian Chmielewski
2026-11-12 22:22   ` Florian Fainelli
2026-11-13 20:42   ` netdev-bot+sashiko
2026-11-13 23:57     ` Kordian Chmielewski
2026-11-12 19:50 ` [PATCH net v2 4/6] net: bcm4908_enet: unmap the buffer of a dropped RX frame Kordian Chmielewski
2026-11-12 22:20   ` Florian Fainelli
2026-11-12 19:50 ` [PATCH net v2 5/6] net: bcm4908_enet: unmap RX buffers on stop with their mapped size Kordian Chmielewski
2026-11-12 22:20   ` Florian Fainelli
2026-11-12 19:50 ` [PATCH net v2 6/6] net: bcm4908_enet: publish the buffer address before OWN Kordian Chmielewski
2026-11-12 22:20   ` Florian Fainelli

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=20261113235742.516908-1-kudzo51@gmail.com \
    --to=kudzo51@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rafal@milecki.pl \
    /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