diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2005-11-11 01:53:30 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-11 01:53:30 +0100 |
commit | f4805eded7d38c4e42bf473dc5eb2f34853beb06 (patch) | |
tree | 1f7e0e90642e775b4e8c2c47d84e2df8ce2de3c3 /net/ipv4/tcp_highspeed.c | |
parent | [PATCH] PCI: fix for Toshiba ohci1394 quirk (diff) | |
download | linux-f4805eded7d38c4e42bf473dc5eb2f34853beb06.tar.xz linux-f4805eded7d38c4e42bf473dc5eb2f34853beb06.zip |
[TCP]: fix congestion window update when using TSO deferal
TCP peformance with TSO over networks with delay is awful.
On a 100Mbit link with 150ms delay, we get 4Mbits/sec with TSO and
50Mbits/sec without TSO.
The problem is with TSO, we intentionally do not keep the maximum
number of packets in flight to fill the window, we hold out to until
we can send a MSS chunk. But, we also don't update the congestion window
unless we have filled, as per RFC2861.
This patch replaces the check for the congestion window being full
with something smarter that accounts for TSO.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_highspeed.c')
-rw-r--r-- | net/ipv4/tcp_highspeed.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_highspeed.c b/net/ipv4/tcp_highspeed.c index 6acc04bde080..5e56ad368dd2 100644 --- a/net/ipv4/tcp_highspeed.c +++ b/net/ipv4/tcp_highspeed.c @@ -111,12 +111,12 @@ static void hstcp_init(struct sock *sk) } static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt, - u32 in_flight, int good) + u32 in_flight, u32 pkts_acked) { struct tcp_sock *tp = tcp_sk(sk); struct hstcp *ca = inet_csk_ca(sk); - if (in_flight < tp->snd_cwnd) + if (!tcp_is_cwnd_limited(sk, in_flight)) return; if (tp->snd_cwnd <= tp->snd_ssthresh) { |