[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/5] virtio-net: fix the upper bound when trying to
From: |
Jason Wang |
Subject: |
[Qemu-devel] [PATCH 3/5] virtio-net: fix the upper bound when trying to delete queues |
Date: |
Fri, 6 Feb 2015 15:54:11 +0800 |
Virtqueue were indexed from zero, so don't delete virtqueue whose
index is n->max_queues * 2 + 1.
Cc: Anthony Liguori <address@hidden>
Cc: Michael S. Tsirkin <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
---
hw/net/virtio-net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 45da34a..184b2f2 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1306,7 +1306,7 @@ static void virtio_net_set_multiqueue(VirtIONet *n, int
multiqueue)
n->multiqueue = multiqueue;
- for (i = 2; i <= n->max_queues * 2 + 1; i++) {
+ for (i = 2; i < n->max_queues * 2 + 1; i++) {
virtio_del_queue(vdev, i);
}
--
1.9.1
- [Qemu-devel] [PATCH 0/5] Support more virtio queues, Jason Wang, 2015/02/06
- [Qemu-devel] [PATCH 2/5] virtio: increase VIRITO_QUEUE_MAX to 513, Jason Wang, 2015/02/06
- [Qemu-devel] [PATCH 1/5] virtio: rename VIRTIO_PCI_QUEUE_MAX to VIRTIO_QUEUE_MAX, Jason Wang, 2015/02/06
- [Qemu-devel] [PATCH 3/5] virtio-net: fix the upper bound when trying to delete queues,
Jason Wang <=
- [Qemu-devel] [PATCH 4/5] pci: remove hard-coded bar size in msix_init_exclusive_bar(), Jason Wang, 2015/02/06
- [Qemu-devel] [PATCH 5/5] virtio-pci: introduce auto_msix_bar_size property, Jason Wang, 2015/02/06
- Re: [Qemu-devel] [PATCH 0/5] Support more virtio queues, Stefan Hajnoczi, 2015/02/06