From patchwork Thu Feb 22 15:43:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatoly Burakov X-Patchwork-Id: 35352 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B95E91B1A8; Thu, 22 Feb 2018 16:44:08 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 4B4117CFA for ; Thu, 22 Feb 2018 16:44:05 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2018 07:44:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,377,1515484800"; d="scan'208";a="19635760" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga008.fm.intel.com with ESMTP; 22 Feb 2018 07:44:02 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id w1MFi1xx030777; Thu, 22 Feb 2018 15:44:01 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id w1MFi1Vl031638; Thu, 22 Feb 2018 15:44:01 GMT Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id w1MFi10K031634; Thu, 22 Feb 2018 15:44:01 GMT From: Anatoly Burakov To: dev@dpdk.org Cc: jianfeng.tan@intel.com Date: Thu, 22 Feb 2018 15:43:59 +0000 Message-Id: <4fa0dbf4a02dfbbfa6ebb1101aec2d84b2e798ef.1519311106.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <53373b6d98cc54581eff8fecd277ebca077e589e.1519311106.git.anatoly.burakov@intel.com> References: <53373b6d98cc54581eff8fecd277ebca077e589e.1519311106.git.anatoly.burakov@intel.com> In-Reply-To: <53373b6d98cc54581eff8fecd277ebca077e589e.1519311106.git.anatoly.burakov@intel.com> References: <53373b6d98cc54581eff8fecd277ebca077e589e.1519311106.git.anatoly.burakov@intel.com> Subject: [dpdk-dev] [PATCH 2/4] eal: fix IPC socket paths X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes: bacaa2754017 ("eal: add channel for multi-process communication") Cc: jianfeng.tan@intel.com Signed-off-by: Anatoly Burakov Acked-by: Jianfeng Tan --- 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; }