From: Thomas Perrot <thomas.perrot@bootlin.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v3] net: macb: remove change_mtu callback
Date: Wed, 13 Mar 2024 14:39:05 +0100 [thread overview]
Message-ID: <21ec269340a83f436bbf7a23a2be4289c88b70dd.camel@bootlin.com> (raw)
In-Reply-To: <20240311161727.629c0bab@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1576 bytes --]
Hello,
On Mon, 2024-03-11 at 16:17 -0700, Jakub Kicinski wrote:
> On Mon, 11 Mar 2024 16:43:15 +0100 thomas.perrot@bootlin.com wrote:
> > Because it doesn't allow MTU changes when the interface is up,
> > although
> > it is not necessary.
> >
> > This callback has been added to add in a first implementation of
> > the Jumbo
> > support [1],since it has been reworked and moved to the probe [2].
> >
> > With this patch the core will set the MTU, regardless of if the
> > interface
> > is up or not.
> >
> > [1] commit a5898ea09aad ("net: macb: Add change_mtu callback with
> > jumbo support")
> > [2] commit 44770e1180de ("ethernet: use core min/max MTU checking")
> >
> > Fixes: 44770e1180de ("ethernet: use core min/max MTU checking")
>
> static void macb_init_rx_buffer_size(struct macb *bp, size_t size)
> {
> if (!macb_is_gem(bp)) {
> bp->rx_buffer_size = MACB_RX_BUFFER_SIZE;
> } else {
> bp->rx_buffer_size = size;
>
> where size is:
>
> size_t bufsz = dev->mtu + ETH_HLEN + ETH_FCS_LEN +
> NET_IP_ALIGN;
>
> I guess you tested this on a platform where !macb_is_gem(bp) ?
Thank you for your review, indeed that won’t be correct on GEM in when
the MTU used to initialize the RX buffer is lower than the new MTU.
So, I will suggest another patch with an acceptable solution.
Kind regards,
Thomas Perrot
> Otherwise the buffer size seems to be based on MTU and the proposed
> change won't be correct.
--
Thomas Perrot, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
prev parent reply other threads:[~2024-03-13 13:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 15:43 thomas.perrot
2024-03-11 23:17 ` Jakub Kicinski
2024-03-13 13:39 ` Thomas Perrot [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=21ec269340a83f436bbf7a23a2be4289c88b70dd.camel@bootlin.com \
--to=thomas.perrot@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=pabeni@redhat.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®