From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 602945F17 for ; Thu, 4 Apr 2019 10:54:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Apr 2019 01:54:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,306,1549958400"; d="scan'208";a="146518225" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by FMSMGA003.fm.intel.com with ESMTP; 04 Apr 2019 01:54:52 -0700 From: Vipin Varghese To: dev@dpdk.org, marko.kovacevic@intel.com, reshma.pattan@intel.com, david.marchand@redhat.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: Thu, 4 Apr 2019 14:25:14 +0530 Message-Id: <20190404085515.15789-2-vipin.varghese@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190404085515.15789-1-vipin.varghese@intel.com> References: <20190402091836.35779-3-vipin.varghese@intel.com> <20190404085515.15789-1-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH v6 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: Thu, 04 Apr 2019 08:54:56 -0000 PDUMP application is being limited to run on default first core. The patch removes the restriction, allowing user to run on any of selected cores in EAL args. If no args are passed, 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 5D371A0679 for ; Thu, 4 Apr 2019 10:54:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EC9E35F20; Thu, 4 Apr 2019 10:54:56 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 602945F17 for ; Thu, 4 Apr 2019 10:54:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Apr 2019 01:54:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,306,1549958400"; d="scan'208";a="146518225" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by FMSMGA003.fm.intel.com with ESMTP; 04 Apr 2019 01:54:52 -0700 From: Vipin Varghese To: dev@dpdk.org, marko.kovacevic@intel.com, reshma.pattan@intel.com, david.marchand@redhat.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: Thu, 4 Apr 2019 14:25:14 +0530 Message-Id: <20190404085515.15789-2-vipin.varghese@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190404085515.15789-1-vipin.varghese@intel.com> References: <20190402091836.35779-3-vipin.varghese@intel.com> <20190404085515.15789-1-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH v6 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: <20190404085514.y7ew7RXLVFkqxouc9UiI_9FhUvKAQbNWaP1pBFqD2xY@z> PDUMP application is being limited to run on default first core. The patch removes the restriction, allowing user to run on any of selected cores in EAL args. If no args are passed, 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