| 986 | #ifdef RTE_MBUF_REFCNT_ATOMIC |
| 987 | |
| 988 | static int |
| 989 | test_refcnt_worker(void *arg) |
| 990 | { |
| 991 | unsigned lcore, free; |
| 992 | void *mp = 0; |
| 993 | struct rte_ring *refcnt_mbuf_ring = arg; |
| 994 | |
| 995 | lcore = rte_lcore_id(); |
| 996 | printf("%s started at lcore %u\n", __func__, lcore); |
| 997 | |
| 998 | free = 0; |
| 999 | while (refcnt_stop_workers == 0) { |
| 1000 | if (rte_ring_dequeue(refcnt_mbuf_ring, &mp) == 0) { |
| 1001 | free++; |
| 1002 | rte_pktmbuf_free(mp); |
| 1003 | } |
| 1004 | } |
| 1005 | |
| 1006 | refcnt_lcore[lcore] += free; |
| 1007 | printf("%s finished at lcore %u, " |
| 1008 | "number of freed mbufs: %u\n", |
| 1009 | __func__, lcore, free); |
| 1010 | return 0; |
| 1011 | } |
| 1012 | |
| 1013 | static void |
| 1014 | test_refcnt_iter(unsigned int lcore, unsigned int iter, |
nothing calls this directly
no test coverage detected