| 138 | } |
| 139 | |
| 140 | int |
| 141 | graph_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 | |
| 157 | done: |
| 158 | return 0; |
| 159 | } |
| 160 | |
| 161 | int |
| 162 | graph_pcap_init(struct graph *graph) |
no test coverage detected