aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/ccids/ccid3.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index f4097ddf2504..c3abd7695d55 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)
334 usecs_to_jiffies(TFRC_INITIAL_TIMEOUT))); 334 usecs_to_jiffies(TFRC_INITIAL_TIMEOUT)));
335 hctx->ccid3hctx_last_win_count = 0; 335 hctx->ccid3hctx_last_win_count = 0;
336 hctx->ccid3hctx_t_last_win_count = now; 336 hctx->ccid3hctx_t_last_win_count = now;
337 ccid3_hc_tx_set_state(sk, TFRC_SSTATE_NO_FBACK);
338
339 /* Set initial sending rate X/s to 1pps (X is scaled by 2^6) */
340 hctx->ccid3hctx_x = hctx->ccid3hctx_s = skb->len;
341 hctx->ccid3hctx_x <<= 6;
342
343 /* First timeout, according to [RFC 3448, 4.2], is 1 second */
344 hctx->ccid3hctx_t_ipi = USEC_PER_SEC;
345 /* Initial delta: minimum of 0.5 sec and t_gran/2 */
346 hctx->ccid3hctx_delta = TFRC_OPSYS_HALF_TIME_GRAN;
347 337
348 /* Set t_0 for initial packet */ 338 /* Set t_0 for initial packet */
349 hctx->ccid3hctx_t_nom = now; 339 hctx->ccid3hctx_t_nom = now;
340
341 hctx->ccid3hctx_s = skb->len;
342
343 /*
344 * Use initial RTT sample when available: recommended by erratum
345 * to RFC 4342. This implements the initialisation procedure of
346 * draft rfc3448bis, section 4.2. Remember, X is scaled by 2^6.
347 */
348 if (dp->dccps_syn_rtt) {
349 ccid3_pr_debug("SYN RTT = %uus\n", dp->dccps_syn_rtt);
350 hctx->ccid3hctx_rtt = dp->dccps_syn_rtt;
351 hctx->ccid3hctx_x = rfc3390_initial_rate(sk);
352 hctx->ccid3hctx_t_ld = now;
353 } else {
354 /* Sender does not have RTT sample: X = MSS/second */
355 hctx->ccid3hctx_x = dp->dccps_mss_cache;
356 hctx->ccid3hctx_x <<= 6;
357 }
358 ccid3_update_send_interval(hctx);
359
360 ccid3_hc_tx_set_state(sk, TFRC_SSTATE_NO_FBACK);
350 break; 361 break;
351 case TFRC_SSTATE_NO_FBACK: 362 case TFRC_SSTATE_NO_FBACK:
352 case TFRC_SSTATE_FBACK: 363 case TFRC_SSTATE_FBACK: