[v8,15/17] distributor: fix clearing returns buffer
diff mbox series

Message ID 20201017030701.16134-16-l.wojciechow@partner.samsung.com
State Accepted
Delegated to: David Marchand
Headers show
Series
  • fix distributor synchronization issues
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Lukasz Wojciechowski Oct. 17, 2020, 3:06 a.m. UTC
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: david.hunt@intel.com
Cc: stable@dpdk.org

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 lib/librte_distributor/rte_distributor.c | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox series

diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index fb4e9d93f..ef34facba 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 */