Stephen Hemminger
2019-Apr-05 21:47 UTC
[PATCH net v6] failover: allow name change on IFF_UP slave interfaces
On Wed, 3 Apr 2019 00:52:47 -0400 Si-Wei Liu <si-wei.liu at oracle.com> wrote:> > + if (unlikely(dev->flags & IFF_UP)) { > + struct netdev_notifier_change_info change_info = { > + .info.dev = dev, > + }; > + > + call_netdevice_notifiers_info(NETDEV_CHANGE, > + &change_info.info); > + }This notifier is not really necessary, there already is a CHANGENAME that gets sent. NETDEV_CHANGE is used in other cases to mean that the state (flags) have changed.
Michael S. Tsirkin
2019-Apr-05 22:01 UTC
[PATCH net v6] failover: allow name change on IFF_UP slave interfaces
On Fri, Apr 05, 2019 at 02:47:01PM -0700, Stephen Hemminger wrote:> On Wed, 3 Apr 2019 00:52:47 -0400 > Si-Wei Liu <si-wei.liu at oracle.com> wrote: > > > > > + if (unlikely(dev->flags & IFF_UP)) { > > + struct netdev_notifier_change_info change_info = { > > + .info.dev = dev, > > + }; > > + > > + call_netdevice_notifiers_info(NETDEV_CHANGE, > > + &change_info.info); > > + } > > This notifier is not really necessary, there already is a CHANGENAME > that gets sent. > NETDEV_CHANGE is used in other cases to mean that the state (flags) > have changed.The point is some existing scripts might not expect name change to happen without a status change afterwards (since it was impossible for so long). So this reports a change to make sure scripts do not miss it.
Stephen Hemminger
2019-Apr-07 15:41 UTC
[PATCH net v6] failover: allow name change on IFF_UP slave interfaces
On Fri, 5 Apr 2019 18:01:43 -0400 "Michael S. Tsirkin" <mst at redhat.com> wrote:> > > > This notifier is not really necessary, there already is a CHANGENAME > > that gets sent. > > NETDEV_CHANGE is used in other cases to mean that the state (flags) > > have changed. > > The point is some existing scripts might not expect name > change to happen without a status change afterwards (since it was > impossible for so long). So this reports a change > to make sure scripts do not miss it.I don't think it matters because if device named is changed and it is down (!IFF_UP) then only CHANGENAME is sent. The NETDEV_CHANGE is just noise to an application.
Maybe Matching Threads
- [PATCH net v6] failover: allow name change on IFF_UP slave interfaces
- [PATCH net v6] failover: allow name change on IFF_UP slave interfaces
- [PATCH net v4] failover: allow name change on IFF_UP slave interfaces
- [PATCH net v4] failover: allow name change on IFF_UP slave interfaces
- [PATCH net v4] failover: allow name change on IFF_UP slave interfaces