eal: add dpdk cl-arg no-shconf

This allows us to avoid creating a shared configuration file in the dpdk
rte directory.

Change-Id: Id57d9111669ee8fd51e82c0b05e8c2c07b6dcd7e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/421652
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Seth Howell 2018-08-08 10:14:22 -07:00 committed by Jim Harris
parent 6fd1d004a8
commit 194b8eca98

View File

@ -109,11 +109,6 @@ spdk_env_unlink_shared_files(void)
{ {
char buffer[PATH_MAX]; char buffer[PATH_MAX];
snprintf(buffer, PATH_MAX, "/var/run/.spdk_pid%d_config", getpid());
if (unlink(buffer)) {
fprintf(stderr, "Unable to unlink shared memory file: %s. Error code: %d\n", buffer, errno);
}
#if RTE_VERSION < RTE_VERSION_NUM(18, 05, 0, 0) #if RTE_VERSION < RTE_VERSION_NUM(18, 05, 0, 0)
snprintf(buffer, PATH_MAX, "/var/run/.spdk_pid%d_hugepage_info", getpid()); snprintf(buffer, PATH_MAX, "/var/run/.spdk_pid%d_hugepage_info", getpid());
if (unlink(buffer)) { if (unlink(buffer)) {
@ -219,6 +214,14 @@ spdk_build_eal_cmdline(const struct spdk_env_opts *opts)
return -1; return -1;
} }
/* disable shared configuration files when in single process mode. This allows for cleaner shutdown */
if (opts->shm_id < 0) {
args = spdk_push_arg(args, &argcount, _sprintf_alloc("%s", "--no-shconf"));
if (args == NULL) {
return -1;
}
}
/* set the coremask */ /* set the coremask */
/* NOTE: If coremask starts with '[' and ends with ']' it is a core list /* NOTE: If coremask starts with '[' and ends with ']' it is a core list
*/ */