[v6,1/2] app/pdump: remove core restriction

Message ID 20190404085515.15789-2-vipin.varghese@intel.com
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series
  • app/pdump: enhance to support unique cores
Related show

Checks

Context Check Description
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Varghese, Vipin April 4, 2019, 8:55 a.m.
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 <vipin.varghese@intel.com>
---
 app/pdump/main.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

Comments

Reshma Pattan April 9, 2019, 9:04 a.m. | #1
> -----Original Message-----
> From: Varghese, Vipin
> Sent: Thursday, April 4, 2019 9:55 AM
> To: dev@dpdk.org; Kovacevic, Marko <marko.kovacevic@intel.com>; Pattan,
> Reshma <reshma.pattan@intel.com>; david.marchand@redhat.com
> Cc: Wiles, Keith <keith.wiles@intel.com>; Mcnamara, John
> <john.mcnamara@intel.com>; Byrne, Stephen1 <stephen1.byrne@intel.com>;
> Tamboli, Amit S <amit.tamboli@intel.com>; Padubidri, Sanjay A
> <sanjay.padubidri@intel.com>; Patel, Amol <amol.patel@intel.com>; Varghese,
> Vipin <vipin.varghese@intel.com>
> Subject: [PATCH v6 1/2] app/pdump: remove core restriction
> 
> 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 <vipin.varghese@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>

Patch

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) {