From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Subject: [PATCH 1/1]: Fix packet tardiness bug in CCID 3
Date: Thu, 21 Dec 2006 20:44:42 +0000 [thread overview]
Message-ID: <200612212044.42230@strip-the-willow> (raw)
[CCID 3]: Fix packet tardiness BUG
This fixes a bug introduced by myself.
A huge lot of thanks to Ian McDonald who identified this bug.
Problem:
--------
Due to packet scheduling in CCID 3, it can happen that the
actual send time of a packet is later than t_now: in this case
t_nom < t_now.
This case brings the entire packet scheduling out of sync, since
the next packet is scheduled at t_nom + t_ipi, and t_nom is in
the past.
Fix:
----
Update t_nom to t_now whenever a packet is late due to scheduling
(and then t_nom < t_now). This update takes place in ccid3_hc_tx_
send_packet. In between calls to this function, it is irrelevant
if t_nom < t_now (since it will be caught eventually).
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/ccids/ccid3.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -349,7 +349,9 @@ static int ccid3_hc_tx_send_packet(struc
case TFRC_SSTATE_NO_FBACK:
case TFRC_SSTATE_FBACK:
delay = timeval_delta(&hctx->ccid3hctx_t_nom, &now);
- ccid3_pr_debug("delay=%ld\n", (long)delay);
+ /* handle packet tardiness: synchronise t_nom with send time */
+ if (delay < 0)
+ hctx->ccid3hctx_t_nom = now;
/*
* Scheduling of packet transmissions [RFC 3448, 4.6]
*
@@ -358,7 +360,7 @@ static int ccid3_hc_tx_send_packet(struc
* else
* // send the packet in (t_nom - t_now) milliseconds.
*/
- if (delay - (suseconds_t)hctx->ccid3hctx_delta >= 0)
+ else if (delay - (suseconds_t)hctx->ccid3hctx_delta >= 0)
return delay / 1000L;
ccid3_hc_tx_update_win_count(hctx, &now);
next reply other threads:[~2006-12-21 20:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-21 20:44 Gerrit Renker [this message]
2006-12-28 1:45 ` [PATCH 1/1]: Fix packet tardiness bug in CCID 3 Ian McDonald
2007-01-03 11:58 ` Gerrit Renker
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=200612212044.42230@strip-the-willow \
--to=gerrit@erg.abdn.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.