[PATCH V3 net-next 5/5] smc: increase / decrease static key

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ursula Braun <ursula.braun@xxxxxxxxxx>

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.braun@xxxxxxxxxx>
---
 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 linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux