From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by dpdk.org (Postfix) with ESMTP id 2D9475688 for ; Fri, 14 Jul 2017 12:36:11 +0200 (CEST) Received: by mail-pg0-f68.google.com with SMTP id j186so10230566pge.1 for ; Fri, 14 Jul 2017 03:36:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rpRMl53NQuDbTp4KmIw27d3x09kBQA3N7UpwLyEOZEY=; b=s+9z2tTC/nONOJFkeMxUOeP1XGe1J1sA8sCAoXv7ByWZ7ZXXVNvQQdaEgyHYhL5zUm EK9ekI0XJR3jvLE+DK3kvLd13JeLc8ozks6O0xiywKLKEvona6aGfmct1X6WD+m93sP+ /h9Nbi/xQ266qF5jnSVhUj3qjmxT2dI5scOk5/S3F8egi6tX2uNYdYdDkorSrXYebjLA pwyXUzNTSdIr1gp/7LxVr5tUdImsj6aP3Em+2cu0LWN0sLZysRF2GqBLuqITyF+k9B6y RsZc6C7FX/kdxHuL7eGXBa+eTXNrjkssxZl67RSCNSr8bCVqE16ptaNLsyqLe/b2S9tm NbuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rpRMl53NQuDbTp4KmIw27d3x09kBQA3N7UpwLyEOZEY=; b=DnLLx/oHDqMu+6EmKRn8gbA6UB11UycElBMUDvvSgs+ZQr/hm2FvsDx3H+xnbm33FT ECAhPle7MfQ4UXVZzwQR1o9LnKKh3gzRyHPZM1FUB3si8NEXHYW1eI2gOkcubnbcSk+Y u1xFIPsvNoDIdMejJHaA6oWcpYRhvUy6gm3ea2fg+eJCjnjpnNJBOpS2+LrOl7myylol UHXVgquXNyyeE1cntT/laZS/4IORjI4COdB1FVKMGSALbkCE7lxdtaJ37cFf5+Uv9/mq IP46AXNForbgvmm420rcgX9YOQ6SBCixXPn0aXxZt228O1DTVqxVtFdv9vH6zVS+ICNQ 1m/Q== X-Gm-Message-State: AIVw113JC5cvWsoLC27pz4/yojafCNmdcpe4G7H/rCz7hw9SdnwZZgbG EVWiESzDgaYIac8C X-Received: by 10.101.76.3 with SMTP id u3mr14007702pgq.119.1500028570478; Fri, 14 Jul 2017 03:36:10 -0700 (PDT) Received: from localhost.localdomain ([180.158.48.171]) by smtp.gmail.com with ESMTPSA id y205sm15273553pfb.124.2017.07.14.03.36.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Jul 2017 03:36:09 -0700 (PDT) From: Yuanhan Liu To: Jianfeng Tan Cc: dpdk stable Date: Fri, 14 Jul 2017 18:33:51 +0800 Message-Id: <1500028450-25989-27-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500028450-25989-1-git-send-email-yliu@fridaylinux.org> References: <1500028450-25989-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'eal: fix config file path when checking process' has been queued to LTS release 16.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jul 2017 10:36:11 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/19/17. So please shout if anyone has objections. Thanks. --yliu --- >>From d69a292319ce50ea217efa15beb5390e1b15c991 Mon Sep 17 00:00:00 2001 From: Jianfeng Tan Date: Mon, 26 Jun 2017 06:49:46 +0000 Subject: [PATCH] eal: fix config file path when checking process [ upstream commit 641566b38be46069c796c6e1ce2a89f3df2c2591 ] When primary process is booted with --file-prefix option, the API, rte_eal_primary_proc_alive(), uses a wrong config file path to check if primary process is alive. Fix it by calling helper function to get config file path. Fixes: dd3e00138d74 ("eal: check if primary process is alive") Signed-off-by: Jianfeng Tan --- lib/librte_eal/common/eal_common_proc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c index 12e0fca..60526ca 100644 --- a/lib/librte_eal/common/eal_common_proc.c +++ b/lib/librte_eal/common/eal_common_proc.c @@ -46,10 +46,10 @@ rte_eal_primary_proc_alive(const char *config_file_path) if (config_file_path) config_fd = open(config_file_path, O_RDONLY); else { - char default_path[PATH_MAX+1]; - snprintf(default_path, PATH_MAX, RUNTIME_CONFIG_FMT, - default_config_dir, "rte"); - config_fd = open(default_path, O_RDONLY); + const char *path; + + path = eal_runtime_config_path(); + config_fd = open(path, O_RDONLY); } if (config_fd < 0) return 0; -- 2.7.4