netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Andy Ren <andy.ren@getcruise.com>
Cc: netdev@vger.kernel.org, richardbgobert@gmail.com,
	davem@davemloft.net, wsa+renesas@sang-engineering.com,
	edumazet@google.com, petrm@nvidia.com, kuba@kernel.org,
	pabeni@redhat.com, corbet@lwn.net, andrew@lunn.ch,
	dsahern@gmail.com, sthemmin@microsoft.com,
	sridhar.samudrala@intel.com, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, roman.gushchin@linux.dev
Subject: Re: [PATCH net-next v3] net/core: Allow live renaming when an interface is up
Date: Tue, 8 Nov 2022 13:02:38 +0200	[thread overview]
Message-ID: <Y2o3ThYXNADKiwRT@shredder> (raw)
In-Reply-To: <20221107174242.1947286-1-andy.ren@getcruise.com>

On Mon, Nov 07, 2022 at 09:42:42AM -0800, Andy Ren wrote:
> Allow a network interface to be renamed when the interface
> is up.
> 
> As described in the netconsole documentation [1], when netconsole is
> used as a built-in, it will bring up the specified interface as soon as
> possible. As a result, user space will not be able to rename the
> interface since the kernel disallows renaming of interfaces that are
> administratively up unless the 'IFF_LIVE_RENAME_OK' private flag was set
> by the kernel.
> 
> The original solution [2] to this problem was to add a new parameter to
> the netconsole configuration parameters that allows renaming of
> the interface used by netconsole while it is administratively up.
> However, during the discussion that followed, it became apparent that we
> have no reason to keep the current restriction and instead we should
> allow user space to rename interfaces regardless of their administrative
> state:
> 
> 1. The restriction was put in place over 20 years ago when renaming was
> only possible via IOCTL and before rtnetlink started notifying user
> space about such changes like it does today.
> 
> 2. The 'IFF_LIVE_RENAME_OK' flag was added over 3 years ago in version
> 5.2 and no regressions were reported.
> 
> 3. In-kernel listeners to 'NETDEV_CHANGENAME' do not seem to care about
> the administrative state of interface.
> 
> Therefore, allow user space to rename running interfaces by removing the
> restriction and the associated 'IFF_LIVE_RENAME_OK' flag. Help in
> possible triage by emitting a message to the kernel log that an
> interface was renamed while UP.
> 
> [1] https://www.kernel.org/doc/Documentation/networking/netconsole.rst
> [2] https://lore.kernel.org/netdev/20221102002420.2613004-1-andy.ren@getcruise.com/
> 
> Signed-off-by: Andy Ren <andy.ren@getcruise.com>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

  reply	other threads:[~2022-11-08 11:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07 17:42 [PATCH net-next v3] net/core: Allow live renaming when an interface is up Andy Ren
2022-11-08 11:02 ` Ido Schimmel [this message]
2022-11-08 15:30 ` David Ahern
2022-11-09 14:00 ` patchwork-bot+netdevbpf

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=Y2o3ThYXNADKiwRT@shredder \
    --to=idosch@idosch.org \
    --cc=andrew@lunn.ch \
    --cc=andy.ren@getcruise.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=richardbgobert@gmail.com \
    --cc=roman.gushchin@linux.dev \
    --cc=sridhar.samudrala@intel.com \
    --cc=sthemmin@microsoft.com \
    --cc=wsa+renesas@sang-engineering.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).