From a4cf0443c4143b19e42389a1674b5b65224544ce Mon Sep 17 00:00:00 2001 From: Ursula Braun Date: Mon, 9 Jan 2017 16:55:14 +0100 Subject: smc: introduce SMC as an IB-client * create a list of SMC IB-devices Signed-off-by: Ursula Braun Signed-off-by: David S. Miller --- net/smc/af_smc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'net/smc/af_smc.c') 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 #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); } -- cgit v1.2.3-58-ga151