src/dpdk/lib/librte_distributor/rte_distributor_single.c
int
rte_distributor_returned_pkts_single(struct rte_distributor_single *d,
		struct rte_mbuf **mbufs, unsigned max_mbufs)
{
	struct rte_distributor_returned_pkts *returns = &d->returns;
	unsigned retval = (max_mbufs < returns->count) ?
			max_mbufs : returns->count;
	unsigned i;

	for (i = 0; i < retval; i++) {
		unsigned idx = (returns->start + i) & RTE_DISTRIB_RETURNS_MASK;
		mbufs[i] = returns->mbufs[idx];
	}
	returns->start += i;
	returns->count -= i;

	return retval;
}
/* return to the caller, packets returned from workers */
return to the caller, packets returned from workers
return to the caller packets returned from workers
int
rte_distributor_returned_pkts_single(struct rte_distributor_single *d,
		struct rte_mbuf **mbufs, unsigned max_mbufs)
{
	struct rte_distributor_returned_pkts *returns = &d->returns;
	unsigned retval = (max_mbufs < returns->count) ?
			max_mbufs : returns->count;
	unsigned i;
	for (i = 0; i < retval; i++) {
		unsigned idx = (returns->start + i) & RTE_DISTRIB_RETURNS_MASK;
		mbufs[i] = returns->mbufs[idx];
	}
	returns->start += i;
	returns->count -= i;
	return retval;
}
int rte_distributor_returned_pkts_single ( struct rte_distributor_single * d , struct rte_mbuf * * mbufs , unsigned max_mbufs ) { struct rte_distributor_returned_pkts * returns = & d -> returns ; unsigned retval = ( max_mbufs < returns -> count ) ? max_mbufs : returns -> count ; unsigned i ; for ( i = 0 ; i < retval ; i ++ ) { unsigned idx = ( returns -> start + i ) & RTE_DISTRIB_RETURNS_MASK ; mbufs [ i ] = returns -> mbufs [ idx ] ; } returns -> start += i ; returns -> count -= i ; return retval ; }
return to the caller, packets returned from workers
return to the caller packets returned from workers