nvme: Create Proc Type for primary and secondary processes

Change-Id: I283ce03ed50fd12b9da906b0e09b4559b41776ef
Signed-off-by: GangCao <gang.cao@intel.com>
This commit is contained in:
GangCao 2016-08-11 16:26:59 -04:00 committed by Ben Walker
parent 7dfc5e922d
commit 9dfc65b081
8 changed files with 21 additions and 0 deletions

View File

@ -1120,6 +1120,7 @@ static char *ealargs[] = {
"arb",
"-c 0xf", /* This must be the second parameter. It is overwritten by index in main(). */
"-n 4",
"--proc-type=auto",
};
int

View File

@ -183,6 +183,7 @@ attach_cb(void *cb_ctx, struct spdk_pci_device *dev, struct spdk_nvme_ctrlr *ctr
static char *ealargs[] = {
"fio",
"-n 4",
"--proc-type=auto",
};
/* Called once at initialization. This is responsible for gathering the size of

View File

@ -333,6 +333,7 @@ static char *ealargs[] = {
"hello_world",
"-c 0x1",
"-n 4",
"--proc-type=auto",
};
int main(int argc, char **argv)

View File

@ -943,6 +943,7 @@ static const char *ealargs[] = {
"identify",
"-c 0x1",
"-n 4",
"--proc-type=auto",
};
int main(int argc, char **argv)

View File

@ -175,6 +175,7 @@ static const char *ealargs[] = {
"nvme_manage",
"-c 0x1",
"-n 4",
"--proc-type=auto",
};
static void usage(void)

View File

@ -1093,6 +1093,7 @@ static char *ealargs[] = {
"perf",
"-c 0x1", /* This must be the second parameter. It is overwritten by index in main(). */
"-n 4",
"--proc-type=auto",
};
int main(int argc, char **argv)

View File

@ -424,6 +424,7 @@ static const char *ealargs[] = {
"reserve",
"-c 0x1",
"-n 4",
"--proc-type=auto",
};
int main(int argc, char **argv)

View File

@ -58,6 +58,7 @@ enum dpdk_eal_args {
EAL_MEMSIZE_ARG,
EAL_MASTER_CORE_ARG,
EAL_FILE_PREFIX_ARG,
EAL_PROC_TYPE_ARG,
EAL_ARG_COUNT
};
@ -159,6 +160,19 @@ spdk_build_eal_cmdline(struct spdk_app_opts *opts)
rte_exit(EXIT_FAILURE, "ealargs spdk_sprintf_alloc");
}
#ifdef __linux__
/* set the process type */
g_arg_strings[EAL_PROC_TYPE_ARG] = spdk_sprintf_alloc("--proc-type=auto");
#else
/* --proc-type is not required on FreeBSD */
/* TODO: to enable the support on FreeBSD once it supports process shared mutex */
g_arg_strings[EAL_PROC_TYPE_ARG] = strdup("");
#endif
if (g_arg_strings[EAL_PROC_TYPE_ARG] == NULL) {
spdk_free_ealargs();
rte_exit(EXIT_FAILURE, "ealargs spdk_sprintf_alloc");
}
memcpy(g_ealargs, g_arg_strings, sizeof(g_arg_strings));
}