* [PATCH] ipvs: fix timer in get_curr_sync_buff
@ 2011-02-09 0:21 Julian Anastasov
2011-02-15 22:33 ` Simon Horman
0 siblings, 1 reply; 2+ messages in thread
From: Julian Anastasov @ 2011-02-09 0:21 UTC (permalink / raw)
To: Simon Horman; +Cc: lvs-devel, netdev, Tinggong Wang
From: Tinggong Wang <wangtinggong@gmail.com>
Fix get_curr_sync_buff to keep buffer for 2 seconds
as intended, not just for the current jiffie. By this way
we will sync more connection structures with single packet.
Signed-off-by: Tinggong Wang <wangtinggong@gmail.com>
Signed-off-by: Julian Anastasov <ja@ssi.bg>
---
Patch is against lvs-test-2.6 from 09-FEB-2011
but should apply cleanly to net-next.
--- lvs-test-2.6-7c9989a/net/netfilter/ipvs/ip_vs_sync.c 2011-02-07 13:40:00.000000000 +0200
+++ linux/net/netfilter/ipvs/ip_vs_sync.c 2011-02-09 01:59:46.771351460 +0200
@@ -374,8 +374,8 @@ get_curr_sync_buff(struct netns_ipvs *ip
struct ip_vs_sync_buff *sb;
spin_lock_bh(&ipvs->sync_buff_lock);
- if (ipvs->sync_buff && (time == 0 ||
- time_before(jiffies - ipvs->sync_buff->firstuse, time))) {
+ if (ipvs->sync_buff &&
+ time_after_eq(jiffies - ipvs->sync_buff->firstuse, time)) {
sb = ipvs->sync_buff;
ipvs->sync_buff = NULL;
} else
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] ipvs: fix timer in get_curr_sync_buff
2011-02-09 0:21 [PATCH] ipvs: fix timer in get_curr_sync_buff Julian Anastasov
@ 2011-02-15 22:33 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2011-02-15 22:33 UTC (permalink / raw)
To: Julian Anastasov; +Cc: lvs-devel, netdev, Tinggong Wang
On Wed, Feb 09, 2011 at 02:21:59AM +0200, Julian Anastasov wrote:
>
> From: Tinggong Wang <wangtinggong@gmail.com>
>
> Fix get_curr_sync_buff to keep buffer for 2 seconds
> as intended, not just for the current jiffie. By this way
> we will sync more connection structures with single packet.
>
> Signed-off-by: Tinggong Wang <wangtinggong@gmail.com>
> Signed-off-by: Julian Anastasov <ja@ssi.bg>
> ---
>
> Patch is against lvs-test-2.6 from 09-FEB-2011
> but should apply cleanly to net-next.
Thanks, I have pushed this change into the master branch of lvs-test-2.6.
I am waiting for one or two more patches to settle down before
sending my next pull request to Patrick.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-15 22:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-09 0:21 [PATCH] ipvs: fix timer in get_curr_sync_buff Julian Anastasov
2011-02-15 22:33 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox