/* Sync with worker on GET_BUF flag. */
if (__atomic_load_n(&(d->bufs[wid].bufptr64[0]),
__ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF) {
+ d->bufs[wid].count = 0;
release(d, wid);
handle_returns(d, wid);
}
uint16_t matches[RTE_DIST_BURST_SIZE];
unsigned int pkts;
- /* Sync with worker on GET_BUF flag. */
- if (__atomic_load_n(&(d->bufs[wkr].bufptr64[0]),
- __ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF)
- d->bufs[wkr].count = 0;
-
if ((num_mbufs - next_idx) < RTE_DIST_BURST_SIZE)
pkts = num_mbufs - next_idx;
else
for (wid = 0 ; wid < d->num_workers; wid++)
/* Sync with worker on GET_BUF flag. */
if ((__atomic_load_n(&(d->bufs[wid].bufptr64[0]),
- __ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF))
+ __ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF)) {
+ d->bufs[wid].count = 0;
release(d, wid);
+ }
return num_mbufs;
}
unsigned int wkr, total_outstanding = 0;
for (wkr = 0; wkr < d->num_workers; wkr++)
- total_outstanding += d->backlog[wkr].count;
+ total_outstanding += d->backlog[wkr].count + d->bufs[wkr].count;
return total_outstanding;
}