From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Subject: [PATCH 5/5]: Implement rfc3448bis changes to feedback reception
Date: Mon, 11 Jun 2007 14:39:48 +0000 [thread overview]
Message-ID: <200706111539.48754@strip-the-willow> (raw)
[CCID 3]: Implement rfc3448bis changes to feedback reception
This implements the algorithm to update the allowed sending rate X upon
receiving feedback packets, as described in draft rfc3448bis, 4.2/4.3.
Some changes (use of Larger Initial Windows) were already present, this patch
adds the remaining ones. In particular:
* use t_RTO to distinguish the case "initial feedback packet":
as per earlier patch, it uses "state = NO_FBACK" to imply that
(a) either nofeedback timer expired (when t_RTO != 0) or
(b) initial feedback packet (when t_RTO = 0);
* no reduction of sending rate afer nofeedback timer expiry when p = 0;
* implements the clause ``if [...] not the first packet after a nofeedback
timer'' of draft rfc3448bis, 4.3.
Note: At some point of time this probably needs update wrt rfc3448bis, but see
http://www.mail-archive.com/dccp%40ietf.org/msg00426.html
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/ccids/ccid3.c | 64 ++++++++++++++++++++++++++-----------------------
1 file changed, 34 insertions(+), 30 deletions(-)
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -443,41 +443,45 @@ static void ccid3_hc_tx_packet_recv(stru
r_sample = dccp_sample_rtt(sk, ktime_delta(now, t_send));
hctx->ccid3hctx_rtt = tfrc_ewma(hctx->ccid3hctx_rtt, r_sample, 9);
+ /*
+ * Update allowed sending rate X as per draft rfc3448bis, 4.2/4.3
+ */
if (hctx->ccid3hctx_state = TFRC_SSTATE_NO_FBACK) {
- /*
- * Larger Initial Windows [RFC 4342, sec. 5]
- */
- hctx->ccid3hctx_x = rfc3390_initial_rate(sk);
- hctx->ccid3hctx_t_ld = now;
-
- ccid3_update_send_interval(hctx);
-
- ccid3_pr_debug("%s(%p), s=%u, MSS=%u, "
- "R_sample=%uus, X=%u\n", dccp_role(sk),
- sk, hctx->ccid3hctx_s,
- dccp_sk(sk)->dccps_mss_cache, r_sample,
- (unsigned)(hctx->ccid3hctx_x >> 6));
ccid3_hc_tx_set_state(sk, TFRC_SSTATE_FBACK);
- } else {
- /* Update sending rate (step 4 of [RFC 3448, 4.3]) */
- if (hctx->ccid3hctx_p > 0)
- hctx->ccid3hctx_x_calc - tfrc_calc_x(hctx->ccid3hctx_s,
- hctx->ccid3hctx_rtt,
- hctx->ccid3hctx_p);
- ccid3_hc_tx_update_x(sk, &now);
-
- ccid3_pr_debug("%s(%p), RTT=%uus (sample=%uus), s=%u, "
- "p=%u, X_calc=%u, X_recv=%u, X=%u\n",
- dccp_role(sk),
- sk, hctx->ccid3hctx_rtt, r_sample,
- hctx->ccid3hctx_s, hctx->ccid3hctx_p,
- hctx->ccid3hctx_x_calc,
- (unsigned)(hctx->ccid3hctx_x_recv >> 6),
- (unsigned)(hctx->ccid3hctx_x >> 6));
+ if (hctx->ccid3hctx_t_rto = 0) {
+ /*
+ * Initial feedback packet: Larger Initial Windows (4.2)
+ */
+ hctx->ccid3hctx_x = rfc3390_initial_rate(sk);
+ hctx->ccid3hctx_t_ld = now;
+
+ ccid3_update_send_interval(hctx);
+
+ goto done_computing_x;
+
+ } else if (hctx->ccid3hctx_p = 0) {
+ /*
+ * First feedback after nofeedback timer expiry (4.3)
+ */
+ goto done_computing_x;
+ }
}
+ /* perform step (4) of draft rfc3448bis, section 4.3 */
+ if (hctx->ccid3hctx_p > 0)
+ hctx->ccid3hctx_x_calc = tfrc_calc_x(hctx->ccid3hctx_s,
+ hctx->ccid3hctx_rtt,
+ hctx->ccid3hctx_p);
+ ccid3_hc_tx_update_x(sk, &now);
+
+done_computing_x:
+ ccid3_pr_debug("%s(%p), RTT=%uus (sample=%uus), s=%u, p=%u, X_calc=%u, "
+ "X_recv=%u, X=%u\n", dccp_role(sk), sk,
+ hctx->ccid3hctx_rtt, r_sample, hctx->ccid3hctx_s,
+ hctx->ccid3hctx_p, hctx->ccid3hctx_x_calc,
+ (unsigned)(hctx->ccid3hctx_x_recv >> 6),
+ (unsigned)(hctx->ccid3hctx_x >> 6));
/* unschedule no feedback timer */
sk_stop_timer(sk, &hctx->ccid3hctx_no_feedback_timer);
next reply other threads:[~2007-06-11 14:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-11 14:39 Gerrit Renker [this message]
2007-06-20 8:33 ` [PATCH 5/5]: Implement rfc3448bis changes to feedback reception Ian McDonald
2007-06-20 9:35 ` 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=200706111539.48754@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox