search for: dev_set_mtu

Displaying 20 results from an estimated 56 matches for "dev_set_mtu".

2017 Dec 19
2
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...y Lennart since udev is only doing 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
...y Lennart since udev is only doing 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
...gt; 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 > 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 iss...
2017 Dec 19
2
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...gt; 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 > 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 iss...
2017 Dec 19
0
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...ming 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 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
...t 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. > I did a quick test to remove the delay and also the dev_open()...
2018 Feb 17
1
[RFC PATCH v3 2/3] virtio_net: Extend virtio to use VF datapath when available
...virtnet_bypass_change_mtu(struct net_device *dev, int new_mtu) > +{ > + struct virtnet_bypass_info *vbi = netdev_priv(dev); > + struct net_device *child_netdev; > + int ret = 0; > + > + child_netdev = rcu_dereference(vbi->active_netdev); > + if (child_netdev) { > + ret = dev_set_mtu(child_netdev, new_mtu); > + if (ret) > + return ret; > + } > + > + child_netdev = rcu_dereference(vbi->backup_netdev); > + if (child_netdev) { > + ret = dev_set_mtu(child_netdev, new_mtu); > + if (ret) > + netdev_err(child_netdev, > + "Unexpected f...
2018 Apr 11
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...&& (ret != -EBUSY)) { >+ netdev_err(bypass_netdev, "Opening slave %s failed ret:%d\n", >+ slave_netdev->name, ret); >+ goto err_interface_up; >+ } >+ } >+ >+ /* Align MTU of slave with master */ >+ orig_mtu = slave_netdev->mtu; >+ ret = dev_set_mtu(slave_netdev, bypass_netdev->mtu); >+ if (ret != 0) { >+ netdev_err(bypass_netdev, "unable to change mtu of %s to %u register failed\n", >+ slave_netdev->name, bypass_netdev->mtu); >+ goto err_set_mtu; >+ } >+ >+ ret = bypass_slave_join(slave_netdev, b...
2018 Apr 11
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...&& (ret != -EBUSY)) { >+ netdev_err(bypass_netdev, "Opening slave %s failed ret:%d\n", >+ slave_netdev->name, ret); >+ goto err_interface_up; >+ } >+ } >+ >+ /* Align MTU of slave with master */ >+ orig_mtu = slave_netdev->mtu; >+ ret = dev_set_mtu(slave_netdev, bypass_netdev->mtu); >+ if (ret != 0) { >+ netdev_err(bypass_netdev, "unable to change mtu of %s to %u register failed\n", >+ slave_netdev->name, bypass_netdev->mtu); >+ goto err_set_mtu; >+ } >+ >+ ret = bypass_slave_join(slave_netdev, b...
2018 Apr 10
0
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...= dev_open(slave_netdev); + if (ret && (ret != -EBUSY)) { + netdev_err(bypass_netdev, "Opening slave %s failed ret:%d\n", + slave_netdev->name, ret); + goto err_interface_up; + } + } + + /* Align MTU of slave with master */ + orig_mtu = slave_netdev->mtu; + ret = dev_set_mtu(slave_netdev, bypass_netdev->mtu); + if (ret != 0) { + netdev_err(bypass_netdev, "unable to change mtu of %s to %u register failed\n", + slave_netdev->name, bypass_netdev->mtu); + goto err_set_mtu; + } + + ret = bypass_slave_join(slave_netdev, bypass_netdev, bypass_ops); +...
2018 May 22
0
[PATCH net-next v11 3/5] net: Introduce net_failover driver
..._lock); +} + +static int net_failover_change_mtu(struct net_device *dev, int new_mtu) +{ + struct net_failover_info *nfo_info = netdev_priv(dev); + struct net_device *primary_dev, *standby_dev; + int ret = 0; + + primary_dev = rcu_dereference(nfo_info->primary_dev); + if (primary_dev) { + ret = dev_set_mtu(primary_dev, new_mtu); + if (ret) + return ret; + } + + standby_dev = rcu_dereference(nfo_info->standby_dev); + if (standby_dev) { + ret = dev_set_mtu(standby_dev, new_mtu); + if (ret) { + if (primary_dev) + dev_set_mtu(primary_dev, dev->mtu); + return ret; + } + } + + dev->mt...
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...e_dev->name, err); > + goto err_dev_open; > + } > + } > + > + /* Align MTU of slave with failover dev */ > + orig_mtu = slave_dev->mtu; I suspect this was copied from bond. this variable is never used and I'm even surprised gcc did not warn about this. > + err = dev_set_mtu(slave_dev, failover_dev->mtu); How do we know slave supports this MTU? same applies to failover_change_mtu. > + if (err) { > + netdev_err(failover_dev, "unable to change mtu of %s to %u register failed\n", > + slave_dev->name, failover_dev->mtu); > + goto...
2018 Apr 20
2
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...e_dev->name, err); > + goto err_dev_open; > + } > + } > + > + /* Align MTU of slave with failover dev */ > + orig_mtu = slave_dev->mtu; I suspect this was copied from bond. this variable is never used and I'm even surprised gcc did not warn about this. > + err = dev_set_mtu(slave_dev, failover_dev->mtu); How do we know slave supports this MTU? same applies to failover_change_mtu. > + if (err) { > + netdev_err(failover_dev, "unable to change mtu of %s to %u register failed\n", > + slave_dev->name, failover_dev->mtu); > + goto...
2018 Apr 20
0
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...> + >> + /* Align MTU of slave with failover dev */ >> + orig_mtu = slave_dev->mtu; > I suspect this was copied from bond. this variable is never > used and I'm even surprised gcc did not warn about this. Thanks for catching, I broke this when i moved the dev_open() and dev_set_mtu() calls from register to join. I need to reset slave_dev mtu to orig_mtu on failure. > > >> + err = dev_set_mtu(slave_dev, failover_dev->mtu); > How do we know slave supports this MTU? same applies to > failover_change_mtu. The err check below should catch it and we will res...
2018 Apr 11
0
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...etdev_err(bypass_netdev, "Opening slave %s failed ret:%d\n", >> + slave_netdev->name, ret); >> + goto err_interface_up; >> + } >> + } >> + >> + /* Align MTU of slave with master */ >> + orig_mtu = slave_netdev->mtu; >> + ret = dev_set_mtu(slave_netdev, bypass_netdev->mtu); >> + if (ret != 0) { >> + netdev_err(bypass_netdev, "unable to change mtu of %s to %u register failed\n", >> + slave_netdev->name, bypass_netdev->mtu); >> + goto err_set_mtu; >> + } >> + >> + ret...
2018 May 07
0
[PATCH net-next v10 2/4] net: Introduce generic failover module
..._lock); +} + +static int net_failover_change_mtu(struct net_device *dev, int new_mtu) +{ + struct net_failover_info *nfo_info = netdev_priv(dev); + struct net_device *primary_dev, *standby_dev; + int ret = 0; + + primary_dev = rcu_dereference(nfo_info->primary_dev); + if (primary_dev) { + ret = dev_set_mtu(primary_dev, new_mtu); + if (ret) + return ret; + } + + standby_dev = rcu_dereference(nfo_info->standby_dev); + if (standby_dev) { + ret = dev_set_mtu(standby_dev, new_mtu); + if (ret) { + if (primary_dev) + dev_set_mtu(primary_dev, dev->mtu); + return ret; + } + } + + dev->mt...
2018 Apr 18
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...lave %s failed ret:%d\n", >> > + slave_netdev->name, ret); >> > + goto err_interface_up; >> > + } >> > + } >> > + >> > + /* Align MTU of slave with master */ >> > + orig_mtu = slave_netdev->mtu; >> > + ret = dev_set_mtu(slave_netdev, bypass_netdev->mtu); >> > + if (ret != 0) { >> > + netdev_err(bypass_netdev, "unable to change mtu of %s to %u register failed\n", >> > + slave_netdev->name, bypass_netdev->mtu); >> > + goto err_set_mtu; >> > + } &...
2018 Apr 18
2
[RFC PATCH net-next v6 2/4] net: Introduce generic bypass module
...lave %s failed ret:%d\n", >> > + slave_netdev->name, ret); >> > + goto err_interface_up; >> > + } >> > + } >> > + >> > + /* Align MTU of slave with master */ >> > + orig_mtu = slave_netdev->mtu; >> > + ret = dev_set_mtu(slave_netdev, bypass_netdev->mtu); >> > + if (ret != 0) { >> > + netdev_err(bypass_netdev, "unable to change mtu of %s to %u register failed\n", >> > + slave_netdev->name, bypass_netdev->mtu); >> > + goto err_set_mtu; >> > + } &...
2018 Apr 20
0
[PATCH v7 net-next 2/4] net: Introduce generic failover module
...+ err = dev_open(slave_dev); + if (err && (err != -EBUSY)) { + netdev_err(failover_dev, "Opening slave %s failed err:%d\n", + slave_dev->name, err); + goto err_dev_open; + } + } + + /* Align MTU of slave with failover dev */ + orig_mtu = slave_dev->mtu; + err = dev_set_mtu(slave_dev, failover_dev->mtu); + if (err) { + netdev_err(failover_dev, "unable to change mtu of %s to %u register failed\n", + slave_dev->name, failover_dev->mtu); + goto err_set_mtu; + } + + finfo = netdev_priv(failover_dev); + standby = (slave_dev->dev.parent == failo...
2018 Apr 10
6
[RFC PATCH net-next v6 0/4] Enable virtio_net to act as a backup for a passthru device
The main motivation for this patch is to enable cloud service providers to provide an accelerated datapath to virtio-net enabled VMs in a transparent manner with no/minimal guest userspace changes. This also enables hypervisor controlled live migration to be supported with VMs that have direct attached SR-IOV VF devices. Patch 1 introduces a new feature bit VIRTIO_NET_F_BACKUP that can be used