From: Lukasz Wojciechowski Date: Sat, 17 Oct 2020 03:06:59 +0000 (+0200) Subject: distributor: fix clearing returns buffer X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=20fa39d230d1e676c7bfe2a32f958f5851d471fc;p=dpdk.git distributor: fix clearing returns buffer The patch clears distributors returns buffer in clear_returns() by setting start and count to 0. Fixes: 775003ad2f96 ("distributor: add new burst-capable library") Cc: stable@dpdk.org Signed-off-by: Lukasz Wojciechowski Acked-by: David Hunt --- diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c index fb4e9d93f9..ef34facba6 100644 --- a/lib/librte_distributor/rte_distributor.c +++ b/lib/librte_distributor/rte_distributor.c @@ -702,6 +702,8 @@ rte_distributor_clear_returns(struct rte_distributor *d) /* Sync with worker. Release retptrs. */ __atomic_store_n(&(d->bufs[wkr].retptr64[0]), 0, __ATOMIC_RELEASE); + + d->returns.start = d->returns.count = 0; } /* creates a distributor instance */