From patchwork Fri Oct 16 11:58:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Panu Matilainen X-Patchwork-Id: 7706 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id AA8ED8E94; Fri, 16 Oct 2015 13:58:34 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 58E558E5B for ; Fri, 16 Oct 2015 13:58:31 +0200 (CEST) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id AA85A8CF6A; Fri, 16 Oct 2015 11:58:30 +0000 (UTC) Received: from dhcp195.koti.laiskiainen.org.com (vpn1-6-41.ams2.redhat.com [10.36.6.41]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9GBwMXO015206; Fri, 16 Oct 2015 07:58:29 -0400 From: Panu Matilainen To: dev@dpdk.org Date: Fri, 16 Oct 2015 14:58:16 +0300 Message-Id: <42ab5ad11b473b964faaa2b0c622b92085d2545a.1444996480.git.pmatilai@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Subject: [dpdk-dev] [PATCH 4/5] eal: add an error code to plugin init for the next step X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Panu Matilainen --- lib/librte_eal/bsdapp/eal/eal.c | 3 ++- lib/librte_eal/common/eal_common_options.c | 3 ++- lib/librte_eal/common/eal_options.h | 2 +- lib/librte_eal/linuxapp/eal/eal.c | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 73dab89..f07a3c3 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -543,7 +543,8 @@ rte_eal_init(int argc, char **argv) rte_eal_mcfg_complete(); - eal_plugins_init(); + if (eal_plugins_init() < 0) + rte_panic("Cannot init plugins\n"); eal_thread_init_master(rte_config.master_lcore); diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index f8fc68a..b542868 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -167,7 +167,7 @@ eal_plugin_add(const char *path) return 0; } -void +int eal_plugins_init(void) { struct shared_driver *solib = NULL; @@ -178,6 +178,7 @@ eal_plugins_init(void) if (solib->lib_handle == NULL) RTE_LOG(WARNING, EAL, "%s\n", dlerror()); } + return 0; } /* diff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h index 1f96825..e305fe8 100644 --- a/lib/librte_eal/common/eal_options.h +++ b/lib/librte_eal/common/eal_options.h @@ -93,6 +93,6 @@ int eal_adjust_config(struct internal_config *internal_cfg); int eal_check_common_options(struct internal_config *internal_cfg); void eal_common_usage(void); enum rte_proc_type_t eal_proc_type_detect(void); -void eal_plugins_init(void); +int eal_plugins_init(void); #endif /* EAL_OPTIONS_H */ diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 455243e..26285e3 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -796,7 +796,8 @@ rte_eal_init(int argc, char **argv) rte_eal_mcfg_complete(); - eal_plugins_init(); + if (eal_plugins_init() < 0) + rte_panic("Cannot init plugins\n"); eal_thread_init_master(rte_config.master_lcore);