search for: dev_change_name

Displaying 20 results from an estimated 37 matches for "dev_change_name".

2019 Mar 27
0
[PATCH net v3] failover: allow name change on IFF_UP slave interfaces
...+++++--- > 1 file changed, 34 insertions(+), 3 deletions(-) > >diff --git a/net/core/dev.c b/net/core/dev.c >index 722d50d..3e0cd80 100644 >--- a/net/core/dev.c >+++ b/net/core/dev.c >@@ -1171,6 +1171,7 @@ int dev_get_valid_name(struct net *net, struct net_device *dev, > int dev_change_name(struct net_device *dev, const char *newname) > { > unsigned char old_assign_type; >+ bool reopen_needed = false; > char oldname[IFNAMSIZ]; > int err = 0; > int ret; >@@ -1180,8 +1181,24 @@ int dev_change_name(struct net_device *dev, const char *newname) > BUG_ON(!dev_ne...
2017 Dec 19
2
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...naming policy > because kernel names were not repeatable. > > This makes the VF show up as "ethN_vf" on Hyper-V which is user friendly. > > Patch is pending. Do we really need to delay the setup until the name is changed? Can't we call dev_set_mtu() and dev_open() until dev_change_name() is done? Thanks Sridhar
2017 Dec 19
2
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...naming policy > because kernel names were not repeatable. > > This makes the VF show up as "ethN_vf" on Hyper-V which is user friendly. > > Patch is pending. Do we really need to delay the setup until the name is changed? Can't we call dev_set_mtu() and dev_open() until dev_change_name() is done? Thanks Sridhar
2019 Mar 29
0
[PATCH net v4] failover: allow name change on IFF_UP slave interfaces
...e-on-IFF_UP-slave-interfaces/20190329-195445 config: x86_64-lkp (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): net/core/dev.c: In function 'dev_change_name': >> net/core/dev.c:1252:48: error: passing argument 2 of 'call_netdevice_notifiers_info' from incompatible pointer type [-Werror=incompatible-pointer-types] call_netdevice_notifiers_info(NETDEV_CHANGE, dev, ^~~ net/core/...
2019 Mar 28
0
[PATCH net v3] failover: allow name change on IFF_UP slave interfaces
...https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=openrisc All errors (new ones prefixed by >>): net/core/dev.c: In function 'dev_change_name': >> net/core/dev.c:1277:9: error: too few arguments to function 'dev_open' ret = dev_open(dev); ^~~~~~~~ In file included from net/core/dev.c:93:0: include/linux/netdevice.h:2636:5: note: declared here int dev_open(struct net_device *dev, struct netlin...
2019 Mar 28
0
[PATCH net v3] failover: allow name change on IFF_UP slave interfaces
...>> > >> diff --git a/net/core/dev.c b/net/core/dev.c > >> index 722d50d..3e0cd80 100644 > >> --- a/net/core/dev.c > >> +++ b/net/core/dev.c > >> @@ -1171,6 +1171,7 @@ int dev_get_valid_name(struct net *net, struct net_device *dev, > >> int dev_change_name(struct net_device *dev, const char *newname) > >> { > >> unsigned char old_assign_type; > >> + bool reopen_needed = false; > >> char oldname[IFNAMSIZ]; > >> int err = 0; > >> int ret; > >> @@ -1180,8 +1181,24 @@ int dev_change_name(...
2017 Dec 19
2
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...epeatable. >>> >>> This makes the VF show up as "ethN_vf" on Hyper-V which is user friendly. >>> >>> Patch is pending. >> Do we really need to delay the setup until the name is changed? >> Can't we call dev_set_mtu() and dev_open() until dev_change_name() is done? >> >> Thanks >> Sridhar > You can call dev_set_mtu, but when dev_open is done the device name > can not be changed by userspace. I did a quick test to remove the delay and also the dev_open() call and i don't see any issues with virtio taking over the VF data...
2017 Dec 19
2
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...epeatable. >>> >>> This makes the VF show up as "ethN_vf" on Hyper-V which is user friendly. >>> >>> Patch is pending. >> Do we really need to delay the setup until the name is changed? >> Can't we call dev_set_mtu() and dev_open() until dev_change_name() is done? >> >> Thanks >> Sridhar > You can call dev_set_mtu, but when dev_open is done the device name > can not be changed by userspace. I did a quick test to remove the delay and also the dev_open() call and i don't see any issues with virtio taking over the VF data...
2019 Mar 21
2
[PATCH net v2] failover: allow name change on IFF_UP slave interfaces
...ER_SLAVE > +#define IFF_SLAVE_RENAME_OK IFF_SLAVE_RENAME_OK > > /** > * struct net_device - The DEVICE structure. > diff --git a/net/core/dev.c b/net/core/dev.c > index 722d50d..ae070de 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -1180,7 +1180,8 @@ int dev_change_name(struct net_device *dev, const char *newname) > BUG_ON(!dev_net(dev)); > > net = dev_net(dev); > - if (dev->flags & IFF_UP) > + if (dev->flags & IFF_UP && > + !(dev->priv_flags & IFF_SLAVE_RENAME_OK)) > return -EBUSY; > > write...
2019 Mar 21
2
[PATCH net v2] failover: allow name change on IFF_UP slave interfaces
...ER_SLAVE > +#define IFF_SLAVE_RENAME_OK IFF_SLAVE_RENAME_OK > > /** > * struct net_device - The DEVICE structure. > diff --git a/net/core/dev.c b/net/core/dev.c > index 722d50d..ae070de 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -1180,7 +1180,8 @@ int dev_change_name(struct net_device *dev, const char *newname) > BUG_ON(!dev_net(dev)); > > net = dev_net(dev); > - if (dev->flags & IFF_UP) > + if (dev->flags & IFF_UP && > + !(dev->priv_flags & IFF_SLAVE_RENAME_OK)) > return -EBUSY; > > write...
2019 Apr 02
0
[PATCH net v5] failover: allow name change on IFF_UP slave interfaces
..., Jiri) > --- > net/core/dev.c | 25 ++++++++++++++++++++++++- > 1 file changed, 24 insertions(+), 1 deletion(-) > > diff --git a/net/core/dev.c b/net/core/dev.c > index 9823b77..b694184 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -1185,7 +1185,21 @@ int dev_change_name(struct net_device *dev, const char *newname) > BUG_ON(!dev_net(dev)); > > net = dev_net(dev); > - if (dev->flags & IFF_UP) > + > + /* Allow failover slave to rename even when > + * it is up and running. > + * > + * Failover slaves are special, since use...
2019 Apr 02
0
[PATCH net v5] failover: allow name change on IFF_UP slave interfaces
...at redhat.com> > net/core/dev.c | 25 ++++++++++++++++++++++++- > 1 file changed, 24 insertions(+), 1 deletion(-) > > diff --git a/net/core/dev.c b/net/core/dev.c > index 9823b77..b694184 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -1185,7 +1185,21 @@ int dev_change_name(struct net_device *dev, const char *newname) > BUG_ON(!dev_net(dev)); > > net = dev_net(dev); > - if (dev->flags & IFF_UP) > + > + /* Allow failover slave to rename even when > + * it is up and running. > + * > + * Failover slaves are special, since usersp...
2019 Mar 29
0
[PATCH net v4] failover: allow name change on IFF_UP slave interfaces
...mminger) > --- > net/core/dev.c | 24 +++++++++++++++++++++++- > 1 file changed, 23 insertions(+), 1 deletion(-) > > diff --git a/net/core/dev.c b/net/core/dev.c > index 722d50d..6ae5874 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -1180,7 +1180,21 @@ int dev_change_name(struct net_device *dev, const char *newname) > BUG_ON(!dev_net(dev)); > > net = dev_net(dev); > - if (dev->flags & IFF_UP) > + > + /* Allow failover slave to rename even when > + * it is up and running. > + * > + * Failover slaves are special, since use...
2019 Mar 29
0
[PATCH net v4] failover: allow name change on IFF_UP slave interfaces
...> > > 1 file changed, 23 insertions(+), 1 deletion(-) > > > > > > diff --git a/net/core/dev.c b/net/core/dev.c > > > index 722d50d..6ae5874 100644 > > > --- a/net/core/dev.c > > > +++ b/net/core/dev.c > > > @@ -1180,7 +1180,21 @@ int dev_change_name(struct net_device *dev, > > > const char *newname) > > > BUG_ON(!dev_net(dev)); > > > net = dev_net(dev); > > > - if (dev->flags & IFF_UP) > > > + > > > + /* Allow failover slave to rename even when > > > +...
2019 Mar 21
0
[PATCH net v2] failover: allow name change on IFF_UP slave interfaces
...e is already broken on their handling and they need to be modified to behave specially in regards to those slaves. Therefore, it?s less risky to lift up the rename restriction on failover slave which is already UP. > > How about sending down and up events around such renames? You mean that dev_change_name() will behave as proposed in this patch but also in addition send fake DOWN and UP uevents to userspace? -Liran > > > >> --- >> v1 -> v2: >> - Drop configurable module parameter (Sridhar) >> >> >> include/linux/netdevice.h | 3 +++ >> net/...
2019 Mar 21
0
[PATCH net v2] failover: allow name change on IFF_UP slave interfaces
...ng and they need to be modified > to behave specially in regards to those slaves. Therefore, it?s less risky to lift up the > rename restriction on failover slave which is already UP. > > > > > How about sending down and up events around such renames? > > You mean that dev_change_name() will behave as proposed in this patch but also in addition > send fake DOWN and UP uevents to userspace? > > -Liran That was what I was trying to say. > > > > > > > >> --- > >> v1 -> v2: > >> - Drop configurable module parameter (Srid...
2017 Dec 19
0
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...l names were not repeatable. > > > > This makes the VF show up as "ethN_vf" on Hyper-V which is user friendly. > > > > Patch is pending. > Do we really need to delay the setup until the name is changed? > Can't we call dev_set_mtu() and dev_open() until dev_change_name() is done? > > Thanks > Sridhar You can call dev_set_mtu, but when dev_open is done the device name can not be changed by userspace.
2017 Dec 19
0
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...; >>> This makes the VF show up as "ethN_vf" on Hyper-V which is user friendly. > >>> > >>> Patch is pending. > >> Do we really need to delay the setup until the name is changed? > >> Can't we call dev_set_mtu() and dev_open() until dev_change_name() is done? > >> > >> Thanks > >> Sridhar > > You can call dev_set_mtu, but when dev_open is done the device name > > can not be changed by userspace. > I did a quick test to remove the delay and also the dev_open() call and > i don't see > an...
2019 Apr 05
2
[PATCH net v6] failover: allow name change on IFF_UP slave interfaces
...NDLER > +#define IFF_LIVE_NAME_CHANGE IFF_LIVE_NAME_CHANGE > > /** > * struct net_device - The DEVICE structure. > diff --git a/net/core/dev.c b/net/core/dev.c > index 9823b77..48341d5 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -1185,7 +1185,21 @@ int dev_change_name(struct net_device *dev, const char *newname) > BUG_ON(!dev_net(dev)); > > net = dev_net(dev); > - if (dev->flags & IFF_UP) > + > + /* Some auto-enslaved devices e.g. failover slaves are > + * special, as userspace might rename the device after > + * the interf...
2019 Apr 05
2
[PATCH net v6] failover: allow name change on IFF_UP slave interfaces
...NDLER > +#define IFF_LIVE_NAME_CHANGE IFF_LIVE_NAME_CHANGE > > /** > * struct net_device - The DEVICE structure. > diff --git a/net/core/dev.c b/net/core/dev.c > index 9823b77..48341d5 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -1185,7 +1185,21 @@ int dev_change_name(struct net_device *dev, const char *newname) > BUG_ON(!dev_net(dev)); > > net = dev_net(dev); > - if (dev->flags & IFF_UP) > + > + /* Some auto-enslaved devices e.g. failover slaves are > + * special, as userspace might rename the device after > + * the interf...