From: Anatoly Burakov Date: Thu, 25 Apr 2019 12:45:19 +0000 (+0100) Subject: ipc: handle unsupported IPC in async request X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=67dd4d77e04aae6c1ec5b1d0e8e111b102e824ea;p=dpdk.git ipc: handle unsupported IPC in async request Currently, IPC API will silently ignore unsupported IPC. Fix the API call to explicitly handle unsupported IPC cases. Signed-off-by: Anatoly Burakov --- diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c index 7195d573c2..cfd571e4f8 100644 --- a/lib/librte_eal/common/eal_common_proc.c +++ b/lib/librte_eal/common/eal_common_proc.c @@ -1066,7 +1066,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 9cd66fe9fc..cf701e177d 100644 --- a/lib/librte_eal/common/include/rte_eal.h +++ b/lib/librte_eal/common/include/rte_eal.h @@ -361,6 +361,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. *