From: Lukas Sismis Date: Sat, 29 Mar 2025 12:36:51 +0000 (+0100) Subject: dpdk: adjust auto mempool calculation when no TX queues set X-Git-Tag: suricata-8.0.0-beta1~165 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9272fd9d9849ef4ba145ca333046ec80e9a62a13;p=thirdparty%2Fsuricata.git dpdk: adjust auto mempool calculation when no TX queues set --- 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)