From: Andrea Bittau <a.bittau@cs.ucl.ac.uk>
To: dccp@vger.kernel.org
Subject: [PATCH 04/11] CCID2: Fix jiffie wrap issues
Date: Thu, 22 Jun 2006 17:54:47 +0000 [thread overview]
Message-ID: <20060622175447.GD4230@shorty.sorbonet.org> (raw)
Jiffies are now handled correctly (I hope) in CCID2. If they wrap, no problem.
Signed-off-by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>
---
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c
index 6fe9cb9..f953016 100644
--- a/net/dccp/ccids/ccid2.c
+++ b/net/dccp/ccids/ccid2.c
@@ -27,7 +27,6 @@
*
* BUGS:
* - sequence number wrapping
- * - jiffies wrapping
*/
#include <linux/config.h>
@@ -72,7 +71,8 @@ static void ccid2_hc_tx_check_sanity(con
/* packets are sent sequentially */
BUG_ON(seqp->ccid2s_seq <= prev->ccid2s_seq);
- BUG_ON(seqp->ccid2s_sent < prev->ccid2s_sent);
+ BUG_ON(time_before(seqp->ccid2s_sent,
+ prev->ccid2s_sent));
BUG_ON(len > ccid2_seq_len);
seqp = prev;
@@ -419,8 +419,9 @@ static inline void ccid2_new_ack(struct
/* update RTO */
if (hctx->ccid2hctx_srtt = -1 ||
- (jiffies - hctx->ccid2hctx_lastrtt) >= hctx->ccid2hctx_srtt) {
- unsigned long r = jiffies - seqp->ccid2s_sent;
+ ((long)jiffies - (long)hctx->ccid2hctx_lastrtt) >+ hctx->ccid2hctx_srtt) {
+ unsigned long r = (long)jiffies - (long)seqp->ccid2s_sent;
int s;
/* first measurement */
reply other threads:[~2006-06-22 17:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20060622175447.GD4230@shorty.sorbonet.org \
--to=a.bittau@cs.ucl.ac.uk \
--cc=dccp@vger.kernel.org \
/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