Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111546
b: refs/heads/master
c: 9d497a2
h: refs/heads/master
v: v3
  • Loading branch information
Gerrit Renker committed Sep 4, 2008
1 parent c9add78 commit 86df5e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 88e97a93342c0b9e835d510921e7b2df8547d1bd
refs/heads/master: 9d497a2c9120e31ff417e75f9f5576c4cde11281
12 changes: 5 additions & 7 deletions trunk/net/dccp/ccids/ccid3.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,16 @@ static int ccid3_debug;
/*
* Compute the initial sending rate X_init in the manner of RFC 3390:
*
* X_init = min(4 * s, max(2 * s, 4380 bytes)) / RTT
* X_init = min(4 * MPS, max(2 * MPS, 4380 bytes)) / RTT
*
* Note that RFC 3390 uses MSS, RFC 4342 refers to RFC 3390, and rfc3448bis
* (rev-02) clarifies the use of RFC 3390 with regard to the above formula.
* 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 ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
const __u32 w_init = clamp_t(__u32, 4380U, 2 * hctx->s, 4 * hctx->s);
const u32 mps = dccp_sk(sk)->dccps_mss_cache,
w_init = clamp(4380U, 2 * mps, 4 * mps);

return scaled_div(w_init << 6, hctx->rtt);
return scaled_div(w_init << 6, ccid3_hc_tx_sk(sk)->rtt);
}

/**
Expand Down Expand Up @@ -293,7 +291,7 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
* - set sending rate X_pps = 1pps as per RFC 3448, 4.2.
*/
hctx->rtt = DCCP_FALLBACK_RTT;
hctx->x = hctx->s;
hctx->x = dp->dccps_mss_cache;
hctx->x <<= 6;
}
ccid3_update_send_interval(hctx);
Expand Down

0 comments on commit 86df5e7

Please sign in to comment.