search for: min_mtu

Displaying 20 results from an estimated 130 matches for "min_mtu".

2016 Oct 21
2
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...gt; index fad84f3..720809f 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -1419,17 +1419,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > > .set_settings = virtnet_set_settings, > > }; > > > > -#define MIN_MTU 68 > > -#define MAX_MTU 65535 > > - > > -static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > > -{ > > - if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) > > - return -EINVAL; > > - dev->mtu = new_mtu; > > - return 0; > > -}...
2016 Oct 21
2
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...gt; index fad84f3..720809f 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -1419,17 +1419,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > > .set_settings = virtnet_set_settings, > > }; > > > > -#define MIN_MTU 68 > > -#define MAX_MTU 65535 > > - > > -static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > > -{ > > - if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) > > - return -EINVAL; > > - dev->mtu = new_mtu; > > - return 0; > > -}...
2016 Oct 19
7
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...ers/net/hyperv/hyperv_net.h index f4fbcb5..3958ada 100644 --- a/drivers/net/hyperv/hyperv_net.h +++ b/drivers/net/hyperv/hyperv_net.h @@ -606,8 +606,8 @@ struct nvsp_message { } __packed; -#define NETVSC_MTU 65536 -#define NETVSC_MTU_MIN 68 +#define NETVSC_MTU 65535 +#define NETVSC_MTU_MIN ETH_MIN_MTU #define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024*16) /* 16MB */ #define NETVSC_RECEIVE_BUFFER_SIZE_LEGACY (1024*1024*15) /* 15MB */ diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index f0919bd..3dc9679 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net...
2016 Oct 19
7
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...ers/net/hyperv/hyperv_net.h index f4fbcb5..3958ada 100644 --- a/drivers/net/hyperv/hyperv_net.h +++ b/drivers/net/hyperv/hyperv_net.h @@ -606,8 +606,8 @@ struct nvsp_message { } __packed; -#define NETVSC_MTU 65536 -#define NETVSC_MTU_MIN 68 +#define NETVSC_MTU 65535 +#define NETVSC_MTU_MIN ETH_MIN_MTU #define NETVSC_RECEIVE_BUFFER_SIZE (1024*1024*16) /* 16MB */ #define NETVSC_RECEIVE_BUFFER_SIZE_LEGACY (1024*1024*15) /* 15MB */ diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index f0919bd..3dc9679 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net...
2016 Oct 20
4
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
hyperv_net: - set min/max_mtu, per Haiyang, after rndis_filter_device_add virtio_net: - set min/max_mtu - remove virtnet_change_mtu vmxnet3: - set min/max_mtu xen-netback: - min_mtu = 0, max_mtu = 65517 xen-netfront: - min_mtu = 0, max_mtu = 65535 unisys/visor: - clean up defines a little to not clash with network core or add redundat definitions CC: netdev at vger.kernel.org CC: virtualization at lists.linux-foundation.org CC: "K. Y. Srinivasan" <kys at micr...
2016 Oct 20
4
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
hyperv_net: - set min/max_mtu, per Haiyang, after rndis_filter_device_add virtio_net: - set min/max_mtu - remove virtnet_change_mtu vmxnet3: - set min/max_mtu xen-netback: - min_mtu = 0, max_mtu = 65517 xen-netfront: - min_mtu = 0, max_mtu = 65535 unisys/visor: - clean up defines a little to not clash with network core or add redundat definitions CC: netdev at vger.kernel.org CC: virtualization at lists.linux-foundation.org CC: "K. Y. Srinivasan" <kys at micr...
2016 Oct 19
1
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...gt; index fad84f3..4885a42 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -1419,17 +1419,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > > .set_settings = virtnet_set_settings, > > }; > > > > -#define MIN_MTU 68 > > -#define MAX_MTU 65535 > > - > > -static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > > -{ > > - if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) > > - return -EINVAL; > > - dev->mtu = new_mtu; > > - return 0; > > -}...
2016 Oct 19
1
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...gt; index fad84f3..4885a42 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -1419,17 +1419,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > > .set_settings = virtnet_set_settings, > > }; > > > > -#define MIN_MTU 68 > > -#define MAX_MTU 65535 > > - > > -static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > > -{ > > - if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) > > - return -EINVAL; > > - dev->mtu = new_mtu; > > - return 0; > > -}...
2016 Oct 20
0
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
On Thu, Oct 20, 2016 at 01:55:21PM -0400, Jarod Wilson wrote: > hyperv_net: > - set min/max_mtu, per Haiyang, after rndis_filter_device_add > > virtio_net: > - set min/max_mtu > - remove virtnet_change_mtu > vmxnet3: > - set min/max_mtu > > xen-netback: > - min_mtu = 0, max_mtu = 65517 > > xen-netfront: > - min_mtu = 0, max_mtu = 65535 > > unisys/visor: > - clean up defines a little to not clash with network core or add > redundat definitions > > CC: netdev at vger.kernel.org > CC: virtualization at lists.linux-foundation.or...
2016 Oct 19
0
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
..._net.c b/drivers/net/virtio_net.c > index fad84f3..4885a42 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -1419,17 +1419,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > .set_settings = virtnet_set_settings, > }; > > -#define MIN_MTU 68 > -#define MAX_MTU 65535 > - > -static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > -{ > - if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) > - return -EINVAL; > - dev->mtu = new_mtu; > - return 0; > -} > - > static const struct net_device_...
2016 Oct 21
0
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...gt; > > --- a/drivers/net/virtio_net.c > > > +++ b/drivers/net/virtio_net.c > > > @@ -1419,17 +1419,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > > > .set_settings = virtnet_set_settings, > > > }; > > > > > > -#define MIN_MTU 68 > > > -#define MAX_MTU 65535 > > > - > > > -static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > > > -{ > > > - if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) > > > - return -EINVAL; > > > - dev->mtu = new_mtu;...
2016 Oct 25
4
[PATCH] virtio-net: Update the mtu code to match virtio spec
...virtio_net.c index 720809f..2cafd12 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1870,10 +1870,12 @@ static int virtnet_probe(struct virtio_device *vdev) mtu = virtio_cread16(vdev, offsetof(struct virtio_net_config, mtu)); - if (mtu < dev->min_mtu || mtu > dev->max_mtu) + if (mtu < dev->min_mtu) { __virtio_clear_bit(vdev, VIRTIO_NET_F_MTU); - else + } else { dev->mtu = mtu; + dev->max_mtu = mtu; + } } if (vi->any_header_sg) -- 2.7.4
2016 Oct 25
4
[PATCH] virtio-net: Update the mtu code to match virtio spec
...virtio_net.c index 720809f..2cafd12 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1870,10 +1870,12 @@ static int virtnet_probe(struct virtio_device *vdev) mtu = virtio_cread16(vdev, offsetof(struct virtio_net_config, mtu)); - if (mtu < dev->min_mtu || mtu > dev->max_mtu) + if (mtu < dev->min_mtu) { __virtio_clear_bit(vdev, VIRTIO_NET_F_MTU); - else + } else { dev->mtu = mtu; + dev->max_mtu = mtu; + } } if (vi->any_header_sg) -- 2.7.4
2018 Apr 06
0
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...kup_netdev, child_netdev); >> + dev_get_stats(vbi->backup_netdev, &vbi->backup_stats); >> + } else { >> + rcu_assign_pointer(vbi->active_netdev, child_netdev); >> + dev_get_stats(vbi->active_netdev, &vbi->active_stats); >> + bypass_netdev->min_mtu = child_netdev->min_mtu; >> + bypass_netdev->max_mtu = child_netdev->max_mtu; >> + } >> + >> + netdev_info(bypass_netdev, "child:%s joined\n", child_netdev->name); >> + >> + return 0; >> +} >> + >> +static int virtnet_bypa...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...ssign_pointer(vbi->backup_netdev, child_netdev); >+ dev_get_stats(vbi->backup_netdev, &vbi->backup_stats); >+ } else { >+ rcu_assign_pointer(vbi->active_netdev, child_netdev); >+ dev_get_stats(vbi->active_netdev, &vbi->active_stats); >+ bypass_netdev->min_mtu = child_netdev->min_mtu; >+ bypass_netdev->max_mtu = child_netdev->max_mtu; >+ } >+ >+ netdev_info(bypass_netdev, "child:%s joined\n", child_netdev->name); >+ >+ return 0; >+} >+ >+static int virtnet_bypass_register_child(struct net_device *bypass_n...
2018 Apr 06
2
[RFC PATCH net-next v5 3/4] virtio_net: Extend virtio to use VF datapath when available
...ssign_pointer(vbi->backup_netdev, child_netdev); >+ dev_get_stats(vbi->backup_netdev, &vbi->backup_stats); >+ } else { >+ rcu_assign_pointer(vbi->active_netdev, child_netdev); >+ dev_get_stats(vbi->active_netdev, &vbi->active_stats); >+ bypass_netdev->min_mtu = child_netdev->min_mtu; >+ bypass_netdev->max_mtu = child_netdev->max_mtu; >+ } >+ >+ netdev_info(bypass_netdev, "child:%s joined\n", child_netdev->name); >+ >+ return 0; >+} >+ >+static int virtnet_bypass_register_child(struct net_device *bypass_n...
2018 Feb 16
8
[RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device
Patch 1 introduces a new feature bit VIRTIO_NET_F_BACKUP that can be used by hypervisor to indicate that virtio_net interface should act as a backup for another device with the same MAC address. Ppatch 2 is in response to the community request for a 3 netdev solution. However, it creates some issues we'll get into in a moment. It extends virtio_net to use alternate datapath when available
2018 Feb 16
8
[RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device
Patch 1 introduces a new feature bit VIRTIO_NET_F_BACKUP that can be used by hypervisor to indicate that virtio_net interface should act as a backup for another device with the same MAC address. Ppatch 2 is in response to the community request for a 3 netdev solution. However, it creates some issues we'll get into in a moment. It extends virtio_net to use alternate datapath when available
2017 Mar 29
5
[PATCH 1/2] virtio: allow drivers to validate features
Some drivers can't support all features in all configurations. At the moment we blindly set FEATURES_OK and later FAILED. Support this better by adding a callback drivers can use to do some early checks. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/virtio/virtio.c | 6 ++++++ include/linux/virtio.h | 1 + 2 files changed, 7 insertions(+) diff --git
2017 Mar 29
5
[PATCH 1/2] virtio: allow drivers to validate features
Some drivers can't support all features in all configurations. At the moment we blindly set FEATURES_OK and later FAILED. Support this better by adding a callback drivers can use to do some early checks. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/virtio/virtio.c | 6 ++++++ include/linux/virtio.h | 1 + 2 files changed, 7 insertions(+) diff --git