summaryrefslogtreecommitdiff
path: root/net/smc/af_smc.c
diff options
context:
space:
mode:
authorUrsula Braun <ubraun@linux.vnet.ibm.com>2017-01-09 16:55:14 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-09 16:07:38 -0500
commita4cf0443c4143b19e42389a1674b5b65224544ce (patch)
treeddb307b528feb0c8bc38e64a7caa9ee51f9d8da5 /net/smc/af_smc.c
parentac7138746e14137a451f8539614cdd349153e0c0 (diff)
smc: introduce SMC as an IB-client
* create a list of SMC IB-devices Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/af_smc.c')
-rw-r--r--net/smc/af_smc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index 7fd773fc6238..50492ee495ce 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -20,6 +20,7 @@
#include <net/sock.h>
#include "smc.h"
+#include "smc_ib.h"
static void smc_set_keepalive(struct sock *sk, int val)
{
@@ -597,8 +598,16 @@ static int __init smc_init(void)
goto out_proto;
}
+ rc = smc_ib_register_client();
+ if (rc) {
+ pr_err("%s: ib_register fails with %d\n", __func__, rc);
+ goto out_sock;
+ }
+
return 0;
+out_sock:
+ sock_unregister(PF_SMC);
out_proto:
proto_unregister(&smc_proto);
out:
@@ -607,6 +616,7 @@ out:
static void __exit smc_exit(void)
{
+ smc_ib_unregister_client();
sock_unregister(PF_SMC);
proto_unregister(&smc_proto);
}