]> git.droids-corp.org - dpdk.git/commitdiff
ipc: do not unregister action if IPC unsupported
authorAnatoly Burakov <anatoly.burakov@intel.com>
Thu, 25 Apr 2019 12:45:16 +0000 (13:45 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 5 Jun 2019 09:27:43 +0000 (11:27 +0200)
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

index 7f86c12e98852d781ec4340c8626a8147f8083cf..d14d55657b298f90cdfa6c9072a65938b15c6ce3 100644 (file)
@@ -239,6 +239,11 @@ rte_mp_action_unregister(const char *name)
        if (validate_action_name(name) != 0)
                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) {