From 836c2ed0c0a08910d818c0011eb4a9705d413120 Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Fri, 2 Mar 2018 08:41:35 +0000 Subject: [PATCH] eal: fix IPC request socket path Fixes: 783b6e54971d ("eal: add synchronous multi-process communication") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov Acked-by: Jianfeng Tan --- lib/librte_eal/common/eal_common_proc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c index ec60d16436..2dddcaf783 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; } -- 2.20.1