Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=179ebc9f92da88e15ea86d7d27308c92712d8ee9
Commit:     179ebc9f92da88e15ea86d7d27308c92712d8ee9
Parent:     ff58629824c068e2a75402b5b83f12af0b36d394
Author:     Gerrit Renker <[EMAIL PROTECTED]>
AuthorDate: Sun Dec 10 00:01:22 2006 -0200
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Dec 11 14:34:41 2006 -0800

    [DCCP] ccid3: Fix two bugs in sending rate computation
    
    This fixes
     1) a bug in the recomputation of the sending rate by the nofeedback
        timer when no feedback at all has so far been sent by the receiver:
        min_t was used instead of max_t, which is wrong (cf. RFC 3448, p. 10);
    
     2) an error in the computation of larger initial windows: instead of
        min(... max()) (cf. RFC 4342, 5.), the code had used max(... max()).
    
    Signed-off-by: Gerrit Renker <[EMAIL PROTECTED]>
    Acked-by: Ian McDonald <[EMAIL PROTECTED]>
    Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
---
 net/dccp/ccids/ccid3.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 92e893e..c54663f 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -193,7 +193,7 @@ static void ccid3_hc_tx_no_feedback_timer(unsigned long 
data)
        switch (hctx->ccid3hctx_state) {
        case TFRC_SSTATE_NO_FBACK:
                /* RFC 3448, 4.4: Halve send rate directly */
-               hctx->ccid3hctx_x = min_t(u32, hctx->ccid3hctx_x / 2,
+               hctx->ccid3hctx_x = max_t(u32, hctx->ccid3hctx_x / 2,
                                               hctx->ccid3hctx_s / TFRC_T_MBI);
 
                ccid3_pr_debug("%s, sk=%p, state=%s, updated tx rate to %d "
@@ -477,7 +477,7 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct 
sk_buff *skb)
                if (hctx->ccid3hctx_state == TFRC_SSTATE_NO_FBACK) {
                        /* Use Larger Initial Windows [RFC 4342, sec. 5]
                         * We deviate in that we use `s' instead of `MSS'. */
-                       u16 w_init = max(    4 * hctx->ccid3hctx_s,
+                       u16 w_init = min(    4 * hctx->ccid3hctx_s,
                                         max(2 * hctx->ccid3hctx_s, 4380));
                        hctx->ccid3hctx_rtt  = r_sample;
                        hctx->ccid3hctx_x    = usecs_div(w_init, r_sample);
-
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