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

Function ff_init_ref_pool

lib/ff_memory.c:213–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213void ff_init_ref_pool(int nb_mbuf, int socketid)
214{
215 char s[64] = {0};
216
217 if (ff_ref_pool[socketid] != NULL) {
218 return;
219 }
220 snprintf(s, sizeof(s), "ff_ref_pool_%d", socketid);
221 if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
222 ff_ref_pool[socketid] = rte_pktmbuf_pool_create(s, nb_mbuf, MEMPOOL_CACHE_SIZE, 0, 0, socketid);
223 } else {
224 ff_ref_pool[socketid] = rte_mempool_lookup(s);
225 }
226}
227
228int ff_mmap_init()
229{

Callers 1

init_mem_poolFunction · 0.85

Calls 4

snprintfFunction · 0.85
rte_eal_process_typeFunction · 0.85
rte_pktmbuf_pool_createFunction · 0.85
rte_mempool_lookupFunction · 0.85

Tested by

no test coverage detected