aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/memif/device.c
diff options
context:
space:
mode:
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;
}