src/dpdk/lib/librte_distributor/rte_distributor.c
void
rte_distributor_clear_returns(struct rte_distributor *d)
{
	unsigned int wkr;

	if (d->alg_type == RTE_DIST_ALG_SINGLE) {
		/* Call the old API */
		rte_distributor_clear_returns_single(d->d_single);
		return;
	}

	/* throw away returns, so workers can exit */
	for (wkr = 0; wkr < d->num_workers; wkr++)
		/* Sync with worker. Release retptrs. */
		__atomic_store_n(&(d->bufs[wkr].retptr64[0]), 0,
				__ATOMIC_RELEASE);

	d->returns.start = d->returns.count = 0;
}
/* clears the internal returns array in the distributor */
clears the internal returns array in the distributor
clears the internal returns array in the distributor
void
rte_distributor_clear_returns(struct rte_distributor *d)
{
	unsigned int wkr;
	if (d->alg_type == RTE_DIST_ALG_SINGLE) {
		rte_distributor_clear_returns_single(d->d_single);
		return;
	}
	for (wkr = 0; wkr < d->num_workers; wkr++)
		__atomic_store_n(&(d->bufs[wkr].retptr64[0]), 0,
				__ATOMIC_RELEASE);
	d->returns.start = d->returns.count = 0;
}
void rte_distributor_clear_returns ( struct rte_distributor * d ) { unsigned int wkr ; if ( d -> alg_type == RTE_DIST_ALG_SINGLE ) { rte_distributor_clear_returns_single ( d -> d_single ) ; return ; } for ( wkr = 0 ; wkr < d -> num_workers ; wkr ++ ) __atomic_store_n ( & ( d -> bufs [ wkr ] . retptr64 [ 0 ] ) , 0 , __ATOMIC_RELEASE ) ; d -> returns . start = d -> returns . count = 0 ; }
clears the internal returns array in the distributor
clears the internal returns array in the distributor
/* Call the old API */ /* throw away returns, so workers can exit */ /* Sync with worker. Release retptrs. */