From f319d9937977479528870c6859bd3a227c212f75 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Sat, 29 Jun 2019 13:58:44 +0200 Subject: [PATCH] eal: hide internal hotplug function 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 4f316ba9a9..ee791903b3 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 597fde3d7c..8fcf9b52e2 100644 --- a/lib/librte_eal/common/hotplug_mp.h +++ b/lib/librte_eal/common/hotplug_mp.h @@ -28,6 +28,15 @@ struct eal_dev_mp_req { int result; }; +/** + * 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 diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h index cf701e177d..27808a3364 100644 --- a/lib/librte_eal/common/include/rte_eal.h +++ b/lib/librte_eal/common/include/rte_eal.h @@ -408,15 +408,6 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts, int __rte_experimental 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. * diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c index aa0137ecd9..8a0b387ce0 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 @@ rte_eal_init(int argc, char **argv) } /* 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; } -- 2.20.1