From 9272fd9d9849ef4ba145ca333046ec80e9a62a13 Mon Sep 17 00:00:00 2001 From: Lukas Sismis Date: Sat, 29 Mar 2025 13:36:51 +0100 Subject: [PATCH] dpdk: adjust auto mempool calculation when no TX queues set --- src/runmode-dpdk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/runmode-dpdk.c b/src/runmode-dpdk.c index d16c65df34..ee0665d27d 100644 --- a/src/runmode-dpdk.c +++ b/src/runmode-dpdk.c @@ -515,7 +515,11 @@ static int ConfigSetTxQueues( static uint32_t MempoolSizeCalculate( uint32_t rx_queues, uint32_t rx_desc, uint32_t tx_queues, uint32_t tx_desc) { - return rx_queues * rx_desc + tx_queues * tx_desc; + uint32_t sz = rx_queues * rx_desc + tx_queues * tx_desc; + if (!tx_queues || !tx_desc) + sz *= 2; // double to have enough space for RX descriptors + + return sz; } static int ConfigSetMempoolSize(DPDKIfaceConfig *iconf, const char *entry_str)