Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=30833ffead66e1f0052150a51db0b45151189ac1
Commit:     30833ffead66e1f0052150a51db0b45151189ac1
Parent:     89560b53b92a07c529e13a462aa7fd87a844f1f5
Author:     Gerrit Renker <[EMAIL PROTECTED]>
AuthorDate: Tue Mar 20 15:31:56 2007 -0300
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:27:04 2007 -0700

    [CCID3]: Use initial RTT sample from SYN exchange
    
    The patch follows the following recommendation made in an erratum to RFC 
4342:
    
      "Senders MAY additionally make use of other available RTT measurements,
       including those from the initial Request-Response packet exchange."
    
    It implements larger initial windows with regard to this inital RTT 
measurement,
    using the mechanism suggested in draft-ietf-dccp-rfc3448bis, section 4.2.
    
    Signed-off-by: Gerrit Renker <[EMAIL PROTECTED]>
    Signed-off-by: Ian McDonald <[EMAIL PROTECTED]>
    Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/dccp/ccids/ccid3.c |   31 +++++++++++++++++++++----------
 1 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index f4097dd..c3abd76 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -334,19 +334,30 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, 
struct sk_buff *skb)
                                usecs_to_jiffies(TFRC_INITIAL_TIMEOUT)));
                hctx->ccid3hctx_last_win_count   = 0;
                hctx->ccid3hctx_t_last_win_count = now;
-               ccid3_hc_tx_set_state(sk, TFRC_SSTATE_NO_FBACK);
-
-               /* Set initial sending rate X/s to 1pps (X is scaled by 2^6) */
-               hctx->ccid3hctx_x = hctx->ccid3hctx_s = skb->len;
-               hctx->ccid3hctx_x <<= 6;
-
-               /* First timeout, according to [RFC 3448, 4.2], is 1 second */
-               hctx->ccid3hctx_t_ipi = USEC_PER_SEC;
-               /* Initial delta: minimum of 0.5 sec and t_gran/2 */
-               hctx->ccid3hctx_delta = TFRC_OPSYS_HALF_TIME_GRAN;
 
                /* Set t_0 for initial packet */
                hctx->ccid3hctx_t_nom = now;
+
+               hctx->ccid3hctx_s = skb->len;
+
+               /*
+                * Use initial RTT sample when available: recommended by erratum
+                * to RFC 4342. This implements the initialisation procedure of
+                * draft rfc3448bis, section 4.2. Remember, X is scaled by 2^6.
+                */
+               if (dp->dccps_syn_rtt) {
+                       ccid3_pr_debug("SYN RTT = %uus\n", dp->dccps_syn_rtt);
+                       hctx->ccid3hctx_rtt  = dp->dccps_syn_rtt;
+                       hctx->ccid3hctx_x    = rfc3390_initial_rate(sk);
+                       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 <<= 6;
+               }
+               ccid3_update_send_interval(hctx);
+
+               ccid3_hc_tx_set_state(sk, TFRC_SSTATE_NO_FBACK);
                break;
        case TFRC_SSTATE_NO_FBACK:
        case TFRC_SSTATE_FBACK:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to