From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 447E34F9B for ; Tue, 2 Apr 2019 06:33:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Apr 2019 21:33:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,298,1549958400"; d="scan'208";a="334145267" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by fmsmga005.fm.intel.com with ESMTP; 01 Apr 2019 21:32:59 -0700 From: Vipin Varghese To: dev@dpdk.org, marko.kovacevic@intel.com, reshma.pattan@intel.com Cc: keith.wiles@intel.com, john.mcnamara@intel.com, stephen1.byrne@intel.com, amit.tamboli@intel.com, sanjay.padubidri@intel.com, amol.patel@intel.com, Vipin Varghese Date: Tue, 2 Apr 2019 10:03:17 +0530 Message-Id: <20190402043318.20382-2-vipin.varghese@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190402043318.20382-1-vipin.varghese@intel.com> References: <20190328150406.12051-1-vipin.varghese@intel.com> <20190402043318.20382-1-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH v4 1/2] app/pdump: remove core restriction X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Apr 2019 04:33:02 -0000 PDUMP application is being limited to run on default first core. The patch removes the restriction, allowing the user to run on any of selected cores in EAL args. If no args are passed, the logic runs on default master core. Signed-off-by: Vipin Varghese --- app/pdump/main.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/pdump/main.c b/app/pdump/main.c index ccf2a1d2f..c1db2eb8d 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -860,23 +860,21 @@ main(int argc, char **argv) int ret; int i; - char c_flag[] = "-c1"; char n_flag[] = "-n4"; char mp_flag[] = "--proc-type=secondary"; - char *argp[argc + 3]; + char *argp[argc + 2]; /* catch ctrl-c so we can print on exit */ signal(SIGINT, signal_handler); argp[0] = argv[0]; - argp[1] = c_flag; - argp[2] = n_flag; - argp[3] = mp_flag; + argp[1] = n_flag; + argp[2] = mp_flag; for (i = 1; i < argc; i++) - argp[i + 3] = argv[i]; + argp[i + 2] = argv[i]; - argc += 3; + argc += 2; diag = rte_eal_init(argc, argp); if (diag < 0) @@ -886,7 +884,7 @@ main(int argc, char **argv) rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n"); argc -= diag; - argv += (diag - 3); + argv += (diag - 2); /* parse app arguments */ if (argc > 1) { -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id CB73FA0679 for ; Tue, 2 Apr 2019 06:33:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 621DE5699; Tue, 2 Apr 2019 06:33:04 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 447E34F9B for ; Tue, 2 Apr 2019 06:33:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Apr 2019 21:33:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,298,1549958400"; d="scan'208";a="334145267" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by fmsmga005.fm.intel.com with ESMTP; 01 Apr 2019 21:32:59 -0700 From: Vipin Varghese To: dev@dpdk.org, marko.kovacevic@intel.com, reshma.pattan@intel.com Cc: keith.wiles@intel.com, john.mcnamara@intel.com, stephen1.byrne@intel.com, amit.tamboli@intel.com, sanjay.padubidri@intel.com, amol.patel@intel.com, Vipin Varghese Date: Tue, 2 Apr 2019 10:03:17 +0530 Message-Id: <20190402043318.20382-2-vipin.varghese@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190402043318.20382-1-vipin.varghese@intel.com> References: <20190328150406.12051-1-vipin.varghese@intel.com> <20190402043318.20382-1-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH v4 1/2] app/pdump: remove core restriction X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190402043317.DPjAR0AU90dZJCZVDEx4lq9jmerUs_tYGdGxUxsStaQ@z> PDUMP application is being limited to run on default first core. The patch removes the restriction, allowing the user to run on any of selected cores in EAL args. If no args are passed, the logic runs on default master core. Signed-off-by: Vipin Varghese --- app/pdump/main.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/pdump/main.c b/app/pdump/main.c index ccf2a1d2f..c1db2eb8d 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -860,23 +860,21 @@ main(int argc, char **argv) int ret; int i; - char c_flag[] = "-c1"; char n_flag[] = "-n4"; char mp_flag[] = "--proc-type=secondary"; - char *argp[argc + 3]; + char *argp[argc + 2]; /* catch ctrl-c so we can print on exit */ signal(SIGINT, signal_handler); argp[0] = argv[0]; - argp[1] = c_flag; - argp[2] = n_flag; - argp[3] = mp_flag; + argp[1] = n_flag; + argp[2] = mp_flag; for (i = 1; i < argc; i++) - argp[i + 3] = argv[i]; + argp[i + 2] = argv[i]; - argc += 3; + argc += 2; diag = rte_eal_init(argc, argp); if (diag < 0) @@ -886,7 +884,7 @@ main(int argc, char **argv) rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n"); argc -= diag; - argv += (diag - 3); + argv += (diag - 2); /* parse app arguments */ if (argc > 1) { -- 2.17.1