netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Graeme Smecher <gsmecher@threespeedlogic.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	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: Sat, 16 Dec 2023 11:12:46 -0700	[thread overview]
Message-ID: <aa341e85-6a3f-4d4b-a2a7-b19bf0c9ba2f@kernel.org> (raw)
In-Reply-To: <20231215193024.02819d85@hermes.local>

On 12/15/23 7:30 PM, Stephen Hemminger wrote:
>> diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
>> index c56b6fe6f0d7..69c2a41393a0 100644
>> --- a/net/ipv4/ipconfig.c
>> +++ b/net/ipv4/ipconfig.c
>> @@ -396,9 +396,21 @@ static int __init ic_setup_if(void)
>>  	 */
>>  	if (ic_dev_mtu != 0) {
>>  		rtnl_lock();
>> -		if ((err = dev_set_mtu(ic_dev->dev, ic_dev_mtu)) < 0)
>> -			pr_err("IP-Config: Unable to set interface mtu to %d (%d)\n",
>> -			       ic_dev_mtu, err);
>> +		/* Some Ethernet adapters only allow MTU to change when down. */
> Check if interface was already down first.


it is; see ic_open_devs. ic_close_devs will bring down all interfaces
not configured by ipconfig.



  reply	other threads:[~2023-12-16 18:12 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 [this message]
2023-12-16 18:19     ` David Ahern
2023-12-19 11:33     ` Paolo Abeni
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=aa341e85-6a3f-4d4b-a2a7-b19bf0c9ba2f@kernel.org \
    --to=dsahern@kernel.org \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=davem@davemloft.net \
    --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 \
    --cc=pabeni@redhat.com \
    --cc=stephen@networkplumber.org \
    /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).