Skip to content

Commit

Permalink
app/pdump: remove core restriction
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vvarghes authored and tmonjalo committed Apr 22, 2019
1 parent cde4171 commit e442df3
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions app/pdump/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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) {
Expand Down

0 comments on commit e442df3

Please sign in to comment.