search for: virtnet_set_queu

Displaying 20 results from an estimated 131 matches for "virtnet_set_queu".

Did you mean: virtnet_set_queue
2014 Apr 22
2
[PATCH] virtio_net: return error when there is no virtqueue or MQ isn't support
...t; 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index 8a852b5..eaf8266 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -1053,7 +1053,7 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs) > > struct net_device *dev = vi->dev; > > > > if (!vi->has_cvq || !virtio_has_feature(vi->vdev, VIRTIO_NET_F_MQ)) > > - return 0; > > + return -ENOTSUPP; > > > > s.virtqueue_pairs = queue_pair...
2014 Apr 22
2
[PATCH] virtio_net: return error when there is no virtqueue or MQ isn't support
...t; 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index 8a852b5..eaf8266 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -1053,7 +1053,7 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs) > > struct net_device *dev = vi->dev; > > > > if (!vi->has_cvq || !virtio_has_feature(vi->vdev, VIRTIO_NET_F_MQ)) > > - return 0; > > + return -ENOTSUPP; > > > > s.virtqueue_pairs = queue_pair...
2014 Apr 21
2
[PATCH] virtio_net: return error when there is no virtqueue or MQ isn't support
...;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 8a852b5..eaf8266 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1053,7 +1053,7 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs) struct net_device *dev = vi->dev; if (!vi->has_cvq || !virtio_has_feature(vi->vdev, VIRTIO_NET_F_MQ)) - return 0; + return -ENOTSUPP; s.virtqueue_pairs = queue_pairs; sg_init_one(&sg, &s, sizeof(s)); -- 1.9.0
2014 Apr 21
2
[PATCH] virtio_net: return error when there is no virtqueue or MQ isn't support
...;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 8a852b5..eaf8266 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1053,7 +1053,7 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs) struct net_device *dev = vi->dev; if (!vi->has_cvq || !virtio_has_feature(vi->vdev, VIRTIO_NET_F_MQ)) - return 0; + return -ENOTSUPP; s.virtqueue_pairs = queue_pairs; sg_init_one(&sg, &s, sizeof(s)); -- 1.9.0
2014 Apr 18
3
[PATCH] virtio_net: zero is an invald queue_pairs number
Execute "ethtool -L eth0 combined 0" in guest, if multiqueue is enabled, virtnet_send_command() will return -EINVAL error, there is a validation in QEMU. But if multiqueue is disabled, virtnet_set_queues() will just return zero (success). We should return error for this situation. Signed-off-by: Amos Kong <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.....
2014 Apr 18
3
[PATCH] virtio_net: zero is an invald queue_pairs number
Execute "ethtool -L eth0 combined 0" in guest, if multiqueue is enabled, virtnet_send_command() will return -EINVAL error, there is a validation in QEMU. But if multiqueue is disabled, virtnet_set_queues() will just return zero (success). We should return error for this situation. Signed-off-by: Amos Kong <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.....
2014 Apr 22
0
[PATCH] virtio_net: return error when there is no virtqueue or MQ isn't support
..., 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c >>> index 8a852b5..eaf8266 100644 >>> --- a/drivers/net/virtio_net.c >>> +++ b/drivers/net/virtio_net.c >>> @@ -1053,7 +1053,7 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs) >>> struct net_device *dev = vi->dev; >>> >>> if (!vi->has_cvq || !virtio_has_feature(vi->vdev, VIRTIO_NET_F_MQ)) >>> - return 0; >>> + return -ENOTSUPP; >>> >>> s.virtque...
2013 Jul 03
4
[PATCH net] virtio-net: fix the race between channels setting and refill
...at redhat.com> --- drivers/net/virtio_net.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index c9e0038..47b4882 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -901,7 +901,6 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs) struct scatterlist sg; struct virtio_net_ctrl_mq s; struct net_device *dev = vi->dev; - int i; if (!vi->has_cvq || !virtio_has_feature(vi->vdev, VIRTIO_NET_F_MQ)) return 0; @@ -915,10 +914,8 @@ static int virtnet_set_queues(struct vi...
2013 Jul 03
4
[PATCH net] virtio-net: fix the race between channels setting and refill
...at redhat.com> --- drivers/net/virtio_net.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index c9e0038..47b4882 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -901,7 +901,6 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs) struct scatterlist sg; struct virtio_net_ctrl_mq s; struct net_device *dev = vi->dev; - int i; if (!vi->has_cvq || !virtio_has_feature(vi->vdev, VIRTIO_NET_F_MQ)) return 0; @@ -915,10 +914,8 @@ static int virtnet_set_queues(struct vi...
2014 Apr 21
1
[PATCH] virtio_net: zero is an invald queue_pairs number
...n Wang wrote: > On 04/18/2014 01:45 PM, Amos Kong wrote: >> Execute "ethtool -L eth0 combined 0" in guest, if multiqueue >> is enabled, virtnet_send_command() will return -EINVAL error, >> there is a validation in QEMU. >> >> But if multiqueue is disabled, virtnet_set_queues() will just >> return zero (success). We should return error for this situation. >> >> Signed-off-by: Amos Kong <akong at redhat.com> >> --- >> drivers/net/virtio_net.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git...
2014 Apr 21
1
[PATCH] virtio_net: zero is an invald queue_pairs number
...n Wang wrote: > On 04/18/2014 01:45 PM, Amos Kong wrote: >> Execute "ethtool -L eth0 combined 0" in guest, if multiqueue >> is enabled, virtnet_send_command() will return -EINVAL error, >> there is a validation in QEMU. >> >> But if multiqueue is disabled, virtnet_set_queues() will just >> return zero (success). We should return error for this situation. >> >> Signed-off-by: Amos Kong <akong at redhat.com> >> --- >> drivers/net/virtio_net.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git...
2014 Jan 16
2
[PATCH net-next v3 5/5] virtio-net: initial rx sysfs support, export mergeable rx buffer size
...There is also the issue that refill_work() could be scheduled. If refill_work() executes, it will re-enable NAPI. We'd need to cancel the vi->refill delayed work to prevent this AFAICT, and also ensure that no other function re-schedules vi->refill or re-enables NAPI (virtnet_open/close, virtnet_set_queues, and virtnet_freeze/restore). How is the following sequence of operations: rtnl_lock(); cancel_delayed_work_sync(&vi->refill); napi_disable(&rq->napi); read rq->mrg_avg_pkt_len virtnet_enable_napi(); rtnl_unlock(); Additionally, if we disable NAPI when reading this file, perhap...
2014 Jan 16
2
[PATCH net-next v3 5/5] virtio-net: initial rx sysfs support, export mergeable rx buffer size
...There is also the issue that refill_work() could be scheduled. If refill_work() executes, it will re-enable NAPI. We'd need to cancel the vi->refill delayed work to prevent this AFAICT, and also ensure that no other function re-schedules vi->refill or re-enables NAPI (virtnet_open/close, virtnet_set_queues, and virtnet_freeze/restore). How is the following sequence of operations: rtnl_lock(); cancel_delayed_work_sync(&vi->refill); napi_disable(&rq->napi); read rq->mrg_avg_pkt_len virtnet_enable_napi(); rtnl_unlock(); Additionally, if we disable NAPI when reading this file, perhap...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...tus(dev, VIRTIO_CONFIG_S_DRIVER); >> + >> + ret = virtio_finalize_features(dev); >> + if (ret) >> + goto err; >> + >> + ret = virtnet_restore_up(dev); >> + if (ret) >> + goto err; >> + >> + ret = virtnet_set_queues(vi, vi->curr_queue_pairs); >> + if (ret) >> + goto err; >> + >> + virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); >> + virtio_config_enable(dev); >> + return 0; >> + >> +err: >> + virtio_add_status(dev, VI...
2017 Oct 16
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...tus(dev, VIRTIO_CONFIG_S_DRIVER); >> + >> + ret = virtio_finalize_features(dev); >> + if (ret) >> + goto err; >> + >> + ret = virtnet_restore_up(dev); >> + if (ret) >> + goto err; >> + >> + ret = virtnet_set_queues(vi, vi->curr_queue_pairs); >> + if (ret) >> + goto err; >> + >> + virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); >> + virtio_config_enable(dev); >> + return 0; >> + >> +err: >> + virtio_add_status(dev, VI...
2013 Oct 15
0
[PATCH net V2 2/2] virtio-net: refill only when device is up during setting queues
...d for 3.10 and above. --- drivers/net/virtio_net.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index c4bc1cc..9fbdfcd 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -938,7 +938,9 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs) return -EINVAL; } else { vi->curr_queue_pairs = queue_pairs; - schedule_delayed_work(&vi->refill, 0); + /* virtnet_open() will refill when device is going to up. */ + if (dev->flags & IFF_UP) + schedule_delayed_work(&vi-&...
2014 Apr 22
0
[PATCH] virtio_net: return error when there is no virtqueue or MQ isn't support
...ers/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 8a852b5..eaf8266 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -1053,7 +1053,7 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs) > struct net_device *dev = vi->dev; > > if (!vi->has_cvq || !virtio_has_feature(vi->vdev, VIRTIO_NET_F_MQ)) > - return 0; > + return -ENOTSUPP; > > s.virtqueue_pairs = queue_pairs; > sg_init_one(&sg, &amp...
2013 Jan 25
4
[PATCH V7 1/3] virtio-net: fix the set affinity bug when CPU IDs are not consecutive
...mail.com> Cc: "David S. Miller" <davem at davemloft.net> Cc: virtualization at lists.linux-foundation.org Cc: netdev at vger.kernel.org Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> Acked-by: Michael S. Tsirkin <mst at redhat.com> --- V6->V7: serialize virtnet_set_queues to avoid a race with cpu hotplug (Jason) V5->V6: remove {get|put}_online_cpus from virtnet_del_vqs (Jason) V4->V5: Add get/put_online_cpus to avoid CPUs go up and down during operations (Rusty) V3->V4: move vq_index into virtnet_info (Jason) change the mapping value when not setting...
2013 Jan 25
4
[PATCH V7 1/3] virtio-net: fix the set affinity bug when CPU IDs are not consecutive
...mail.com> Cc: "David S. Miller" <davem at davemloft.net> Cc: virtualization at lists.linux-foundation.org Cc: netdev at vger.kernel.org Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> Acked-by: Michael S. Tsirkin <mst at redhat.com> --- V6->V7: serialize virtnet_set_queues to avoid a race with cpu hotplug (Jason) V5->V6: remove {get|put}_online_cpus from virtnet_del_vqs (Jason) V4->V5: Add get/put_online_cpus to avoid CPUs go up and down during operations (Rusty) V3->V4: move vq_index into virtnet_info (Jason) change the mapping value when not setting...
2017 Oct 13
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...+ virtnet_freeze_down(dev, true); + remove_vq_common(vi); + + virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE); + virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER); + + ret = virtio_finalize_features(dev); + if (ret) + goto err; + + ret = virtnet_restore_up(dev); + if (ret) + goto err; + + ret = virtnet_set_queues(vi, vi->curr_queue_pairs); + if (ret) + goto err; + + virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); + virtio_config_enable(dev); + return 0; + +err: + virtio_add_status(dev, VIRTIO_CONFIG_S_FAILED); + return ret; +} + static int virtnet_set_guest_offloads(struct virtnet_info *vi, u64 of...