RDMA/netlink: Add nldev initialization flows
Add nldev init and exit flows to the RDMA/core.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 5272c38..66b109b 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -1212,6 +1212,7 @@ static int __init ib_core_init(void)
goto err_sa;
}
+ nldev_init();
rdma_nl_register(RDMA_NL_LS, ibnl_ls_cb_table);
ib_cache_setup();
@@ -1237,6 +1238,7 @@ static int __init ib_core_init(void)
static void __exit ib_core_cleanup(void)
{
ib_cache_cleanup();
+ nldev_exit();
rdma_nl_unregister(RDMA_NL_LS);
unregister_lsm_notifier(&ibdev_lsm_nb);
ib_sa_cleanup();