DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: herakliusz.lipiec@intel.com
Subject: [dpdk-dev] [PATCH 19.08 3/6] ipc: don't unregister action if ipc unsupported
Date: Thu, 25 Apr 2019 13:45:16 +0100	[thread overview]
Message-ID: <cbe93c1bbe938cb1b84c5cad83fdc39f3003f477.1556195690.git.anatoly.burakov@intel.com> (raw)
Message-ID: <20190425124516.yTa3MBbr5NrKAmMeuAtMSsfWL_v5nntDSZcBJdQkDb8@z> (raw)
In-Reply-To: <b0b218f0265ee9814de64f284d0d2d896ab01fa1.1556195690.git.anatoly.burakov@intel.com>
In-Reply-To: <b0b218f0265ee9814de64f284d0d2d896ab01fa1.1556195690.git.anatoly.burakov@intel.com>

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

  parent 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 [dpdk-dev] [PATCH 19.08 1/6] ipc: handle unsupported ipc in init Anatoly Burakov
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 ` Anatoly Burakov [this message]
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 ` [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=cbe93c1bbe938cb1b84c5cad83fdc39f3003f477.1556195690.git.anatoly.burakov@intel.com \
    --to=anatoly.burakov@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).