From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: [PATCH 2/2] examples/l2fwd: increase mempool cache size for better performance Date: Tue, 19 Apr 2016 15:05:28 +0530 Message-ID: <1461058528-28435-3-git-send-email-jerin.jacob@caviumnetworks.com> References: <1461058528-28435-1-git-send-email-jerin.jacob@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , , Jerin Jacob To: Return-path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0089.outbound.protection.outlook.com [157.56.111.89]) by dpdk.org (Postfix) with ESMTP id 38E48567A for ; Tue, 19 Apr 2016 11:36:46 +0200 (CEST) In-Reply-To: <1461058528-28435-1-git-send-email-jerin.jacob@caviumnetworks.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" l3fwd sets the mempool cache size to 256, selected the same value for l2fwd Signed-off-by: Jerin Jacob --- examples/l2fwd/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 7bdd1b5..24715e3 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -80,6 +80,7 @@ static volatile bool force_quit; #define MAX_PKT_BURST 32 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */ +#define MEMPOOL_CACHE_SIZE 256 /* * Configurable number of RX/TX ring descriptors @@ -545,8 +546,9 @@ main(int argc, char **argv) timer_period *= rte_get_timer_hz(); /* create the mbuf pool */ - l2fwd_pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool", NB_MBUF, 32, - 0, RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id()); + l2fwd_pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool", NB_MBUF, + MEMPOOL_CACHE_SIZE, 0, RTE_MBUF_DEFAULT_BUF_SIZE, + rte_socket_id()); if (l2fwd_pktmbuf_pool == NULL) rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n"); -- 2.1.0