From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Subject: [PATCH 5/5]: Revert use of MSS instead of s
Date: Thu, 26 Jul 2007 12:56:52 +0000 [thread overview]
Message-ID: <200707261356.53153@strip-the-willow> (raw)
[CCID3]: Revert use of MSS instead of s
This updates the CCID3 code with regard to two instances of using `MSS' in place of `s':
1. The RFC3390-based initial rate. Both rfc3448bis as well as the Faster Restart
draft now consistently use `s' instead of MSS. Swapping MSS for s had been done
shortly after revision 01 of rfc3448bis, but that change subsequently disappeared.
2. According to section 4.2 of rfc3448bis: "If the sender is ready to send data when
it does not yet have a round trip sample, the value of X is set to s bytes per
second, for segment size s [...]"
Apart from tracking documents, this change makes sense: in particular, it avoids gross
over-estimation if the packet size `s' is small (imagine a VoIP application with sd
bytes and MSS according to Ethernet jumbo frames).
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/ccids/ccid3.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -77,18 +77,20 @@ static void ccid3_hc_tx_set_state(struct
}
/*
- * Compute the initial sending rate X_init according to RFC 3390:
- * w_init = min(4 * MSS, max(2 * MSS, 4380 bytes))
- * X_init = w_init / RTT
+ * Compute the initial sending rate X_init in the manner of RFC 3390:
+ *
+ * X_init = min(4*s, max(2*s, 4380 bytes)) / RTT
+ *
+ * Note that RFC 3390 uses MSS, while TFRC uses the nominal packet size s.
* For consistency with other parts of the code, X_init is scaled by 2^6.
*/
static inline u64 rfc3390_initial_rate(struct sock *sk)
{
- const struct dccp_sock *dp = dccp_sk(sk);
- const __u32 w_init = min(4 * dp->dccps_mss_cache,
- max(2 * dp->dccps_mss_cache, 4380U));
+ const struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
+ const __u32 w_init = min(4 * hctx->ccid3hctx_s,
+ max(2 * hctx->ccid3hctx_s, 4380U));
- return scaled_div(w_init << 6, ccid3_hc_tx_sk(sk)->ccid3hctx_rtt);
+ return scaled_div(w_init << 6, hctx->ccid3hctx_rtt);
}
/*
@@ -333,7 +335,7 @@ static int ccid3_hc_tx_send_packet(struc
hctx->ccid3hctx_t_ld = now;
} else {
/* Sender does not have RTT sample: X = MSS/second */
- hctx->ccid3hctx_x = dp->dccps_mss_cache;
+ hctx->ccid3hctx_x = hctx->ccid3hctx_s;
hctx->ccid3hctx_x <<= 6;
}
ccid3_update_send_interval(hctx);
next reply other threads:[~2007-07-26 12:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-26 12:56 Gerrit Renker [this message]
2007-07-27 5:02 ` [PATCH 5/5]: Revert use of MSS instead of s Ian McDonald
2007-07-27 15:21 ` Gerrit Renker
2007-07-31 22:00 ` Ian McDonald
2007-07-31 22:11 ` Ian McDonald
2007-08-01 13:55 ` Gerrit Renker
2007-08-01 22:00 ` Ian McDonald
2007-08-02 14:40 ` 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=200707261356.53153@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