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 9D0D3A05D3 for ; Thu, 25 Apr 2019 14:46:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1AFDD1B5B7; Thu, 25 Apr 2019 14:45:37 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 601111B59C for ; Thu, 25 Apr 2019 14:45:28 +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:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,393,1549958400"; d="scan'208";a="153666990" 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:27 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: herakliusz.lipiec@intel.com Date: Thu, 25 Apr 2019 13:45:19 +0100 Message-Id: <29d36c2e796b75cee5a66f36f7cd48249bb40824.1556195691.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 19.08 6/6] ipc: handle unsupported ipc in async request 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: <20190425124519.XelQMfRr7hREYX2GWSkjDvQAYxw3LNwPiiJM_4DE0v4@z> Currently, IPC API will silently ignore unsupported IPC. Fix the API call to explicitly handle unsupported IPC cases. Signed-off-by: Anatoly Burakov --- lib/librte_eal/common/eal_common_proc.c | 3 ++- lib/librte_eal/common/include/rte_eal.h | 3 +++ 2 files 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 c6aa80bfc..3a876e021 100644 --- a/lib/librte_eal/common/eal_common_proc.c +++ b/lib/librte_eal/common/eal_common_proc.c @@ -1041,7 +1041,8 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts, if (internal_config.no_shconf) { RTE_LOG(DEBUG, EAL, "No shared files mode enabled, IPC is disabled\n"); - return 0; + rte_errno = ENOTSUP; + return -1; } if (gettimeofday(&now, NULL) < 0) { diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h index 4460ea14a..9acf85664 100644 --- a/lib/librte_eal/common/include/rte_eal.h +++ b/lib/librte_eal/common/include/rte_eal.h @@ -344,6 +344,9 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply, * This function sends a request message to the peer process, and will not * block. Instead, reply will be received in a separate callback. * + * @note IPC may be unsupported in certain circumstances, so caller should check + * for ENOTSUP error. + * * @param req * The req argument contains the customized request message. * -- 2.17.1