From: Daikichi Osuga <[EMAIL PROTECTED]>

RFC3465 Appropriate Byte Count fix
slow start after retransmit timeout does not work is fixed.
case of L=2*SMSS acked bytes comparison is fixed.

Signed-off-by: Daikichi Osuga <[EMAIL PROTECTED]>

--- linux-2.6.15.i686.org/net/ipv4/tcp_input.c  2006-08-21 17:58:18.000000000 
+0900
+++ linux-2.6.15.i686/net/ipv4/tcp_input.c      2006-08-22 09:59:46.000000000 
+0900
@@ -2450,8 +2450,13 @@ static int tcp_ack(struct sock *sk, stru
        if (before(ack, prior_snd_una))
                goto old_ack;
 
-       if (sysctl_tcp_abc && icsk->icsk_ca_state < TCP_CA_CWR)
-               tp->bytes_acked += ack - prior_snd_una;
+       if (sysctl_tcp_abc) {
+               if (icsk->icsk_ca_state < TCP_CA_CWR)
+                       tp->bytes_acked += ack - prior_snd_una;
+               else if (icsk->icsk_ca_state == TCP_CA_Loss)
+                       /* we assume just one segment left network */
+                       tp->bytes_acked += min(ack - prior_snd_una, 
tp->mss_cache);
+       }
 
        if (!(flag&FLAG_SLOWPATH) && after(ack, prior_snd_una)) {
                /* Window is constant, pure forward advance.
--- linux-2.6.15.i686.org/net/ipv4/tcp_cong.c   2006-08-21 17:58:18.000000000 
+0900
+++ linux-2.6.15.i686/net/ipv4/tcp_cong.c       2006-08-22 09:59:53.000000000 
+0900
@@ -190,7 +190,7 @@ void tcp_slow_start(struct tcp_sock *tp)
                        return;
 
                /* We MAY increase by 2 if discovered delayed ack */
-               if (sysctl_tcp_abc > 1 && tp->bytes_acked > 2*tp->mss_cache) {
+               if (sysctl_tcp_abc > 1 && tp->bytes_acked >= 2*tp->mss_cache) {
                        if (tp->snd_cwnd < tp->snd_cwnd_clamp)
                                tp->snd_cwnd++;
                }
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to