On Thu, Aug 04, 2005 at 01:33:29PM +1000, herbert wrote:
> 
> So I suppose we should reset cwnd_quota after tcp_transmit_skb?

Please try this patch to see if this is really the problem or not.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1027,19 +1027,14 @@ static int tcp_write_xmit(struct sock *s
                tcp_minshall_update(tp, mss_now, skb);
                sent_pkts++;
 
-               /* Do not optimize this to use tso_segs. If we chopped up
-                * the packet above, tso_segs will no longer be valid.
-                */
-               cwnd_quota -= tcp_skb_pcount(skb);
-
-               BUG_ON(cwnd_quota < 0);
-               if (!cwnd_quota)
-                       break;
-
                skb = sk->sk_send_head;
                if (!skb)
                        break;
+
                tso_segs = tcp_init_tso_segs(sk, skb, mss_now);
+               cwnd_quota = tcp_cwnd_test(tp, skb);
+               if (!cwnd_quota)
+                       break;
        }
 
        if (likely(sent_pkts)) {

Reply via email to