[dpdk-dev,v2,3/5] eal: fix IPC request socket paths

Message ID 8adaeba3473fb8271f2e7123bd734c3cd5adbe08.1519940460.git.anatoly.burakov@intel.com (mailing list archive)
State Accepted, archived
Headers

Checks

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

Commit Message

Anatoly Burakov March 2, 2018, 8:41 a.m. UTC
  Fixes: 783b6e54971d ("eal: add synchronous multi-process communication")
Cc: jianfeng.tan@intel.com

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
---

Notes:
    v2: no changes

 lib/librte_eal/common/eal_common_proc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
  

Patch

diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
index ec60d16..2dddcaf 100644
--- a/lib/librte_eal/common/eal_common_proc.c
+++ b/lib/librte_eal/common/eal_common_proc.c
@@ -658,10 +658,15 @@  rte_mp_request(struct rte_mp_msg *req, struct rte_mp_reply *reply,
 	}
 
 	while ((ent = readdir(mp_dir))) {
+		char path[PATH_MAX];
+
 		if (fnmatch(mp_filter, ent->d_name, 0) != 0)
 			continue;
 
-		if (mp_request_one(ent->d_name, req, reply, &end))
+		snprintf(path, sizeof(path), "%s/%s", mp_dir_path,
+			 ent->d_name);
+
+		if (mp_request_one(path, req, reply, &end))
 			ret = -1;
 	}