MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_refcnt_worker

Function test_refcnt_worker

dpdk/app/test/test_mbuf.c:988–1011  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

986#ifdef RTE_MBUF_REFCNT_ATOMIC
987
988static int
989test_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
1013static void
1014test_refcnt_iter(unsigned int lcore, unsigned int iter,

Callers

nothing calls this directly

Calls 4

rte_lcore_idFunction · 0.85
rte_ring_dequeueFunction · 0.85
rte_pktmbuf_freeFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected