From: Ursula Braun <ursula.br...@de.ibm.com>

To activate the smc-specific hooks in the TCP-code, static key "tcp_have_smc"
is increased and decreased. For now this is done at module load / unload time.

Signed-off-by: Ursula Braun <ursula.br...@de.ibm.com>
---
 net/smc/af_smc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index ed62370..8256e17 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -3142,6 +3142,7 @@ static int __init af_smc_init(void)
        if (rc)
                goto out_sock;
 
+       static_key_slow_inc(&tcp_have_smc);
        return 0;
 
 out_sock:
@@ -3154,6 +3155,7 @@ out:
 
 static void __exit af_smc_exit(void)
 {
+       static_key_slow_dec(&tcp_have_smc);
        ib_unregister_client(&smc_ib_client);
        sock_unregister(PF_SMC);
        proto_unregister(&smc_proto);
-- 
2.3.8

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to