summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-05-12 14:43:21 +0200
committerDamjan Marion <damarion@cisco.com>2021-05-12 15:46:59 +0200
commit8b4d474abd62c623502ad9a4a279a9b4535ca0c1 (patch)
treea820d9863b84a37bed82801e02df635ee042ff76 /src/plugins
parentee32d66802a39f97643e2de263390ddfa5aa09f6 (diff)
avf: avoid eating our own tail
This happens in case we are not able to refill ring with new buffers. Type: fix Change-Id: I727e55c5b8482d9b8aeb4a9933a9a755fe21e55f Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/avf/input.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/avf/input.c b/src/plugins/avf/input.c
index 6e437da2a16..4d037b44a28 100644
--- a/src/plugins/avf/input.c
+++ b/src/plugins/avf/input.c
@@ -428,6 +428,9 @@ no_more_desc:
rxq->next = next;
rxq->n_enqueued -= n_rx_packets + n_tail_desc;
+ /* avoid eating our own tail */
+ rxq->descs[(next + rxq->n_enqueued) & mask].qword[1] = 0;
+
#if defined(CLIB_HAVE_VEC256) || defined(CLIB_HAVE_VEC128)
or_qw1 |= or_q1x4[0] | or_q1x4[1] | or_q1x4[2] | or_q1x4[3];
#endif