DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	herakliusz.lipiec@intel.com
Subject: [dpdk-dev] [PATCH 19.08 1/6] ipc: handle unsupported ipc in init
Date: Thu, 25 Apr 2019 13:45:14 +0100	[thread overview]
Message-ID: <b0b218f0265ee9814de64f284d0d2d896ab01fa1.1556195690.git.anatoly.burakov@intel.com> (raw)
Message-ID: <20190425124514.erJSu73kDxpkjbh7IkAmZ44CWaPXMEbJGOMv1ryNNUo@z> (raw)

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 <anatoly.burakov@intel.com>
---
 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

             reply	other threads:[~2019-04-25 12:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 12:45 Anatoly Burakov [this message]
2019-04-25 12:45 ` Anatoly Burakov
2019-04-25 12:45 ` [dpdk-dev] [PATCH 19.08 2/6] ipc: handle unsupported ipc in action register Anatoly Burakov
2019-04-25 12:45   ` Anatoly Burakov
2019-04-25 12:45 ` [dpdk-dev] [PATCH 19.08 3/6] ipc: don't unregister action if ipc unsupported Anatoly Burakov
2019-04-25 12:45   ` Anatoly Burakov
2019-04-25 12:45 ` [dpdk-dev] [PATCH 19.08 4/6] ipc: handle unsupported ipc in sendmsg Anatoly Burakov
2019-04-25 12:45   ` Anatoly Burakov
2019-04-25 12:45 ` [dpdk-dev] [PATCH 19.08 5/6] ipc: handle unsupported ipc in sync request Anatoly Burakov
2019-04-25 12:45   ` Anatoly Burakov
2019-04-25 12:45 ` [dpdk-dev] [PATCH 19.08 6/6] ipc: handle unsupported ipc in async request Anatoly Burakov
2019-04-25 12:45   ` Anatoly Burakov
2019-06-05  9:29 ` [dpdk-dev] [PATCH 19.08 1/6] ipc: handle unsupported ipc in init Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b0b218f0265ee9814de64f284d0d2d896ab01fa1.1556195690.git.anatoly.burakov@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=herakliusz.lipiec@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).