From: Julian Anastasov <ja@ssi.bg>
To: Simon Horman <horms@verge.net.au>
Cc: lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
Tinggong Wang <wangtinggong@gmail.com>
Subject: [PATCH] ipvs: fix timer in get_curr_sync_buff
Date: Wed, 9 Feb 2011 02:21:59 +0200 (EET) [thread overview]
Message-ID: <alpine.LFD.2.00.1102090214460.3494@ja.ssi.bg> (raw)
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
next reply other threads:[~2011-02-09 0:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-09 0:21 Julian Anastasov [this message]
2011-02-15 22:33 ` [PATCH] ipvs: fix timer in get_curr_sync_buff Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.1102090214460.3494@ja.ssi.bg \
--to=ja@ssi.bg \
--cc=horms@verge.net.au \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wangtinggong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox