[v2,1/9] fbarray: fix detach in noshconf mode
diff mbox series

Message ID 3ab2d0a7cf61d800e1b4bc8571d79e5a113e0dd7.1536072550.git.anatoly.burakov@intel.com
State Superseded, archived
Headers show
  • Improve running DPDK without hugetlbfs mounpoint
Related show


Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Burakov, Anatoly Sept. 4, 2018, 3:01 p.m. UTC
In noshconf mode, no shared files are created, but we're still trying
to unlink them, resulting in detach/destroy failure even though it
should have succeeded. Fix it by exiting early in noshconf mode.

Fixes: 3ee2cde248a7 ("fbarray: support --no-shconf mode")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
 lib/librte_eal/common/eal_common_fbarray.c | 4 ++++
 1 file changed, 4 insertions(+)

diff mbox series

diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c
index 43caf3ced..ba6c4ae39 100644
--- a/lib/librte_eal/common/eal_common_fbarray.c
+++ b/lib/librte_eal/common/eal_common_fbarray.c
@@ -878,6 +878,10 @@  rte_fbarray_destroy(struct rte_fbarray *arr)
 	if (ret)
 		return ret;
+	/* with no shconf, there were never any files to begin with */
+	if (internal_config.no_shconf)
+		return 0;
 	/* try deleting the file */
 	eal_get_fbarray_path(path, sizeof(path), arr->name);