[PATCH v3 ] dumpcap: fix mbuf pool ring type
Stephen Hemminger
stephen at networkplumber.org
Wed Nov 8 18:47:38 CET 2023
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.
Bugzilla ID: 1271
Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
v3 - just change ops, don't use default pool ops
app/dumpcap/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 64294bbfb3e6..4f581bd341d8 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -694,7 +694,7 @@ static struct rte_mempool *create_mempool(void)
mp = rte_pktmbuf_pool_create_by_ops(pool_name, num_mbufs,
MBUF_POOL_CACHE_SIZE, 0,
data_size,
- rte_socket_id(), "ring_mp_sc");
+ rte_socket_id(), "ring_mp_mc");
if (mp == NULL)
rte_exit(EXIT_FAILURE,
"Mempool (%s) creation failed: %s\n", pool_name,
--
2.39.2
More information about the dev
mailing list