netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Graeme Smecher <gsmecher@threespeedlogic.com>,
	David Ahern <dsahern@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, claudiu.beznea@tuxon.dev,
	 nicolas.ferre@microchip.com, mdf@kernel.org
Subject: Re: [PATCH] RFC: net: ipconfig: temporarily bring interface down when changing MTU.
Date: Tue, 19 Dec 2023 12:33:58 +0100	[thread overview]
Message-ID: <96daa3fe4db8169be920d40770d3b92a30e7f200.camel@redhat.com> (raw)
In-Reply-To: <20231216010431.84776-1-gsmecher@threespeedlogic.com>

On Fri, 2023-12-15 at 17:04 -0800, Graeme Smecher wrote:
> Several network drivers (sh_eth, macb_main, nixge, sundance) only allow
> the MTU to be changed when the interface is down, because their buffer
> allocations are performed during ndo_open() and calculated using a
> specific MTU.

I think we have to address that in the relevant device drivers. This
could cause significant regressions: changing the MTU may causes the
device to stay down afterwards - if the device fails to re-initialize.

That even for drivers that before failed gracefully.

Instead, at the device level, the driver could allocate in advance the
new ring, and restore the previous one if the allocation fails, always
leaving the device in a consistent status.

Cheers,

Paolo


  parent reply	other threads:[~2023-12-19 11:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 20:07 net: ipconfig: dev_set_mtu call is incompatible with a number of Ethernet drivers Graeme Smecher
2023-12-15 17:49 ` David Ahern
2023-12-16  1:04   ` [PATCH] RFC: net: ipconfig: temporarily bring interface down when changing MTU Graeme Smecher
2023-12-16  3:30     ` Stephen Hemminger
2023-12-16 18:12       ` David Ahern
2023-12-16 18:19     ` David Ahern
2023-12-19 11:33     ` Paolo Abeni [this message]
2023-12-17 18:22   ` net: ipconfig: dev_set_mtu call is incompatible with a number of Ethernet drivers Andrew Lunn
2023-12-17 18:42     ` David Ahern

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=96daa3fe4db8169be920d40770d3b92a30e7f200.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=gsmecher@threespeedlogic.com \
    --cc=kuba@kernel.org \
    --cc=mdf@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.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;
as well as URLs for NNTP newsgroup(s).