From 194b8eca98da500f72b9732b0b656788e76e528f Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Wed, 8 Aug 2018 10:14:22 -0700 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/421652 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Dariusz Stojaczyk Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- lib/env_dpdk/init.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/env_dpdk/init.c b/lib/env_dpdk/init.c index f715c2401..5e7c6e158 100644 --- a/lib/env_dpdk/init.c +++ b/lib/env_dpdk/init.c @@ -109,11 +109,6 @@ spdk_env_unlink_shared_files(void) { 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) snprintf(buffer, PATH_MAX, "/var/run/.spdk_pid%d_hugepage_info", getpid()); if (unlink(buffer)) { @@ -219,6 +214,14 @@ spdk_build_eal_cmdline(const struct spdk_env_opts *opts) 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 */ /* NOTE: If coremask starts with '[' and ends with ']' it is a core list */