Thread (18 messages) 18 messages, 2 authors, 2015-08-25
STALE3947d

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

From: Ursula Braun <hidden>
Date: 2015-07-22 09:00:17
Also in: linux-s390
Subsystem: networking [general], shared memory communications (smc) sockets, the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, D. Wythe, Dust Li, Sidraya Jayagond, Wenjia Zhang, Linus Torvalds

From: Ursula Braun <redacted>

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help