Netdev List
 help / color / mirror / Atom feed
From: Nicolai Buchwitz <nb@tipi-net.de>
To: netdev-bot+sashiko@kernel.org
Cc: opendmb@gmail.com, florian.fainelli@broadcom.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, justin.chen@broadcom.com
Subject: Re: [PATCH net-next v10 8/8] net: bcmgenet: reassemble jumbo frames from status block fragments
Date: Sat, 28 Nov 2026 14:12:54 +0100	[thread overview]
Message-ID: <c79e49d9dfe3e90603025a6d014cd224@tipi-net.de> (raw)
In-Reply-To: <179586516852.3135.10254038893964145277@kernel.org>

On 28.11.2026 12:26, netdev-bot+sashiko@kernel.org wrote:

> [...]

> [Severity: Medium]
> Can a split frame end with a descriptor that holds only its status
> block plus DMA_EOP, with no payload?

Not on a bcm2711. I tested both boundaries reachable with MTU 9000, 3582
and 7166, 200 frames each. All bytes were delivered and I observed no 
errors.
EOP landed on the last descriptor that had data.

> [...]

> [Severity: Medium]
> For a reassembled frame, dma_flag at the deliver label holds the status
> word of the final EOP descriptor. The stats code in bcmgenet_desc_rx()
> then does:
> 
> 	if (dma_flag & DMA_RX_MULT)
> 		u64_stats_inc(&stats->multicast);
> 	else if (dma_flag & DMA_RX_BRDCAST)
> 		u64_stats_inc(&stats->broadcast);
> 
> The commit message says the status blocks of a split frame differ
> ("Only the last block holds the checksum of the whole frame"). It
> doesn't say which block carries the DMA_RX_MULT and DMA_RX_BRDCAST
> classification. The MAC already has that from the destination address
> when it writes the SOP block.
> 
> If these flags are set only in the SOP status block, would jumbo
> multicast and broadcast frames go uncounted in stats->multicast and
> stats->broadcast?

They do, but the SOP block has no flags either.

The MAC just stops setting DMA_RX_BRDCAST and DMA_RX_MULT above 1518 
bytes,
same boundary at MTU 1500 as at 9000. So a full size VLAN tagged 
broadcast
frame is already miscounted today.

I'd make this a separate fix for net, using skb->pkt_type instead.

> Could the SOP descriptor's flags be saved when frag_head is set up and
> used here instead?
> 
>> 
>>  		/* Build SKB from the page - data starts at hard_start,
>>  		 * frame begins after RSB(64) + pad(2) = 66 bytes.
>>  		 */
> 
> [ ... ]

      reply	other threads:[~2026-11-28 13:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 11:25 [PATCH net-next v10 0/8] net: bcmgenet: support larger MTUs Nicolai Buchwitz
2026-11-27 11:25 ` [PATCH net-next v10 1/8] net: bcmgenet: let the caller decide whether to start the PHY Nicolai Buchwitz
2026-11-27 11:25 ` [PATCH net-next v10 2/8] net: bcmgenet: allow a continuation descriptor without the alignment pad Nicolai Buchwitz
2026-11-28 11:26   ` netdev-bot+sashiko
2026-11-27 11:25 ` [PATCH net-next v10 3/8] net: bcmgenet: rename ENET_MAX_MTU_SIZE to ENET_MAX_FRAME_LEN Nicolai Buchwitz
2026-11-28 11:26   ` netdev-bot+sashiko
2026-11-27 11:25 ` [PATCH net-next v10 4/8] net: bcmgenet: derive the receive buffer length from the MTU Nicolai Buchwitz
2026-11-28 11:26   ` netdev-bot+sashiko
2026-11-27 11:25 ` [PATCH net-next v10 5/8] net: bcmgenet: split frames that end just past the transmit threshold Nicolai Buchwitz
2026-11-28 11:26   ` netdev-bot+sashiko
2026-11-28 13:04     ` Nicolai Buchwitz
2026-11-27 11:25 ` [PATCH net-next v10 6/8] net: bcmgenet: build the DMA rings before giving up the running ones Nicolai Buchwitz
2026-11-27 11:25 ` [PATCH net-next v10 7/8] net: bcmgenet: allow the MTU to be changed Nicolai Buchwitz
2026-11-28 11:26   ` netdev-bot+sashiko
2026-11-28 13:07     ` Nicolai Buchwitz
2026-11-27 11:25 ` [PATCH net-next v10 8/8] net: bcmgenet: reassemble jumbo frames from status block fragments Nicolai Buchwitz
2026-11-28 11:26   ` netdev-bot+sashiko
2026-11-28 13:12     ` 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=c79e49d9dfe3e90603025a6d014cd224@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