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 20A66A05D3 for ; Thu, 25 Apr 2019 14:45:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 41D451B590; Thu, 25 Apr 2019 14:45:24 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 3BBE01B581 for ; Thu, 25 Apr 2019 14:45:22 +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:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,393,1549958400"; d="scan'208";a="153666955" 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:20 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Bruce Richardson , herakliusz.lipiec@intel.com Date: Thu, 25 Apr 2019 13:45:14 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH 19.08 1/6] ipc: handle unsupported ipc in init 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: <20190425124514.erJSu73kDxpkjbh7IkAmZ44CWaPXMEbJGOMv1ryNNUo@z> Currently, IPC API will silently ignore unsupported IPC. Fix the API call and its callers to explicitly handle unsupported IPC cases. Signed-off-by: Anatoly Burakov --- lib/librte_eal/common/eal_common_proc.c | 3 ++- lib/librte_eal/freebsd/eal/eal.c | 2 +- lib/librte_eal/linux/eal/eal.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c index b46d644b3..a4581e3b4 100644 --- a/lib/librte_eal/common/eal_common_proc.c +++ b/lib/librte_eal/common/eal_common_proc.c @@ -568,7 +568,8 @@ rte_mp_channel_init(void) */ if (internal_config.no_shconf) { RTE_LOG(DEBUG, EAL, "No shared files mode enabled, IPC will be disabled\n"); - return 0; + rte_errno = ENOTSUP; + return -1; } /* create filter path */ diff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/eal/eal.c index c6ac9028f..4eaa53195 100644 --- a/lib/librte_eal/freebsd/eal/eal.c +++ b/lib/librte_eal/freebsd/eal/eal.c @@ -671,7 +671,7 @@ rte_eal_init(int argc, char **argv) /* Put mp channel init before bus scan so that we can init the vdev * bus through mp channel in the secondary process before the bus scan. */ - if (rte_mp_channel_init() < 0) { + if (rte_mp_channel_init() < 0 && rte_errno != ENOTSUP) { rte_eal_init_alert("failed to init mp channel"); if (rte_eal_process_type() == RTE_PROC_PRIMARY) { rte_errno = EFAULT; diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c index 161399619..3e1d6eb6a 100644 --- a/lib/librte_eal/linux/eal/eal.c +++ b/lib/librte_eal/linux/eal/eal.c @@ -1014,7 +1014,7 @@ rte_eal_init(int argc, char **argv) /* Put mp channel init before bus scan so that we can init the vdev * bus through mp channel in the secondary process before the bus scan. */ - if (rte_mp_channel_init() < 0) { + if (rte_mp_channel_init() < 0 && rte_errno != ENOTSUP) { rte_eal_init_alert("failed to init mp channel"); if (rte_eal_process_type() == RTE_PROC_PRIMARY) { rte_errno = EFAULT; -- 2.17.1