mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolai Buchwitz <nb@tipi-net.de>
To: netdev-bot+sashiko@kernel.org, florian.fainelli@broadcom.com,
	justin.chen@broadcom.com
Cc: opendmb@gmail.com, bcm-kernel-feedback-list@broadcom.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
	kuba@kernel.org, pabeni@redhat.com, f.fainelli@gmail.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	pierremarinleclercq88@gmail.com, dave.stevenson@raspberrypi.com
Subject: Re: [PATCH net-next v7 6/9] net: bcmgenet: split frames that end just past the transmit threshold
Date: Tue, 17 Nov 2026 10:05:49 +0100	[thread overview]
Message-ID: <3d17930b465b31cee713aa4c690d490e@tipi-net.de> (raw)
In-Reply-To: <179474771225.2199510.15415138115246393692@kernel.org>

On 15.11.2026 14:01, netdev-bot+sashiko@kernel.org wrote:
> [...]

> [Severity: Medium]
> The commit message says the window "is one DMA transfer wide". The TX
> DMA burst size, though, is set per platform in bcmgenet_dma_init():
> 
> 	bcmgenet_tdma_writel(priv, priv->dma_max_burst_length,
> 			     DMA_SCB_BURST_SIZE);
> 
> bcm2711_plat_data uses .dma_max_burst_length = 0x08. The v2, v3, v4, v5
> and bcm7712 platform data use DMA_MAX_BURST_LENGTH (0x10).
> 
> Suppose the window grows with the programmed burst. On the 0x10 burst
> parts, a frame could end 64 bytes or more past tx_thld_len and still
> fall inside one transfer. Would bcmgenet_xmit() then skip the split for
> it? That would leave the Tx DMA stall and the bcmgenet_init_dma()
> failure in place on those cores.
> 
> The measurements in the message come from one v5. Once "net: bcmgenet:
> allow the MTU to be changed" raises max_mtu on every non-v1 core, this
> case becomes reachable.
> 
> Should the window be derived from dma_max_burst_length, or has 64 been
> checked on a core with a 0x10 burst?

Right, bcm2711 has the reduced burst length. I don't know the details 
why
this is required, but my tests with 0x10 have confirmed that this quirk 
is
needed. I will derive it from burst length in v8.

> [...]

> [Severity: Medium]
> Does ENET_THLD_MAX (3840 bytes) fit in the TBUF of every GENET version
> that gets it here? bcmgenet_tx_pkt_rdy_thld() returns the same value
> for all versions. bcmgenet_set_mtu_regs() then writes it on v2 and
> later, with no clamp per version.
> 
> init_umac() programs the TBUF size control only on v3 and later:
> 
> 	if (!GENET_IS_V1(priv) && !GENET_IS_V2(priv))
> 		bcmgenet_rbuf_writel(priv, 1, RBUF_TBUF_SIZE_CTRL);
> 
> So v2 has different TBUF sizing but gets the same threshold. The
> measurements in the commit message are from a v5 only.
> 
> Suppose a core's TBUF cannot hold 3840 bytes. Could a frame longer than
> that TBUF then never reach the threshold and stall the transmitter?
> 
> "net: bcmgenet: allow the MTU to be changed" later sets
> dev->max_mtu = ENET_MAX_MTU for every non-v1 core. That would make this
> setting reachable on v2 through v4.

I only have tested with v5 (bcm2711).

Florian / Justin: Can you test with older versions or confirm that they 
will
behave the same. Otherwise I can also cap max_mtu to v5 only.

> [ ... ]

--
pw-bot: cr

  reply	other threads:[~2026-11-17  9:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 10:45 [PATCH net-next v7 0/9] net: bcmgenet: support larger MTUs Nicolai Buchwitz
2026-11-12 10:45 ` [PATCH net-next v7 1/9] net: bcmgenet: ring the doorbell when the last frame of a batch is dropped Nicolai Buchwitz
2026-11-12 10:45 ` [PATCH net-next v7 2/9] net: bcmgenet: let the caller decide whether to start the PHY Nicolai Buchwitz
2026-11-12 10:45 ` [PATCH net-next v7 3/9] net: bcmgenet: allow a continuation descriptor without the alignment pad Nicolai Buchwitz
2026-11-12 10:45 ` [PATCH net-next v7 4/9] net: bcmgenet: rename ENET_MAX_MTU_SIZE to ENET_MAX_FRAME_LEN Nicolai Buchwitz
2026-11-12 10:45 ` [PATCH net-next v7 5/9] net: bcmgenet: derive the receive buffer length from the MTU Nicolai Buchwitz
2026-11-15 13:01   ` netdev-bot+sashiko
2026-11-12 10:45 ` [PATCH net-next v7 6/9] net: bcmgenet: split frames that end just past the transmit threshold Nicolai Buchwitz
2026-11-15 13:01   ` netdev-bot+sashiko
2026-11-17  9:05     ` Nicolai Buchwitz [this message]
2026-11-12 10:45 ` [PATCH net-next v7 7/9] net: bcmgenet: build the DMA rings before giving up the running ones Nicolai Buchwitz
2026-11-12 10:45 ` [PATCH net-next v7 8/9] net: bcmgenet: allow the MTU to be changed Nicolai Buchwitz
2026-11-15 13:01   ` netdev-bot+sashiko
2026-11-17  9:10     ` Nicolai Buchwitz
2026-11-12 10:45 ` [PATCH net-next v7 9/9] net: bcmgenet: reassemble jumbo frames from status block fragments Nicolai Buchwitz
2026-11-15 13:01   ` netdev-bot+sashiko
2026-11-17  9:17     ` Nicolai Buchwitz

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=3d17930b465b31cee713aa4c690d490e@tipi-net.de \
    --to=nb@tipi-net.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=justin.chen@broadcom.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=pierremarinleclercq88@gmail.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

all inboxes | Powered by JetHome®