[dpdk-dev] [PATCH 2/4] eal: fix IPC socket paths

Anatoly Burakov anatoly.burakov at intel.com
Thu Feb 22 16:43:59 CET 2018


Fixes: bacaa2754017 ("eal: add channel for multi-process communication")
Cc: jianfeng.tan at intel.com
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 lib/librte_eal/common/eal_common_proc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
index e4d8104..ec60d16 100644
--- a/lib/librte_eal/common/eal_common_proc.c
+++ b/lib/librte_eal/common/eal_common_proc.c
@@ -489,10 +489,14 @@ mp_send(struct rte_mp_msg *msg, const char *peer, int type)
 		return -1;
 	}
 	while ((ent = readdir(mp_dir))) {
+		char path[PATH_MAX];
+
 		if (fnmatch(mp_filter, ent->d_name, 0) != 0)
 			continue;
 
-		if (send_msg(ent->d_name, msg, type) < 0)
+		snprintf(path, sizeof(path), "%s/%s", mp_dir_path,
+			 ent->d_name);
+		if (send_msg(path, msg, type) < 0)
 			ret = -1;
 	}
 
-- 
2.7.4


More information about the dev mailing list