Skip to contentSkip to conversation

tcp: RFC3465 Appropriate Byte Count fix

PATCH In review Daikichi Osuga 2 participants 2 messages Aug 9, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcp: RFC3465 Appropriate Byte Count fix

In current RFC3465 Appropriate Byte Count implementation, slow start after retransmit timeout does not work. I fixed it.

--
Daikichi Osuga

*** linux-2.6.15.i686.org/net/ipv4/tcp_input.c 2006-07-25 15:44:35.000000000 +0900 --- linux-2.6.15.i686/net/ipv4/tcp_input.c 2006-08-08 14:38:24.000000000 +0900
***************
*** 2450,2456 ****
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 (!(flag&FLAG_SLOWPATH) && after(ack, prior_snd_una)) {
--- 2551,2557 ----
if (before(ack, prior_snd_una))
goto old_ack;

! if (sysctl_tcp_abc && (icsk->icsk_ca_state < TCP_CA_CWR || icsk->icsk_ca_state == TCP_CA_Loss))
tp->bytes_acked += ack - prior_snd_una;

if (!(flag&FLAG_SLOWPATH) && after(ack, prior_snd_una)) {
*** linux-2.6.15.i686.org/net/ipv4/tcp_cong.c 2006-07-25 15:44:35.000000000 +0900 --- linux-2.6.15.i686/net/ipv4/tcp_cong.c 2006-08-08 15:47:45.000000000 +0900
***************
*** 180,185 ****
--- 180,186 ----
*/
void tcp_slow_start(struct tcp_sock *tp)
{
+ struct inet_connection_sock *icsk = (struct inet_connection_sock *)tp; if (sysctl_tcp_abc) {
/* RFC3465: Slow Start
* TCP sender SHOULD increase cwnd by the number of
***************
*** 190,196 ****

    return;

/* We MAY increase by 2 if discovered delayed ack */

!   if (sysctl_tcp_abc > 1 && tp->bytes_acked > 2*tp->mss_cache) {
    if (tp->snd_cwnd < tp->snd_cwnd_clamp)
     tp->snd_cwnd++;
   }
--- 191,197 ----
    return;

/* We MAY increase by 2 if discovered delayed ack */

!   if (sysctl_tcp_abc > 1 && tp->bytes_acked >= 2*tp->mss_cache && icsk->icsk_ca_state != TCP_CA_Loss) {
    if (tp->snd_cwnd < tp->snd_cwnd_clamp)
     tp->snd_cwnd++;

}

maintainer
#1 lore raw

From: Daikichi Osuga <[email protected]>
Date: Wed, 09 Aug 2006 14:02:37 +0900

Quoted 3 lines

In current RFC3465 Appropriate Byte Count implementation, slow start after retransmit timeout does not work. I fixed it.

Please provide diffs in unified format.

Also, your email client has corrupted the patch, changing tabs into spaces. This makes your patch unusable.

If you are in doubt, email the patch to yourself and try to apply it from the email you receive.

Finally, provide a proper "Signed-off-by:" line with your changelog description.

For more information please read Documentation/SubmittingPatches in the kernel source tree.

Thank you.