summaryrefslogtreecommitdiffstats
path: root/src/plugins/memif/device.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-04-04 19:51:00 +0200
committerMarco Varlese <marco.varlese@suse.de>2018-04-05 12:32:25 +0000
commit4d72b172377681536feb7c454af73516a366c192 (patch)
tree0c9d4875d4148ce1ab7cff24c31597af801d6325 /src/plugins/memif/device.c
parent1e583111ebeb0333435cfad8af10ebe0e9842d4d (diff)
memif: bug fixes
Change-Id: Id775efb2e85d850e510d00f1b48bb711a3342397 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/memif/device.c')
-rw-r--r--src/plugins/memif/device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/memif/device.c b/src/plugins/memif/device.c
index 6accad6e673..c70a4ea3549 100644
--- a/src/plugins/memif/device.c
+++ b/src/plugins/memif/device.c
@@ -311,7 +311,8 @@ retry:
n_free = ring->tail - mq->last_tail;
if (n_free >= 16)
{
- vlib_buffer_free_from_ring_no_next (vm, mq->buffers, mq->last_tail,
+ vlib_buffer_free_from_ring_no_next (vm, mq->buffers,
+ mq->last_tail & mask,
ring_size, n_free);
mq->last_tail += n_free;
}