I understand the 'legacy' concern but at the same time we don't want to
have aftificial limitations too. Name change, in particular, doesn't
happen 'under the hood' -- someone privileged enough needs to request
the change.
Can you think of any particular real world scenarios which are broken by
the change?
How about:
man 8 dhclient-script
The interface name is passed in $interface to the scripts. Do we get
the old name or the new name? I suspect scripts are going to break if
they are given the old name, which no longer exists.
Yes but why would anyone change interface name while dhclient-script is
running? Things will also go wrong if you try bringing interface down
during the run or do some other configuration, right? Running multiple
configuration tools at the same moment is a bad idea, you never know
what you're gonna end up with.
As I see it, checks in kernel we have are meant to protect kernel
itself, not to disallow all user<->kernel interactions leading to
imperfect result.
(AFAIU) If we remove the check nothing is going to change: udev will
still be renaming interfaces before bringing them up. In netvsc case
users are not supposed to configure the VF interface at all, it just
becomes a slave of netvsc interface.
--
Vitaly
From: Eric Dumazet <hidden> Date: 2017-08-10 09:03:41
On Thu, 2017-08-10 at 10:41 +0200, Vitaly Kuznetsov wrote:
Andrew Lunn [off-list ref] writes:
quoted
quoted
I understand the 'legacy' concern but at the same time we don't want to
have aftificial limitations too. Name change, in particular, doesn't
happen 'under the hood' -- someone privileged enough needs to request
the change.
Can you think of any particular real world scenarios which are broken by
the change?
How about:
man 8 dhclient-script
The interface name is passed in $interface to the scripts. Do we get
the old name or the new name? I suspect scripts are going to break if
they are given the old name, which no longer exists.
Yes but why would anyone change interface name while dhclient-script is
running? Things will also go wrong if you try bringing interface down
during the run or do some other configuration, right? Running multiple
configuration tools at the same moment is a bad idea, you never know
what you're gonna end up with.
As I see it, checks in kernel we have are meant to protect kernel
itself, not to disallow all user<->kernel interactions leading to
imperfect result.
(AFAIU) If we remove the check nothing is going to change: udev will
still be renaming interfaces before bringing them up. In netvsc case
users are not supposed to configure the VF interface at all, it just
becomes a slave of netvsc interface.
Are we sending an event if device name is changed ?
If yes, your patch is fine.
If not, daemons would not be aware the need to refresh their view of the
world.
On Thu, 2017-08-10 at 10:41 +0200, Vitaly Kuznetsov wrote:
quoted
Andrew Lunn [off-list ref] writes:
quoted
quoted
I understand the 'legacy' concern but at the same time we don't want to
have aftificial limitations too. Name change, in particular, doesn't
happen 'under the hood' -- someone privileged enough needs to request
the change.
Can you think of any particular real world scenarios which are broken by
the change?
How about:
man 8 dhclient-script
The interface name is passed in $interface to the scripts. Do we get
the old name or the new name? I suspect scripts are going to break if
they are given the old name, which no longer exists.
Yes but why would anyone change interface name while dhclient-script is
running? Things will also go wrong if you try bringing interface down
during the run or do some other configuration, right? Running multiple
configuration tools at the same moment is a bad idea, you never know
what you're gonna end up with.
As I see it, checks in kernel we have are meant to protect kernel
itself, not to disallow all user<->kernel interactions leading to
imperfect result.
(AFAIU) If we remove the check nothing is going to change: udev will
still be renaming interfaces before bringing them up. In netvsc case
users are not supposed to configure the VF interface at all, it just
becomes a slave of netvsc interface.
Are we sending an event if device name is changed ?
We are - rtnetlink_event() does the job. We, however, don't have a
special IFLA_EVENT_* for name change and end up with IFLA_EVENT_NONE.
If yes, your patch is fine.
If not, daemons would not be aware the need to refresh their view of the
world.
Yes but AFAIU daemons may need to do the same refresh when the interface
is down too (and, hopefully, they do it already).
--
Vitaly
From: Andrew Lunn <andrew@lunn.ch> Date: 2017-08-10 14:10:24
quoted
quoted
Can you think of any particular real world scenarios which are broken by
the change?
How about:
man 8 dhclient-script
The interface name is passed in $interface to the scripts. Do we get
the old name or the new name? I suspect scripts are going to break if
they are given the old name, which no longer exists.
Yes but why would anyone change interface name while dhclient-script is
running? Things will also go wrong if you try bringing interface down
during the run or do some other configuration, right?
dhclient already handles the interface going down. sendto/recvfrom
fails and returns an error code. As far as i remember, dhclient then
exits.
Running multiple configuration tools at the same moment is a bad
idea, you never know what you're gonna end up with.
It could be argued that configuring an interface vs renaming an
interface are at different levels.
Andrew
We are - rtnetlink_event() does the job. We, however, don't have a
special IFLA_EVENT_* for name change and end up with IFLA_EVENT_NONE.
What is in this event? Old and new name? Just the new name?
Basically, it's everything we know about the interface - type, index,
name, mtu, qdisc, ... - see rtnl_fill_ifinfo(). Back to your question -
it's only the new name.
--
Vitaly
From: Andrew Lunn <andrew@lunn.ch> Date: 2017-08-10 16:27:27
On Thu, Aug 10, 2017 at 05:24:55PM +0200, Vitaly Kuznetsov wrote:
Andrew Lunn [off-list ref] writes:
quoted
quoted
We are - rtnetlink_event() does the job. We, however, don't have a
special IFLA_EVENT_* for name change and end up with IFLA_EVENT_NONE.
What is in this event? Old and new name? Just the new name?
Basically, it's everything we know about the interface - type, index,
name, mtu, qdisc, ... - see rtnl_fill_ifinfo(). Back to your question -
it's only the new name.
So the program needs to keep track of ifindex to know which interface
has changed name. Doable.
I still expect this has the potential to break something. You probably
should be asking on linux-api for the API experts opinion.
Andrew
On Thu, Aug 10, 2017 at 05:24:55PM +0200, Vitaly Kuznetsov wrote:
quoted
Andrew Lunn [off-list ref] writes:
quoted
quoted
We are - rtnetlink_event() does the job. We, however, don't have a
special IFLA_EVENT_* for name change and end up with IFLA_EVENT_NONE.
What is in this event? Old and new name? Just the new name?
Basically, it's everything we know about the interface - type, index,
name, mtu, qdisc, ... - see rtnl_fill_ifinfo(). Back to your question -
it's only the new name.
So the program needs to keep track of ifindex to know which interface
has changed name. Doable.
Yes, and I'd expect that's what these daemons do nowdays to track name
changes for down interfaces (if/when they care).
I still expect this has the potential to break something. You probably
should be asking on linux-api for the API experts opinion.
From: David Miller <davem@davemloft.net> Date: 2017-08-10 16:48:05
From: Andrew Lunn <andrew@lunn.ch>
Date: Thu, 10 Aug 2017 18:27:22 +0200
On Thu, Aug 10, 2017 at 05:24:55PM +0200, Vitaly Kuznetsov wrote:
quoted
Andrew Lunn [off-list ref] writes:
quoted
quoted
We are - rtnetlink_event() does the job. We, however, don't have a
special IFLA_EVENT_* for name change and end up with IFLA_EVENT_NONE.
What is in this event? Old and new name? Just the new name?
Basically, it's everything we know about the interface - type, index,
name, mtu, qdisc, ... - see rtnl_fill_ifinfo(). Back to your question -
it's only the new name.
So the program needs to keep track of ifindex to know which interface
has changed name. Doable.
I still expect this has the potential to break something. You probably
should be asking on linux-api for the API experts opinion.
But a greater point is that nobody is monitoring device renames
explicitly right now.
It's hard to legitimize imposing new requirements like this on daemons
which didn't exist before.
If they could assume the name didn't change, they probably are doing
so.
You can't expect that just because they might already be listening to
this event for device up and down tracking that they are handling
device renames.
From: David Ahern <hidden> Date: 2017-08-10 16:55:03
On 8/10/17 10:48 AM, David Miller wrote:
From: Andrew Lunn <andrew@lunn.ch>
Date: Thu, 10 Aug 2017 18:27:22 +0200
quoted
On Thu, Aug 10, 2017 at 05:24:55PM +0200, Vitaly Kuznetsov wrote:
quoted
Andrew Lunn [off-list ref] writes:
quoted
quoted
We are - rtnetlink_event() does the job. We, however, don't have a
special IFLA_EVENT_* for name change and end up with IFLA_EVENT_NONE.
What is in this event? Old and new name? Just the new name?
Basically, it's everything we know about the interface - type, index,
name, mtu, qdisc, ... - see rtnl_fill_ifinfo(). Back to your question -
it's only the new name.
So the program needs to keep track of ifindex to know which interface
has changed name. Doable.
I still expect this has the potential to break something. You probably
should be asking on linux-api for the API experts opinion.
But a greater point is that nobody is monitoring device renames
explicitly right now.
From: Stephen Hemminger <stephen@networkplumber.org> Date: 2017-08-10 17:16:21
On Thu, 10 Aug 2017 10:55:01 -0600
David Ahern [off-list ref] wrote:
On 8/10/17 10:48 AM, David Miller wrote:
quoted
From: Andrew Lunn <andrew@lunn.ch>
Date: Thu, 10 Aug 2017 18:27:22 +0200
quoted
On Thu, Aug 10, 2017 at 05:24:55PM +0200, Vitaly Kuznetsov wrote:
quoted
Andrew Lunn [off-list ref] writes:
quoted
quoted
We are - rtnetlink_event() does the job. We, however, don't have a
special IFLA_EVENT_* for name change and end up with IFLA_EVENT_NONE.
What is in this event? Old and new name? Just the new name?
Basically, it's everything we know about the interface - type, index,
name, mtu, qdisc, ... - see rtnl_fill_ifinfo(). Back to your question -
it's only the new name.
So the program needs to keep track of ifindex to know which interface
has changed name. Doable.
I still expect this has the potential to break something. You probably
should be asking on linux-api for the API experts opinion.
But a greater point is that nobody is monitoring device renames
explicitly right now.
On Thu, 10 Aug 2017 10:55:01 -0600
David Ahern [off-list ref] wrote:
quoted
On 8/10/17 10:48 AM, David Miller wrote:
quoted
From: Andrew Lunn <andrew@lunn.ch>
Date: Thu, 10 Aug 2017 18:27:22 +0200
quoted
On Thu, Aug 10, 2017 at 05:24:55PM +0200, Vitaly Kuznetsov wrote:
quoted
Andrew Lunn [off-list ref] writes:
quoted
quoted
We are - rtnetlink_event() does the job. We, however, don't have a
special IFLA_EVENT_* for name change and end up with IFLA_EVENT_NONE.
What is in this event? Old and new name? Just the new name?
Basically, it's everything we know about the interface - type, index,
name, mtu, qdisc, ... - see rtnl_fill_ifinfo(). Back to your question -
it's only the new name.
So the program needs to keep track of ifindex to know which interface
has changed name. Doable.
I still expect this has the potential to break something. You probably
should be asking on linux-api for the API experts opinion.
But a greater point is that nobody is monitoring device renames
explicitly right now.
Quagga is another example of what might break. Especially with all the new
forks..
I see,
even if we don't see right away why the limitation was imposed and who
depends on this 'UP interfaces keep their names' semantics it may not be
worth it to open this pandora box just because of the netvsc driver
change...
--
Vitaly