From 16d80a6ddc93159aacbee51370633578ee979803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?fengbojiang=28=E5=A7=9C=E5=87=A4=E6=B3=A2=29?= Date: Thu, 27 Jun 2019 12:12:59 +0800 Subject: [PATCH] modify RTE_MAX to RTE_ALIGN_CEIL while init mempool. --- lib/ff_dpdk_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ff_dpdk_if.c b/lib/ff_dpdk_if.c index 3a824951..4d570228 100644 --- a/lib/ff_dpdk_if.c +++ b/lib/ff_dpdk_if.c @@ -278,7 +278,7 @@ init_mem_pool(void) uint32_t nb_tx_queue = nb_lcores; uint32_t nb_rx_queue = lcore_conf.nb_rx_queue * nb_lcores; - unsigned nb_mbuf = RTE_MAX ( + unsigned nb_mbuf = RTE_ALIGN_CEIL ( (nb_rx_queue*RX_QUEUE_SIZE + nb_ports*nb_lcores*MAX_PKT_BURST + nb_ports*nb_tx_queue*TX_QUEUE_SIZE + @@ -327,7 +327,7 @@ init_mem_pool(void) } #ifdef FF_USE_PAGE_ARRAY - nb_mbuf = RTE_MAX ( + nb_mbuf = RTE_ALIGN_CEIL ( nb_ports*nb_lcores*MAX_PKT_BURST + nb_ports*nb_tx_queue*TX_QUEUE_SIZE + nb_lcores*MEMPOOL_CACHE_SIZE,