From patchwork Sat Jun 29 11:58:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 55654 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9E16649E0; Sat, 29 Jun 2019 13:59:14 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 75A8D325F; Sat, 29 Jun 2019 13:59:09 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A0DC8308213F; Sat, 29 Jun 2019 11:59:08 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-204-190.brq.redhat.com [10.40.204.190]) by smtp.corp.redhat.com (Postfix) with ESMTP id 02160600C4; Sat, 29 Jun 2019 11:59:06 +0000 (UTC) From: David Marchand To: dev@dpdk.org, thomas@monjalon.net Cc: nhorman@tuxdriver.com, adrien.mazarguil@6wind.com, stephen@networkplumber.org, stable@dpdk.org Date: Sat, 29 Jun 2019 13:58:44 +0200 Message-Id: <1561809533-6545-2-git-send-email-david.marchand@redhat.com> In-Reply-To: <1561809533-6545-1-git-send-email-david.marchand@redhat.com> References: <1561635235-22238-1-git-send-email-david.marchand@redhat.com> <1561809533-6545-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Sat, 29 Jun 2019 11:59:08 +0000 (UTC) Subject: [dpdk-dev] [PATCH v2 01/10] eal: hide internal hotplug symbol X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This api was experimental and not properly marked in the map file. But looking more closely, this is just an internal wrapper for EAL init. Hide it in the hotplug code. Fixes: 244d5130719c ("eal: enable hotplug on multi-process") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Adrien Mazarguil Acked-by: Stephen Hemminger Acked-by: Neil Horman --- lib/librte_eal/common/hotplug_mp.c | 2 +- lib/librte_eal/common/hotplug_mp.h | 9 +++++++++ lib/librte_eal/common/include/rte_eal.h | 9 --------- lib/librte_eal/linux/eal/eal.c | 3 ++- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/librte_eal/common/hotplug_mp.c b/lib/librte_eal/common/hotplug_mp.c index 4f316ba..ee79190 100644 --- a/lib/librte_eal/common/hotplug_mp.c +++ b/lib/librte_eal/common/hotplug_mp.c @@ -438,7 +438,7 @@ int eal_dev_hotplug_request_to_secondary(struct eal_dev_mp_req *req) return 0; } -int rte_mp_dev_hotplug_init(void) +int eal_mp_dev_hotplug_init(void) { int ret; diff --git a/lib/librte_eal/common/hotplug_mp.h b/lib/librte_eal/common/hotplug_mp.h index 597fde3..8fcf9b5 100644 --- a/lib/librte_eal/common/hotplug_mp.h +++ b/lib/librte_eal/common/hotplug_mp.h @@ -29,6 +29,15 @@ struct eal_dev_mp_req { }; /** + * Register all mp action callbacks for hotplug. + * + * @return + * 0 on success, negative on error. + */ +int +eal_mp_dev_hotplug_init(void); + +/** * This is a synchronous wrapper for secondary process send * request to primary process, this is invoked when an attach * or detach request is issued from primary process. diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h index cf701e1..27808a3 100644 --- a/lib/librte_eal/common/include/rte_eal.h +++ b/lib/librte_eal/common/include/rte_eal.h @@ -409,15 +409,6 @@ typedef int (*rte_mp_async_reply_t)(const struct rte_mp_msg *request, rte_mp_reply(struct rte_mp_msg *msg, const char *peer); /** - * Register all mp action callbacks for hotplug. - * - * @return - * 0 on success, negative on error. - */ -int __rte_experimental -rte_mp_dev_hotplug_init(void); - -/** * Usage function typedef used by the application usage function. * * Use this function typedef to define and call rte_set_application_usage_hook() diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c index aa0137e..8a0b387 100644 --- a/lib/librte_eal/linux/eal/eal.c +++ b/lib/librte_eal/linux/eal/eal.c @@ -59,6 +59,7 @@ #include "eal_hugepages.h" #include "eal_options.h" #include "eal_vfio.h" +#include "hotplug_mp.h" #define MEMSIZE_IF_NO_HUGE_PAGE (64ULL * 1024ULL * 1024ULL) @@ -1062,7 +1063,7 @@ static void rte_eal_init_alert(const char *msg) } /* register multi-process action callbacks for hotplug */ - if (rte_mp_dev_hotplug_init() < 0) { + if (eal_mp_dev_hotplug_init() < 0) { rte_eal_init_alert("failed to register mp callback for hotplug"); return -1; }