DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: <dev@dpdk.org>
Cc: <thomas.monjalon@6wind.com>, <bruce.richardson@intel.com>,
	<pablo.de.lara.guarch@intel.com>,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH 2/2] examples/l2fwd: increase mempool cache size for better performance
Date: Tue, 19 Apr 2016 15:05:28 +0530	[thread overview]
Message-ID: <1461058528-28435-3-git-send-email-jerin.jacob@caviumnetworks.com> (raw)
In-Reply-To: <1461058528-28435-1-git-send-email-jerin.jacob@caviumnetworks.com>

l3fwd sets the mempool cache size to 256, selected the same value for l2fwd

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 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

  parent reply	other threads:[~2016-04-19  9:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19  9:35 [dpdk-dev] [PATCH 0/2] l2fwd improvements Jerin Jacob
2016-04-19  9:35 ` [dpdk-dev] [PATCH 1/2] examples/l2fwd: remove number of cycles per second hardcording Jerin Jacob
2016-04-19  9:35 ` Jerin Jacob [this message]
2016-04-29 17:45 ` [dpdk-dev] [PATCH 0/2] l2fwd improvements De Lara Guarch, Pablo
2016-05-10 12:39 ` Pattan, Reshma
2016-06-08 20:18   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461058528-28435-3-git-send-email-jerin.jacob@caviumnetworks.com \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).