search for: virtnet_set_channels

Displaying 20 results from an estimated 70 matches for "virtnet_set_channels".

Did you mean: virtnet_get_channels
2014 Apr 18
3
[PATCH] virtio_net: zero is an invald queue_pairs number
...;akong at redhat.com> --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 7b68746..8a852b5 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1285,7 +1285,7 @@ static int virtnet_set_channels(struct net_device *dev, if (channels->rx_count || channels->tx_count || channels->other_count) return -EINVAL; - if (queue_pairs > vi->max_queue_pairs) + if (queue_pairs > vi->max_queue_pairs || queue_pairs == 0) return -EINVAL; get_online_cpus(); -- 1.9.0
2014 Apr 18
3
[PATCH] virtio_net: zero is an invald queue_pairs number
...;akong at redhat.com> --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 7b68746..8a852b5 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1285,7 +1285,7 @@ static int virtnet_set_channels(struct net_device *dev, if (channels->rx_count || channels->tx_count || channels->other_count) return -EINVAL; - if (queue_pairs > vi->max_queue_pairs) + if (queue_pairs > vi->max_queue_pairs || queue_pairs == 0) return -EINVAL; get_online_cpus(); -- 1.9.0
2013 Jan 25
4
[PATCH V7 1/3] virtio-net: fix the set affinity bug when CPU IDs are not consecutive
...ue_set_affinity(vi->sq[i].vq, -1); + } + + i = 0; + for_each_online_cpu(cpu) + *per_cpu_ptr(vi->vq_index, cpu) = + ++i % vi->curr_queue_pairs; + vi->affinity_hint_set = false; + } } static void virtnet_get_ringparam(struct net_device *dev, @@ -1082,6 +1099,7 @@ static int virtnet_set_channels(struct net_device *dev, if (queue_pairs > vi->max_queue_pairs) return -EINVAL; + get_online_cpus(); err = virtnet_set_queues(vi, queue_pairs); if (!err) { netif_set_real_num_tx_queues(dev, queue_pairs); @@ -1089,6 +1107,7 @@ static int virtnet_set_channels(struct net_device *dev...
2013 Jan 25
4
[PATCH V7 1/3] virtio-net: fix the set affinity bug when CPU IDs are not consecutive
...ue_set_affinity(vi->sq[i].vq, -1); + } + + i = 0; + for_each_online_cpu(cpu) + *per_cpu_ptr(vi->vq_index, cpu) = + ++i % vi->curr_queue_pairs; + vi->affinity_hint_set = false; + } } static void virtnet_get_ringparam(struct net_device *dev, @@ -1082,6 +1099,7 @@ static int virtnet_set_channels(struct net_device *dev, if (queue_pairs > vi->max_queue_pairs) return -EINVAL; + get_online_cpus(); err = virtnet_set_queues(vi, queue_pairs); if (!err) { netif_set_real_num_tx_queues(dev, queue_pairs); @@ -1089,6 +1107,7 @@ static int virtnet_set_channels(struct net_device *dev...
2014 Apr 22
2
[PATCH] virtio_net: return error when there is no virtqueue or MQ isn't support
On Tue, Apr 22, 2014 at 11:11:50AM +0800, Jason Wang wrote: > On 04/21/2014 11:11 PM, Amos Kong wrote: > > Currently ethtool returns zero if there is no virtqueue or MQ isn't > > support, we should return -ENOTSUPP to notice user. > > > > Signed-off-by: Amos Kong <akong at redhat.com> > > --- > > drivers/net/virtio_net.c | 2 +- > > 1 file
2014 Apr 22
2
[PATCH] virtio_net: return error when there is no virtqueue or MQ isn't support
On Tue, Apr 22, 2014 at 11:11:50AM +0800, Jason Wang wrote: > On 04/21/2014 11:11 PM, Amos Kong wrote: > > Currently ethtool returns zero if there is no virtqueue or MQ isn't > > support, we should return -ENOTSUPP to notice user. > > > > Signed-off-by: Amos Kong <akong at redhat.com> > > --- > > drivers/net/virtio_net.c | 2 +- > > 1 file
2014 Apr 21
1
[PATCH] virtio_net: zero is an invald queue_pairs number
...>> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c >> index 7b68746..8a852b5 100644 >> --- a/drivers/net/virtio_net.c >> +++ b/drivers/net/virtio_net.c >> @@ -1285,7 +1285,7 @@ static int virtnet_set_channels(struct net_device *dev, >> if (channels->rx_count || channels->tx_count || channels->other_count) >> return -EINVAL; >> >> - if (queue_pairs > vi->max_queue_pairs) >> + if (queue_pairs > vi->max_queue_pairs || queue_pairs == 0) >> r...
2014 Apr 21
1
[PATCH] virtio_net: zero is an invald queue_pairs number
...>> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c >> index 7b68746..8a852b5 100644 >> --- a/drivers/net/virtio_net.c >> +++ b/drivers/net/virtio_net.c >> @@ -1285,7 +1285,7 @@ static int virtnet_set_channels(struct net_device *dev, >> if (channels->rx_count || channels->tx_count || channels->other_count) >> return -EINVAL; >> >> - if (queue_pairs > vi->max_queue_pairs) >> + if (queue_pairs > vi->max_queue_pairs || queue_pairs == 0) >> r...
2013 Jan 18
3
[PATCH V5 1/2] virtio-net: fix the set affinity bug when CPU IDs are not consecutive
...ue_set_affinity(vi->sq[i].vq, -1); + } + + i = 0; + for_each_online_cpu(cpu) + *per_cpu_ptr(vi->vq_index, cpu) = + ++i % vi->curr_queue_pairs; + vi->affinity_hint_set = false; + } } static void virtnet_get_ringparam(struct net_device *dev, @@ -1087,7 +1104,9 @@ static int virtnet_set_channels(struct net_device *dev, netif_set_real_num_tx_queues(dev, queue_pairs); netif_set_real_num_rx_queues(dev, queue_pairs); + get_online_cpus(); virtnet_set_affinity(vi, true); + put_online_cpus(); } return err; @@ -1127,12 +1146,19 @@ static int virtnet_change_mtu(struct net_device...
2013 Jan 18
3
[PATCH V5 1/2] virtio-net: fix the set affinity bug when CPU IDs are not consecutive
...ue_set_affinity(vi->sq[i].vq, -1); + } + + i = 0; + for_each_online_cpu(cpu) + *per_cpu_ptr(vi->vq_index, cpu) = + ++i % vi->curr_queue_pairs; + vi->affinity_hint_set = false; + } } static void virtnet_get_ringparam(struct net_device *dev, @@ -1087,7 +1104,9 @@ static int virtnet_set_channels(struct net_device *dev, netif_set_real_num_tx_queues(dev, queue_pairs); netif_set_real_num_rx_queues(dev, queue_pairs); + get_online_cpus(); virtnet_set_affinity(vi, true); + put_online_cpus(); } return err; @@ -1127,12 +1146,19 @@ static int virtnet_change_mtu(struct net_device...
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...+ + vi->speed = SPEED_UNKNOWN; + vi->duplex = DUPLEX_UNKNOWN; +} + static const struct ethtool_ops virtnet_ethtool_ops = { .get_drvinfo = virtnet_get_drvinfo, .get_link = ethtool_op_get_link, @@ -1383,6 +1453,8 @@ static const struct ethtool_ops virtnet_ethtool_ops = { .set_channels = virtnet_set_channels, .get_channels = virtnet_get_channels, .get_ts_info = ethtool_op_get_ts_info, + .get_settings = virtnet_get_settings, + .set_settings = virtnet_set_settings, }; #define MIN_MTU 68 @@ -1855,6 +1927,8 @@ static int virtnet_probe(struct virtio_device *vdev) netif_set_real_num_tx_queues(dev,...
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...+ + vi->speed = SPEED_UNKNOWN; + vi->duplex = DUPLEX_UNKNOWN; +} + static const struct ethtool_ops virtnet_ethtool_ops = { .get_drvinfo = virtnet_get_drvinfo, .get_link = ethtool_op_get_link, @@ -1383,6 +1453,8 @@ static const struct ethtool_ops virtnet_ethtool_ops = { .set_channels = virtnet_set_channels, .get_channels = virtnet_get_channels, .get_ts_info = ethtool_op_get_ts_info, + .get_settings = virtnet_get_settings, + .set_settings = virtnet_set_settings, }; #define MIN_MTU 68 @@ -1855,6 +1927,8 @@ static int virtnet_probe(struct virtio_device *vdev) netif_set_real_num_tx_queues(dev,...
2015 Feb 10
4
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
..._coalesced_frames_irq = vi->tx_work_limit; > + > + return 0; > +} > + > static const struct ethtool_ops virtnet_ethtool_ops = { > .get_drvinfo = virtnet_get_drvinfo, > .get_link = ethtool_op_get_link, > .get_ringparam = virtnet_get_ringparam, > .set_channels = virtnet_set_channels, > .get_channels = virtnet_get_channels, > + .set_coalesce = virtnet_set_coalesce, > + .get_coalesce = virtnet_get_coalesce, > }; > > #define MIN_MTU 68 > @@ -2048,6 +2114,7 @@ static unsigned int features[] = { > VIRTIO_NET_F_GUEST_ANNOUNCE, VIRTIO_NET_F_MQ, >...
2015 Feb 10
4
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
..._coalesced_frames_irq = vi->tx_work_limit; > + > + return 0; > +} > + > static const struct ethtool_ops virtnet_ethtool_ops = { > .get_drvinfo = virtnet_get_drvinfo, > .get_link = ethtool_op_get_link, > .get_ringparam = virtnet_get_ringparam, > .set_channels = virtnet_set_channels, > .get_channels = virtnet_get_channels, > + .set_coalesce = virtnet_set_coalesce, > + .get_coalesce = virtnet_get_coalesce, > }; > > #define MIN_MTU 68 > @@ -2048,6 +2114,7 @@ static unsigned int features[] = { > VIRTIO_NET_F_GUEST_ANNOUNCE, VIRTIO_NET_F_MQ, >...
2013 Jan 25
5
[PATCH V8 1/3] virtio-net: fix the set affinity bug when CPU IDs are not consecutive
...ue_set_affinity(vi->sq[i].vq, -1); + } + + i = 0; + for_each_online_cpu(cpu) + *per_cpu_ptr(vi->vq_index, cpu) = + ++i % vi->curr_queue_pairs; + vi->affinity_hint_set = false; + } } static void virtnet_get_ringparam(struct net_device *dev, @@ -1082,6 +1104,7 @@ static int virtnet_set_channels(struct net_device *dev, if (queue_pairs > vi->max_queue_pairs) return -EINVAL; + get_online_cpus(); err = virtnet_set_queues(vi, queue_pairs); if (!err) { netif_set_real_num_tx_queues(dev, queue_pairs); @@ -1089,6 +1112,7 @@ static int virtnet_set_channels(struct net_device *dev...
2013 Jan 25
5
[PATCH V8 1/3] virtio-net: fix the set affinity bug when CPU IDs are not consecutive
...ue_set_affinity(vi->sq[i].vq, -1); + } + + i = 0; + for_each_online_cpu(cpu) + *per_cpu_ptr(vi->vq_index, cpu) = + ++i % vi->curr_queue_pairs; + vi->affinity_hint_set = false; + } } static void virtnet_get_ringparam(struct net_device *dev, @@ -1082,6 +1104,7 @@ static int virtnet_set_channels(struct net_device *dev, if (queue_pairs > vi->max_queue_pairs) return -EINVAL; + get_online_cpus(); err = virtnet_set_queues(vi, queue_pairs); if (!err) { netif_set_real_num_tx_queues(dev, queue_pairs); @@ -1089,6 +1112,7 @@ static int virtnet_set_channels(struct net_device *dev...
2013 Jan 21
6
[PATCH V6 1/3] virtio-net: fix the set affinity bug when CPU IDs are not consecutive
...ue_set_affinity(vi->sq[i].vq, -1); + } + + i = 0; + for_each_online_cpu(cpu) + *per_cpu_ptr(vi->vq_index, cpu) = + ++i % vi->curr_queue_pairs; + vi->affinity_hint_set = false; + } } static void virtnet_get_ringparam(struct net_device *dev, @@ -1087,7 +1104,9 @@ static int virtnet_set_channels(struct net_device *dev, netif_set_real_num_tx_queues(dev, queue_pairs); netif_set_real_num_rx_queues(dev, queue_pairs); + get_online_cpus(); virtnet_set_affinity(vi, true); + put_online_cpus(); } return err; @@ -1127,12 +1146,19 @@ static int virtnet_change_mtu(struct net_device...
2013 Jan 21
6
[PATCH V6 1/3] virtio-net: fix the set affinity bug when CPU IDs are not consecutive
...ue_set_affinity(vi->sq[i].vq, -1); + } + + i = 0; + for_each_online_cpu(cpu) + *per_cpu_ptr(vi->vq_index, cpu) = + ++i % vi->curr_queue_pairs; + vi->affinity_hint_set = false; + } } static void virtnet_get_ringparam(struct net_device *dev, @@ -1087,7 +1104,9 @@ static int virtnet_set_channels(struct net_device *dev, netif_set_real_num_tx_queues(dev, queue_pairs); netif_set_real_num_rx_queues(dev, queue_pairs); + get_online_cpus(); virtnet_set_affinity(vi, true); + put_online_cpus(); } return err; @@ -1127,12 +1146,19 @@ static int virtnet_change_mtu(struct net_device...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...NOWN; >> +} >> + >> static const struct ethtool_ops virtnet_ethtool_ops = { >> .get_drvinfo = virtnet_get_drvinfo, >> .get_link = ethtool_op_get_link, >> @@ -1383,6 +1453,8 @@ static const struct ethtool_ops virtnet_ethtool_ops = { >> .set_channels = virtnet_set_channels, >> .get_channels = virtnet_get_channels, >> .get_ts_info = ethtool_op_get_ts_info, >> + .get_settings = virtnet_get_settings, >> + .set_settings = virtnet_set_settings, >> }; >> >> #define MIN_MTU 68 >> @@ -1855,6 +1927,8 @@ static int virtne...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...NOWN; >> +} >> + >> static const struct ethtool_ops virtnet_ethtool_ops = { >> .get_drvinfo = virtnet_get_drvinfo, >> .get_link = ethtool_op_get_link, >> @@ -1383,6 +1453,8 @@ static const struct ethtool_ops virtnet_ethtool_ops = { >> .set_channels = virtnet_set_channels, >> .get_channels = virtnet_get_channels, >> .get_ts_info = ethtool_op_get_ts_info, >> + .get_settings = virtnet_get_settings, >> + .set_settings = virtnet_set_settings, >> }; >> >> #define MIN_MTU 68 >> @@ -1855,6 +1927,8 @@ static int virtne...