summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-10-28 10:42:32 +0100
committerMohsin Kazmi <sykazmi@cisco.com>2020-10-28 10:42:32 +0100
commit224a3c03d9aa34259ac3816c0039f2776d6da5ef (patch)
tree40d1e7e2966c04fad7322de8e93c31cb4de7a503 /src/vnet
parentb242d31593801c8923314ab0513854b81ed4b26a (diff)
virtio: fix the buffer array index
Type: fix Fixes: 2e6f624f1f82ae0351dd05ad5d930d6876105519 Change-Id: I24a9822d1968a134c7e41221f48296cc8a67dd91 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/devices/virtio/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/devices/virtio/device.c b/src/vnet/devices/virtio/device.c
index b84949ca3ae..fe943a9b6d7 100644
--- a/src/vnet/devices/virtio/device.c
+++ b/src/vnet/devices/virtio/device.c
@@ -723,7 +723,7 @@ VNET_DEVICE_CLASS_TX_FN (virtio_device_class) (vlib_main_t * vm,
}
if (n_left)
virtio_interface_drop_inline (vm, node->node_index,
- buffers, n_left,
+ buffers + frame->n_vectors - n_left, n_left,
VIRTIO_TX_ERROR_NO_FREE_SLOTS);
clib_spinlock_unlock_if_init (&vring->lockp);