struct rte_mbuf *buf[8] __rte_cache_aligned;
struct worker_params *wp = arg;
struct rte_distributor *db = wp->dist;
- unsigned int count = 0, num = 0;
+ unsigned int count = 0, num;
unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED);
- int i;
- for (i = 0; i < 8; i++)
- buf[i] = NULL;
- num = rte_distributor_get_pkt(db, id, buf, buf, num);
+ num = rte_distributor_get_pkt(db, id, buf, NULL, 0);
while (!quit) {
__atomic_fetch_add(&worker_stats[id].handled_packets, num,
__ATOMIC_RELAXED);
struct rte_distributor *d = wp->dist;
unsigned int count = 0;
unsigned int i;
- unsigned int num = 0;
+ unsigned int num;
unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED);
- for (i = 0; i < 8; i++)
- buf[i] = NULL;
- num = rte_distributor_get_pkt(d, id, buf, buf, num);
+ num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
while (!quit) {
worker_stats[id].handled_packets += num;
count += num;
for (i = 0; i < num; i++)
rte_pktmbuf_free(buf[i]);
- num = rte_distributor_get_pkt(d,
- id, buf, buf, num);
+ num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
}
worker_stats[id].handled_packets += num;
count += num;
struct worker_params *wp = arg;
struct rte_distributor *d = wp->dist;
unsigned int count = 0;
- unsigned int num = 0;
+ unsigned int num;
unsigned int total = 0;
unsigned int i;
unsigned int returned = 0;
const unsigned int id = __atomic_fetch_add(&worker_idx, 1,
__ATOMIC_RELAXED);
- num = rte_distributor_get_pkt(d, id, buf, buf, num);
+ num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
/* wait for quit single globally, or for worker zero, wait
* for zero_quit */
count += num;
for (i = 0; i < num; i++)
rte_pktmbuf_free(buf[i]);
- num = rte_distributor_get_pkt(d,
- id, buf, buf, num);
+ num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
total += num;
}
worker_stats[id].handled_packets += num;
while (zero_quit)
usleep(100);
- num = rte_distributor_get_pkt(d,
- id, buf, buf, num);
+ num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
while (!quit) {
worker_stats[id].handled_packets += num;
count += num;
rte_pktmbuf_free(pkt);
- num = rte_distributor_get_pkt(d, id, buf, buf, num);
+ num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
}
returned = rte_distributor_return_pkt(d,
id, buf, num);