summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/pci.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2019-04-30 10:11:38 +0200
committerDamjan Marion <dmarion@me.com>2019-05-01 18:13:17 +0000
commit154a903a958ee6459ae1019883e6c4796b4cafc7 (patch)
tree78e25d7190b04ef52344bd70eecc54885534f865 /src/vnet/devices/virtio/pci.c
parent43b512cac2240cd679341a3bc01d548c573b8a85 (diff)
virtio: Fix virtio buffer allocation
Change-Id: I0ffb468aef56f5fd223218a83425771595863666 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/pci.c')
-rw-r--r--src/vnet/devices/virtio/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/devices/virtio/pci.c b/src/vnet/devices/virtio/pci.c
index b02b79d385b..aeb519bb28d 100644
--- a/src/vnet/devices/virtio/pci.c
+++ b/src/vnet/devices/virtio/pci.c
@@ -693,7 +693,7 @@ virtio_pci_vring_init (vlib_main_t * vm, virtio_if_t * vif, u16 queue_num)
do
{
if (n_alloc < queue_size)
- n_alloc =
+ n_alloc +=
vlib_buffer_alloc (vm, vring->indirect_buffers + n_alloc,
queue_size - n_alloc);
}