From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pdelarax@ecsmtp.ir.intel.com>
Received: from mga03.intel.com (mga03.intel.com [134.134.136.65])
 by dpdk.org (Postfix) with ESMTP id A88D11F7
 for <dev@dpdk.org>; Fri,  6 Feb 2015 15:15:25 +0100 (CET)
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by orsmga103.jf.intel.com with ESMTP; 06 Feb 2015 06:10:37 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.09,529,1418112000"; d="scan'208";a="681986317"
Received: from irvmail001.ir.intel.com ([163.33.26.43])
 by orsmga002.jf.intel.com with ESMTP; 06 Feb 2015 06:15:23 -0800
Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com
 [10.237.217.46])
 by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id
 t16EFLRr021694 for <dev@dpdk.org>; Fri, 6 Feb 2015 14:15:21 GMT
Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1])
 by sivswdev02.ir.intel.com with ESMTP id t16EFLEo023334
 for <dev@dpdk.org>; Fri, 6 Feb 2015 14:15:21 GMT
Received: (from pdelarax@localhost)
 by sivswdev02.ir.intel.com with  id t16EFLok023330
 for dev@dpdk.org; Fri, 6 Feb 2015 14:15:21 GMT
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
To: dev@dpdk.org
Date: Fri,  6 Feb 2015 14:15:21 +0000
Message-Id: <1423232121-23298-1-git-send-email-pablo.de.lara.guarch@intel.com>
X-Mailer: git-send-email 1.7.4.1
Subject: [dpdk-dev] [PATCH] testpmd: remove duplicated parameter parsing
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Feb 2015 14:15:26 -0000

Several parameters were being parsed twice in testpmd,
so this patch gets rid of the second parsing.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-pmd/parameters.c |   56 ---------------------------------------------
 1 files changed, 0 insertions(+), 56 deletions(-)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index adf3203..c7105ca 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -819,20 +819,6 @@ launch_args_parse(int argc, char** argv)
 						  " >= 1 && <= %d\n", n,
 						  (int) MAX_QUEUE_ID);
 			}
-			if (!strcmp(lgopts[opt_idx].name, "rxd")) {
-				n = atoi(optarg);
-				if (n > 0)
-					nb_rxd = (uint16_t) n;
-				else
-					rte_exit(EXIT_FAILURE, "rxd must be > 0\n");
-			}
-			if (!strcmp(lgopts[opt_idx].name, "txd")) {
-				n = atoi(optarg);
-				if (n > 0)
-					nb_txd = (uint16_t) n;
-				else
-					rte_exit(EXIT_FAILURE, "txd must be in > 0\n");
-			}
 			if (!strcmp(lgopts[opt_idx].name, "burst")) {
 				n = atoi(optarg);
 				if ((n >= 1) && (n <= MAX_PKT_BURST))
@@ -852,27 +838,6 @@ launch_args_parse(int argc, char** argv)
 						 "mbcache must be >= 0 and <= %d\n",
 						 RTE_MEMPOOL_CACHE_MAX_SIZE);
 			}
-			if (!strcmp(lgopts[opt_idx].name, "txpt")) {
-				n = atoi(optarg);
-				if (n >= 0)
-					tx_thresh.pthresh = (uint8_t)n;
-				else
-					rte_exit(EXIT_FAILURE, "txpt must be >= 0\n");
-			}
-			if (!strcmp(lgopts[opt_idx].name, "txht")) {
-				n = atoi(optarg);
-				if (n >= 0)
-					tx_thresh.hthresh = (uint8_t)n;
-				else
-					rte_exit(EXIT_FAILURE, "txht must be >= 0\n");
-			}
-			if (!strcmp(lgopts[opt_idx].name, "txwt")) {
-				n = atoi(optarg);
-				if (n >= 0)
-					tx_thresh.wthresh = (uint8_t)n;
-				else
-					rte_exit(EXIT_FAILURE, "txwt must be >= 0\n");
-			}
 			if (!strcmp(lgopts[opt_idx].name, "txfreet")) {
 				n = atoi(optarg);
 				if (n >= 0)
@@ -896,27 +861,6 @@ launch_args_parse(int argc, char** argv)
 					rte_exit(EXIT_FAILURE,
 						 "txqflags must be >= 0\n");
 			}
-			if (!strcmp(lgopts[opt_idx].name, "rxpt")) {
-				n = atoi(optarg);
-				if (n >= 0)
-					rx_thresh.pthresh = (uint8_t)n;
-				else
-					rte_exit(EXIT_FAILURE, "rxpt must be >= 0\n");
-			}
-			if (!strcmp(lgopts[opt_idx].name, "rxht")) {
-				n = atoi(optarg);
-				if (n >= 0)
-					rx_thresh.hthresh = (uint8_t)n;
-				else
-					rte_exit(EXIT_FAILURE, "rxht must be >= 0\n");
-			}
-			if (!strcmp(lgopts[opt_idx].name, "rxwt")) {
-				n = atoi(optarg);
-				if (n >= 0)
-					rx_thresh.wthresh = (uint8_t)n;
-				else
-					rte_exit(EXIT_FAILURE, "rxwt must be >= 0\n");
-			}
 			if (!strcmp(lgopts[opt_idx].name, "rxd")) {
 				n = atoi(optarg);
 				if (n > 0) {
-- 
1.7.4.1