[PATCH] dumpcap: fix mbuf pool ring type

Stephen Hemminger stephen at networkplumber.org
Fri Aug 4 18:16:04 CEST 2023


The ring used to store mbufs needs to be multiple producer,
multiple consumer because multiple queues might on multiple
cores might be allocating and same time (consume) and in
case of ring full, the mbufs will be returned (multiple producer).

Bugzilla ID: 1271
Fixes: cb2440fd77af ("dumpcap: fix mbuf pool ring type")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 app/dumpcap/main.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 64294bbfb3e6..991174e95022 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -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,
-- 
2.39.2



More information about the dev mailing list