[v5,15/15] distributor: fix clearing returns buffer

Message ID 20201008052323.11547-16-l.wojciechow@partner.samsung.com (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series fix distributor synchronization issues |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/travis-robot warning Travis build: failed
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Lukasz Wojciechowski Oct. 8, 2020, 5:23 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>
---
 lib/librte_distributor/rte_distributor.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Hunt, David Oct. 9, 2020, 1:12 p.m. UTC | #1
Hi Lukasz,

On 8/10/2020 6:23 AM, Lukasz Wojciechowski wrote:
> 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>
> ---
>   lib/librte_distributor/rte_distributor.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
> index 2478de3b7..57240304a 100644
> --- a/lib/librte_distributor/rte_distributor.c
> +++ b/lib/librte_distributor/rte_distributor.c
> @@ -704,6 +704,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 */


Acked-by: David Hunt <david.hunt@intel.com>
  

Patch

diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index 2478de3b7..57240304a 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -704,6 +704,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 */