* [patch nf-next] IPVS: convert __ip_vs_securetcp_lock to a spinlock
@ 2010-08-20 14:52 Simon Horman
2010-08-20 14:55 ` Eric Dumazet
0 siblings, 1 reply; 2+ messages in thread
From: Simon Horman @ 2010-08-20 14:52 UTC (permalink / raw)
To: lvs-devel, netdev, netfilter-devel
Cc: Stephen Hemminger, Eric Dumazet, Changli Gao, yao zhao,
Wensong Zhang, Julian Anastasov, Patrick McHardy
Also rename __ip_vs_securetcp_lock to ip_vs_securetcp_lock.
Spinlock conversion was suggested by Eric Dumazet.
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
Compile tested only
Index: nf-next-2.6/net/netfilter/ipvs/ip_vs_ctl.c
===================================================================
--- nf-next-2.6.orig/net/netfilter/ipvs/ip_vs_ctl.c 2010-08-20 22:41:52.000000000 +0900
+++ nf-next-2.6/net/netfilter/ipvs/ip_vs_ctl.c 2010-08-20 23:29:49.000000000 +0900
@@ -61,7 +61,7 @@ static DEFINE_RWLOCK(__ip_vs_svc_lock);
static DEFINE_RWLOCK(__ip_vs_rs_lock);
/* lock for state and timeout tables */
-static DEFINE_RWLOCK(__ip_vs_securetcp_lock);
+static DEFINE_SPINLOCK(ip_vs_securetcp_lock);
/* lock for drop entry handling */
static DEFINE_SPINLOCK(__ip_vs_dropentry_lock);
@@ -204,7 +204,7 @@ static void update_defense_level(void)
spin_unlock(&__ip_vs_droppacket_lock);
/* secure_tcp */
- write_lock(&__ip_vs_securetcp_lock);
+ spin_lock(&ip_vs_securetcp_lock);
switch (sysctl_ip_vs_secure_tcp) {
case 0:
if (old_secure_tcp >= 2)
@@ -238,7 +238,7 @@ static void update_defense_level(void)
old_secure_tcp = sysctl_ip_vs_secure_tcp;
if (to_change >= 0)
ip_vs_protocol_timeout_change(sysctl_ip_vs_secure_tcp>1);
- write_unlock(&__ip_vs_securetcp_lock);
+ spin_unlock(&ip_vs_securetcp_lock);
local_bh_enable();
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch nf-next] IPVS: convert __ip_vs_securetcp_lock to a spinlock
2010-08-20 14:52 [patch nf-next] IPVS: convert __ip_vs_securetcp_lock to a spinlock Simon Horman
@ 2010-08-20 14:55 ` Eric Dumazet
0 siblings, 0 replies; 2+ messages in thread
From: Eric Dumazet @ 2010-08-20 14:55 UTC (permalink / raw)
To: Simon Horman
Cc: lvs-devel, netdev, netfilter-devel, Stephen Hemminger,
Changli Gao, yao zhao, Wensong Zhang, Julian Anastasov,
Patrick McHardy
Le vendredi 20 août 2010 à 23:52 +0900, Simon Horman a écrit :
> Also rename __ip_vs_securetcp_lock to ip_vs_securetcp_lock.
>
> Spinlock conversion was suggested by Eric Dumazet.
>
> Cc: Eric Dumazet <eric.dumazet@gmail.com>
> Signed-off-by: Simon Horman <horms@verge.net.au>
>
> ---
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-20 14:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-20 14:52 [patch nf-next] IPVS: convert __ip_vs_securetcp_lock to a spinlock Simon Horman
2010-08-20 14:55 ` Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).