From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id D289E1B593 for ; Thu, 25 Apr 2019 14:45:24 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Apr 2019 05:45:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,393,1549958400"; d="scan'208";a="153666972" Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.223.125]) by orsmga002.jf.intel.com with ESMTP; 25 Apr 2019 05:45:23 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: herakliusz.lipiec@intel.com Date: Thu, 25 Apr 2019 13:45:16 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 19.08 3/6] ipc: don't unregister action if ipc unsupported 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: , X-List-Received-Date: Thu, 25 Apr 2019 12:45:25 -0000 Currently, unregister will be attempted even if IPC wasn't supported in the first place. It is harmless, but for consistency reasons, update the unregister API call to exit early when IPC is not supported. Signed-off-by: Anatoly Burakov --- lib/librte_eal/common/eal_common_proc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c index a40aa2c1b..4c062a306 100644 --- a/lib/librte_eal/common/eal_common_proc.c +++ b/lib/librte_eal/common/eal_common_proc.c @@ -239,6 +239,11 @@ rte_mp_action_unregister(const char *name) if (validate_action_name(name)) return; + if (internal_config.no_shconf) { + RTE_LOG(DEBUG, EAL, "No shared files mode enabled, IPC is disabled\n"); + return; + } + pthread_mutex_lock(&mp_mutex_action); entry = find_action_entry_by_name(name); if (entry == NULL) { -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 20FE6A05D3 for ; Thu, 25 Apr 2019 14:45:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6BB0E1B59E; Thu, 25 Apr 2019 14:45:29 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id D289E1B593 for ; Thu, 25 Apr 2019 14:45:24 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Apr 2019 05:45:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,393,1549958400"; d="scan'208";a="153666972" Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.223.125]) by orsmga002.jf.intel.com with ESMTP; 25 Apr 2019 05:45:23 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: herakliusz.lipiec@intel.com Date: Thu, 25 Apr 2019 13:45:16 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 19.08 3/6] ipc: don't unregister action if ipc unsupported 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" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190425124516.yTa3MBbr5NrKAmMeuAtMSsfWL_v5nntDSZcBJdQkDb8@z> Currently, unregister will be attempted even if IPC wasn't supported in the first place. It is harmless, but for consistency reasons, update the unregister API call to exit early when IPC is not supported. Signed-off-by: Anatoly Burakov --- lib/librte_eal/common/eal_common_proc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c index a40aa2c1b..4c062a306 100644 --- a/lib/librte_eal/common/eal_common_proc.c +++ b/lib/librte_eal/common/eal_common_proc.c @@ -239,6 +239,11 @@ rte_mp_action_unregister(const char *name) if (validate_action_name(name)) return; + if (internal_config.no_shconf) { + RTE_LOG(DEBUG, EAL, "No shared files mode enabled, IPC is disabled\n"); + return; + } + pthread_mutex_lock(&mp_mutex_action); entry = find_action_entry_by_name(name); if (entry == NULL) { -- 2.17.1