[v2] dumpcap: fix mbuf pool ring type
Checks
Commit Message
The internal buffer pool used for copies of mbufs captured
needs to be thread safe. If capturing on multiple interfaces
or multiple queues, the same pool will be used (consumers).
And if the capture ring gets full, the queues will need
to put back the capture buffer which leads to multiple producers.
Since this is the same use case as normal drivers and
the default pool time can not be overridden on dumpcap command
line, it is OK to use the default pool type.
Bugzilla ID: 1271
Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
v2 - reword commit message
app/dumpcap/main.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
@@ -691,10 +691,9 @@ static struct rte_mempool *create_mempool(void)
data_size = mbuf_size;
}
- mp = rte_pktmbuf_pool_create_by_ops(pool_name, num_mbufs,
- MBUF_POOL_CACHE_SIZE, 0,
- data_size,
- rte_socket_id(), "ring_mp_sc");
+ mp = rte_pktmbuf_pool_create(pool_name, num_mbufs,
+ MBUF_POOL_CACHE_SIZE, 0,
+ data_size, rte_socket_id());
if (mp == NULL)
rte_exit(EXIT_FAILURE,
"Mempool (%s) creation failed: %s\n", pool_name,