From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by dpdk.org (Postfix) with ESMTP id 3136CB0AA for ; Thu, 26 Jun 2014 08:53:44 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 25 Jun 2014 23:54:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,548,1400050800"; d="scan'208";a="450161268" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by azsmga001.ch.intel.com with ESMTP; 25 Jun 2014 23:54:02 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s5Q6s0tv002255; Thu, 26 Jun 2014 14:54:00 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s5Q6rund017399; Thu, 26 Jun 2014 14:53:58 +0800 Received: (from cliang18@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s5Q6ruWv017395; Thu, 26 Jun 2014 14:53:56 +0800 From: Cunming Liang To: dev@dpdk.org Date: Thu, 26 Jun 2014 14:53:34 +0800 Message-Id: X-Mailer: git-send-email 1.7.0.7 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 5/5] testpmd: change some of testpmd default parameter to well tuned value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 06:53:44 -0000 We usually use testpmd fwd to demostrate IO forwarding throughput. For best throughput, it has to assign the special parameter to testpmd. To makes it easier to run, now set it as defalut value. Such parameters are MBUF Mempool Cache and RX/TX threshold registers. MBCACHE: 250 RX threshold registers: pthresh=8 hthresh=8 wthresh=0 TX threshold registers: pthresh=32 hthresh=0 wthresh=0 Signed-off-by: Cunming Liang Acked-by: Bruce Richardson Acked-by: Yong Liu Tested-by: Zhaochen Zhan --- app/test-pmd/testpmd.c | 6 +++--- app/test-pmd/testpmd.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 546d429..16fe596 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -174,7 +174,7 @@ uint16_t tx_pkt_seg_lengths[RTE_MAX_SEGS_PER_PKT] = { uint8_t tx_pkt_nb_segs = 1; /**< Number of segments in TXONLY packets */ uint16_t nb_pkt_per_burst = DEF_PKT_BURST; /**< Number of packets per burst. */ -uint16_t mb_mempool_cache = DEF_PKT_BURST; /**< Size of mbuf mempool cache. */ +uint16_t mb_mempool_cache = DEF_MBUF_CACHE; /**< Size of mbuf mempool cache. */ /* current configuration is in DCB or not,0 means it is not in DCB mode */ uint8_t dcb_config = 0; @@ -204,9 +204,9 @@ uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT; /**< Number of TX descriptors. */ */ #define RX_PTHRESH 8 /**< Default value of RX prefetch threshold register. */ #define RX_HTHRESH 8 /**< Default value of RX host threshold register. */ -#define RX_WTHRESH 4 /**< Default value of RX write-back threshold register. */ +#define RX_WTHRESH 0 /**< Default value of RX write-back threshold register. */ -#define TX_PTHRESH 36 /**< Default value of TX prefetch threshold register. */ +#define TX_PTHRESH 32 /**< Default value of TX prefetch threshold register. */ #define TX_HTHRESH 0 /**< Default value of TX host threshold register. */ #define TX_WTHRESH 0 /**< Default value of TX write-back threshold register. */ diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 7e3beb6..6a9eab8 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -65,6 +65,8 @@ int main(int argc, char **argv); #define MAX_PKT_BURST 512 #define DEF_PKT_BURST 32 +#define DEF_MBUF_CACHE 250 + #define CACHE_LINE_SIZE_ROUNDUP(size) \ (CACHE_LINE_SIZE * ((size + CACHE_LINE_SIZE - 1) / CACHE_LINE_SIZE)) -- 1.8.1.4