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

Function init_mbuf_pools

dpdk/examples/server_node_efd/efd_server/init.c:68–84  ·  view source on GitHub ↗

* Initialise the mbuf pool for packet reception for the NIC, and any other * buffer pools needed by the app - currently none. */

Source from the content-addressed store, hash-verified

66 * buffer pools needed by the app - currently none.
67 */
68static int
69init_mbuf_pools(void)
70{
71 const unsigned int num_mbufs = (num_nodes * MBUFS_PER_NODE) +
72 (info->num_ports * MBUFS_PER_PORT);
73
74 /*
75 * Don't pass single-producer/single-consumer flags to mbuf create as it
76 * seems faster to use a cache instead
77 */
78 printf("Creating mbuf pool '%s' [%u mbufs] ...\n",
79 PKTMBUF_POOL_NAME, num_mbufs);
80 pktmbuf_pool = rte_pktmbuf_pool_create(PKTMBUF_POOL_NAME, num_mbufs,
81 MBUF_CACHE_SIZE, 0, RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());
82
83 return pktmbuf_pool == NULL; /* 0 on success */
84}
85
86/**
87 * Initialise an individual port:

Callers 1

initFunction · 0.70

Calls 3

rte_pktmbuf_pool_createFunction · 0.85
rte_socket_idFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected