search for: new_mtu

Displaying 20 results from an estimated 146 matches for "new_mtu".

2016 Mar 10
1
[RFC -next 2/2] virtio_net: Read and use the advised MTU
...trl_ack ctrl_status; > u8 ctrl_promisc; > u8 ctrl_allmulti; > + bool negotiated_mtu; > }; > > struct padded_vnet_hdr { > @@ -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) { why don't: if ((vi->negotiated_mtu == true) && (dev->mtu != new_mtu)) ? > + pr_warn(&quo...
2016 Mar 10
1
[RFC -next 2/2] virtio_net: Read and use the advised MTU
...trl_ack ctrl_status; > u8 ctrl_promisc; > u8 ctrl_allmulti; > + bool negotiated_mtu; > }; > > struct padded_vnet_hdr { > @@ -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) { why don't: if ((vi->negotiated_mtu == true) && (dev->mtu != new_mtu)) ? > + pr_warn(&quo...
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 16
1
[RFC v2 -next 2/2] virtio_net: Read the advised MTU
...trl_ack ctrl_status; > u8 ctrl_promisc; > u8 ctrl_allmulti; > + bool negotiated_mtu; > }; > > struct padded_vnet_hdr { > @@ -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)) > + pr_warn("changing mtu while the advised mtu bit exists."); I don...
2016 Mar 16
1
[RFC v2 -next 2/2] virtio_net: Read the advised MTU
...trl_ack ctrl_status; > u8 ctrl_promisc; > u8 ctrl_allmulti; > + bool negotiated_mtu; > }; > > struct padded_vnet_hdr { > @@ -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)) > + pr_warn("changing mtu while the advised mtu bit exists."); I don...
2016 Mar 16
1
[RFC v2 -next 2/2] virtio_net: Read the advised MTU
...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 consistent with the code above. [...] MBR...
2016 Mar 16
1
[RFC v2 -next 2/2] virtio_net: Read the advised MTU
...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 consistent with the code above. [...] MBR...
2016 Oct 19
7
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...2 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_ops virtnet_netdev = { .ndo_open = virtnet_open, .ndo_stop = virtnet_close, @@ -1437,7 +1426,6 @@ static const struct net_devic...
2016 Oct 19
7
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...2 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_ops virtnet_netdev = { .ndo_open = virtnet_open, .ndo_stop = virtnet_close, @@ -1437,7 +1426,6 @@ static const struct net_devic...
2016 Oct 21
2
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...@@ -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
2
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...@@ -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 19
1
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...@@ -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 19
1
[PATCH net-next 5/6] net: use core MTU range checking in virt drivers
...@@ -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 Mar 15
9
[RFC v2 -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 15
9
[RFC v2 -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 Oct 20
4
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...f 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_ops virtnet_netdev = { .ndo_open = virtnet_open, .ndo_stop = virtnet_close, @@ -1437,7 +1426,6 @@ static const struct net_devic...
2016 Oct 20
4
[PATCH net-next v2 6/9] net: use core MTU range checking in virt drivers
...f 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_ops virtnet_netdev = { .ndo_open = virtnet_open, .ndo_stop = virtnet_close, @@ -1437,7 +1426,6 @@ static const struct net_devic...
2016 Mar 10
1
[RFC -next 2/2] virtio_net: Read and use the advised MTU
...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."); > + } {} not needed, see Documentation/...
2016 Mar 10
1
[RFC -next 2/2] virtio_net: Read and use the advised MTU
...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."); > + } {} not needed, see Documentation/...