diff options
author | Guvenc Gulce <guvenc@linux.ibm.com> | 2020-12-01 20:20:43 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-12-02 02:56:12 +0100 |
commit | e8372d9d21451a2f2947c2b63b5184f3d4d0bff9 (patch) | |
tree | 843ce28ae0c4dfb954930955542a606401ee6ea5 /net/smc/af_smc.c | |
parent | net/smc: Refactor smc ism v2 capability handling (diff) | |
download | linux-e8372d9d21451a2f2947c2b63b5184f3d4d0bff9.tar.xz linux-e8372d9d21451a2f2947c2b63b5184f3d4d0bff9.zip |
net/smc: Introduce generic netlink interface for diagnostic purposes
Introduce generic netlink interface infrastructure to expose
the diagnostic information regarding smc linkgroups, links and devices.
Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/smc/af_smc.c')
-rw-r--r-- | net/smc/af_smc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index f79b59a972f0..47340b3b514f 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -45,6 +45,7 @@ #include "smc_ib.h" #include "smc_ism.h" #include "smc_pnet.h" +#include "smc_netlink.h" #include "smc_tx.h" #include "smc_rx.h" #include "smc_close.h" @@ -2495,10 +2496,14 @@ static int __init smc_init(void) smc_ism_init(); smc_clc_init(); - rc = smc_pnet_init(); + rc = smc_nl_init(); if (rc) goto out_pernet_subsys; + rc = smc_pnet_init(); + if (rc) + goto out_nl; + rc = -ENOMEM; smc_hs_wq = alloc_workqueue("smc_hs_wq", 0, 0); if (!smc_hs_wq) @@ -2569,6 +2574,8 @@ out_alloc_hs_wq: destroy_workqueue(smc_hs_wq); out_pnet: smc_pnet_exit(); +out_nl: + smc_nl_exit(); out_pernet_subsys: unregister_pernet_subsys(&smc_net_ops); @@ -2586,6 +2593,7 @@ static void __exit smc_exit(void) proto_unregister(&smc_proto6); proto_unregister(&smc_proto); smc_pnet_exit(); + smc_nl_exit(); unregister_pernet_subsys(&smc_net_ops); rcu_barrier(); } |