search for: virtnet_change_mtu

Displaying 20 results from an estimated 88 matches for "virtnet_change_mtu".

2016 Oct 19
7
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
hyperv_net: - set min/max_mtu virtio_net: - set min/max_mtu - remove virtnet_change_mtu vmxnet3: - set min/max_mtu CC: netdev at vger.kernel.org CC: virtualization at lists.linux-foundation.org CC: "K. Y. Srinivasan" <kys at microsoft.com> CC: Haiyang Zhang <haiyangz at microsoft.com> CC: "Michael S. Tsirkin" <mst at redhat.com> CC: Shrikrishna...
2016 Oct 19
7
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
hyperv_net: - set min/max_mtu virtio_net: - set min/max_mtu - remove virtnet_change_mtu vmxnet3: - set min/max_mtu CC: netdev at vger.kernel.org CC: virtualization at lists.linux-foundation.org CC: "K. Y. Srinivasan" <kys at microsoft.com> CC: Haiyang Zhang <haiyangz at microsoft.com> CC: "Michael S. Tsirkin" <mst at redhat.com> CC: Shrikrishna...
2016 Oct 21
2
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...; > +++ 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_ops virtnet_netdev = { > >...
2016 Oct 21
2
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...; > +++ 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_ops virtnet_netdev = { > >...
2016 Oct 19
1
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...; > +++ 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_ops virtnet_netdev = { > >...
2016 Oct 19
1
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...; > +++ 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_ops virtnet_netdev = { > >...
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....
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....
2016 Oct 19
0
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...00644 > --- 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_ops virtnet_netdev = { > .ndo_open = virtnet_open, >...
2016 Oct 21
0
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...t; > > @@ -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_d...
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: ne...
2012 Dec 26
5
[RFC PATCH] virtio-net: reset virtqueue affinity when doing cpu hotplug
...rue; + break; + default: + break; + } + return NOTIFY_OK; +} + +static struct notifier_block virtnet_cpu_notifier = { + .notifier_call = virtnet_cpu_callback, +}; + static void virtnet_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring) { @@ -1131,7 +1154,14 @@ static int virtnet_change_mtu(struct net_device *dev, int new_mtu) */ static u16 virtnet_select_queue(struct net_device *dev, struct sk_buff *skb) { - int txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : + int txq; + + if (unlikely(cpu_hotplug == true)) { + virtnet_set_affinity(netdev_priv(dev), true); + cpu_hot...
2012 Dec 26
5
[RFC PATCH] virtio-net: reset virtqueue affinity when doing cpu hotplug
...rue; + break; + default: + break; + } + return NOTIFY_OK; +} + +static struct notifier_block virtnet_cpu_notifier = { + .notifier_call = virtnet_cpu_callback, +}; + static void virtnet_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring) { @@ -1131,7 +1154,14 @@ static int virtnet_change_mtu(struct net_device *dev, int new_mtu) */ static u16 virtnet_select_queue(struct net_device *dev, struct sk_buff *skb) { - int txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : + int txq; + + if (unlikely(cpu_hotplug == true)) { + virtnet_set_affinity(netdev_priv(dev), true); + cpu_hot...
2016 Mar 10
4
[RFC -next 0/2] virtio-net: Advised MTU feature
The following series adds the ability for a hypervisor to set an MTU on the guest during feature negotiation phase. This is useful for VM orchestration when, for instance, tunneling is involved and the MTU of the various systems should be homogenous. The first patch adds the feature bit as described in the proposed VFIO spec addition found at
2016 Mar 10
4
[RFC -next 0/2] virtio-net: Advised MTU feature
The following series adds the ability for a hypervisor to set an MTU on the guest during feature negotiation phase. This is useful for VM orchestration when, for instance, tunneling is involved and the MTU of the various systems should be homogenous. The first patch adds the feature bit as described in the proposed VFIO spec addition found at
2016 Mar 10
1
[RFC -next 2/2] virtio_net: Read and use the advised MTU
...n(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 767ab11..7175563 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c [...] > @@ -1390,8 +1391,12 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > > static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > { > + struct virtnet_info *vi = netdev_priv(dev); > if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) > return -EINVAL; > + if (vi->negotiated_mtu == true) { > + pr_warn("changing mtu from negotiated mtu."); > + }...
2016 Mar 10
1
[RFC -next 2/2] virtio_net: Read and use the advised MTU
...n(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 767ab11..7175563 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c [...] > @@ -1390,8 +1391,12 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > > static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > { > + struct virtnet_info *vi = netdev_priv(dev); > if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) > return -EINVAL; > + if (vi->negotiated_mtu == true) { > + pr_warn("changing mtu from negotiated mtu."); > + }...
2008 Nov 26
2
[PATCH] virtio_net: large tx MTU support
.../virtio_net.c b/drivers/net/virtio_net.c index e6b5d6e..71ca29c 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -613,6 +613,17 @@ static struct ethtool_ops virtnet_ethtool_ops = { .set_tso = ethtool_op_set_tso, }; +#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 int virtnet_probe(struct virtio_device *vdev) { int err; @@ -628,6 +639,7 @@ static int virtnet_probe(struct virtio_device *vdev) dev...
2008 Nov 26
2
[PATCH] virtio_net: large tx MTU support
.../virtio_net.c b/drivers/net/virtio_net.c index e6b5d6e..71ca29c 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -613,6 +613,17 @@ static struct ethtool_ops virtnet_ethtool_ops = { .set_tso = ethtool_op_set_tso, }; +#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 int virtnet_probe(struct virtio_device *vdev) { int err; @@ -628,6 +639,7 @@ static int virtnet_probe(struct virtio_device *vdev) dev...
2016 Mar 16
1
[RFC v2 -next 2/2] virtio_net: Read the advised MTU
...s(+) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 767ab11..429fe01 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c [...] > @@ -1390,8 +1391,11 @@ static const struct ethtool_ops virtnet_ethtool_ops = { > > static int virtnet_change_mtu(struct net_device *dev, int new_mtu) > { > + struct virtnet_info *vi = netdev_priv(dev); > if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) > return -EINVAL; > + if ((vi->negotiated_mtu) && (dev->mtu != new_mtu)) Inner parens not needed, please be consist...