From: netdev-bot+sashiko@kernel.org
To: nb@tipi-net.de
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, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, dave.stevenson@raspberrypi.com,
justin.chen@broadcom.com, pierremarinleclercq88@gmail.com
Subject: Re: [PATCH net-next 3/7] net: bcmgenet: rename ENET_MAX_MTU_SIZE to ENET_MAX_FRAME_LEN
Date: Mon, 05 Oct 2026 15:04:42 +0000 [thread overview]
Message-ID: <179121268236.434549.12657609913025768622@kernel.org> (raw)
In-Reply-To: <20261002-nb-genet-mtu-nn-v2-v1-3-96dc6d54cbee@tipi-net.de>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] In drivers/net/ethernet/broadcom/genet/bcmgenet.h, the patch adds
the comment "Longest frame the MAC must accept for the default MTU"…
--
net: bcmgenet: rename ENET_MAX_MTU_SIZE to ENET_MAX_FRAME_LEN
This commit renames ENET_MAX_MTU_SIZE to ENET_MAX_FRAME_LEN, because the
value is a frame length that gets programmed into the hardware and not an
MTU. It also replaces the comment above the definition. The commit says
there is no functional change.
> diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.h b/drivers/net/ethernet/broadcom/genet/bcmgenet.h
> index 86f2aed20dbe8..501dd12566936 100644
> --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.h
> +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.h
> @@ -28,12 +28,11 @@
> /* which ring is descriptor based */
> #define DESC_INDEX 16
>
> -/* Body(1500) + EH_SIZE(14) + VLANTAG(4) + BRCMTAG(6) + FCS(4) = 1528.
> - * 1536 is multiple of 256 bytes
> - */
> #define ENET_BRCM_TAG_LEN 6
> #define ENET_PAD 8
> -#define ENET_MAX_MTU_SIZE (ETH_DATA_LEN + ETH_HLEN + VLAN_HLEN + \
> +
> +/* Longest frame the MAC must accept for the default MTU */
> +#define ENET_MAX_FRAME_LEN (ETH_DATA_LEN + ETH_HLEN + VLAN_HLEN + \
> ENET_BRCM_TAG_LEN + ETH_FCS_LEN + ENET_PAD)
[Severity: Low]
This isn't a bug, but does the new comment match the value of the macro?
ENET_MAX_FRAME_LEN works out to:
1500 + 14 + 4 + 6 + 4 + 8 = 1536
ENET_PAD (8 bytes) is not part of an Ethernet frame. The longest frame for
the default MTU is 1528 bytes, which the removed comment spelled out.
The removed comment also explained that the value was rounded up to 1536
because 1536 is a multiple of 256. Without it, nothing in the driver says
why ENET_PAD exists. The new comment presents the padded value as a frame
length.
The same wording is still there at the end of the series. In "net: bcmgenet:
allow the MTU to be changed", the macro becomes:
/* Longest frame the MAC must accept for a given MTU */
#define ENET_FRAME_OVERHEAD (ETH_HLEN + VLAN_HLEN + ENET_BRCM_TAG_LEN + \
ETH_FCS_LEN + ENET_PAD)
#define ENET_MAX_FRAME_LEN(mtu) ((mtu) + ENET_FRAME_OVERHEAD)
With an arbitrary MTU there is no rounding to a 256-byte multiple, so
ENET_PAD is just 8 bytes of slack with no stated reason.
Could the comment either keep the 1528/1536 explanation, or say why ENET_PAD
is still counted as frame overhead?
> #define DMA_MAX_BURST_LENGTH 0x10
>
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261002-nb-genet-mtu-nn-v2-v1-0-96dc6d54cbee%40tipi-net.de
next prev parent reply other threads:[~2026-10-05 15:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 15:03 [PATCH net-next 0/7] net: bcmgenet: support larger MTUs Nicolai Buchwitz
2026-10-02 15:03 ` [PATCH net-next 1/7] net: bcmgenet: let the caller decide whether to start the PHY Nicolai Buchwitz
2026-10-05 20:22 ` Florian Fainelli
2026-10-02 15:03 ` [PATCH net-next 2/7] net: bcmgenet: allow a continuation descriptor without the alignment pad Nicolai Buchwitz
2026-10-05 15:04 ` netdev-bot+sashiko
2026-10-02 15:03 ` [PATCH net-next 3/7] net: bcmgenet: rename ENET_MAX_MTU_SIZE to ENET_MAX_FRAME_LEN Nicolai Buchwitz
2026-10-05 15:04 ` netdev-bot+sashiko [this message]
2026-10-02 15:03 ` [PATCH net-next 4/7] net: bcmgenet: derive the receive buffer length from the MTU Nicolai Buchwitz
2026-10-05 15:04 ` netdev-bot+sashiko
2026-10-02 15:03 ` [PATCH net-next 5/7] net: bcmgenet: allow the MTU to be changed Nicolai Buchwitz
2026-10-05 15:04 ` netdev-bot+sashiko
2026-10-02 15:03 ` [PATCH net-next 6/7] net: bcmgenet: pad transmit frames out of the packet ready window Nicolai Buchwitz
2026-10-05 15:04 ` netdev-bot+sashiko
2026-10-05 21:35 ` Nicolai Buchwitz
2026-10-02 15:03 ` [PATCH net-next 7/7] net: bcmgenet: reassemble jumbo frames from status block fragments Nicolai Buchwitz
2026-10-05 15:04 ` netdev-bot+sashiko
2026-10-05 21:45 ` 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=179121268236.434549.12657609913025768622@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--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=florian.fainelli@broadcom.com \
--cc=justin.chen@broadcom.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nb@tipi-net.de \
--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®