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

Function graph_pcap_mp_init

dpdk/lib/graph/graph_pcap.c:140–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140int
141graph_pcap_mp_init(void)
142{
143 pkt_mp = rte_mempool_lookup(GRAPH_PCAP_PKT_POOL);
144 if (pkt_mp)
145 goto done;
146
147 /* Make a pool for cloned packets */
148 pkt_mp = rte_pktmbuf_pool_create_by_ops(GRAPH_PCAP_PKT_POOL,
149 IOV_MAX + RTE_GRAPH_BURST_SIZE, 0, 0,
150 rte_pcapng_mbuf_size(RTE_MBUF_DEFAULT_BUF_SIZE),
151 SOCKET_ID_ANY, "ring_mp_mc");
152 if (pkt_mp == NULL) {
153 graph_err("Cannot create mempool for graph pcap capture.");
154 return -1;
155 }
156
157done:
158 return 0;
159}
160
161int
162graph_pcap_init(struct graph *graph)

Callers 2

graph_pcap_initFunction · 0.85

Calls 3

rte_mempool_lookupFunction · 0.85
rte_pcapng_mbuf_sizeFunction · 0.85

Tested by

no test coverage detected