Yoshi,
I have attached a patch. Let me know if this fixes the problem.

jayanth



[EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote:
> 
> >     This issue is a combination of mbuf cluster size and the 
> >     TF_MORETOCOME flag.
> 
> >             if (len) {
> >                     if (len == tp->t_maxseg)
> >                             goto send;
> >                     if (!(tp->t_flags & TF_MORETOCOME) &&
> >                         (idle || tp->t_flags & TF_NODELAY) &&
> >                         (tp->t_flags & TF_NOPUSH) == 0 &&
> >                         len + off >= so->so_snd.sb_cc)
> >                             goto send;
> 
> When I changed the condition, the problem we had did not occur. I am wondering
> what is the right fix.
> Yoshi
> 
> 
--- tcp_output.c        Fri Sep 28 11:15:32 2001
+++ tcp_output.c.new    Fri Sep 28 12:05:03 2001
@@ -133,7 +133,7 @@
         * If there is some data or critical controls (SYN, RST)
         * to send, then transmit; otherwise, investigate further.
         */
-       idle = (tp->snd_max == tp->snd_una);
+       idle = (tp->t_flags & TF_LASTIDLE) ? 1 : (tp->snd_max == tp->snd_una);
        if (idle && (ticks - tp->t_rcvtime) >= tp->t_rxtcur) {
                /*
                 * We have been idle for "a while" and no acks are
@@ -156,6 +156,13 @@
                        tp->snd_cwnd = tp->t_maxseg * ss_fltsz_local;
                else     
                        tp->snd_cwnd = tp->t_maxseg * ss_fltsz;
+       }
+       tp->t_flags &= ~TF_LASTIDLE;
+       if (idle) {
+               if (tp->t_flags & TF_MORETOCOME) {
+                       tp->t_flags |= TF_LASTIDLE;
+                       idle = 0;
+               }
        }
 again:
        sendalot = 0;
--- tcp_var.h   Fri Sep 28 11:11:48 2001
+++ tcp_var.h.new       Fri Sep 28 12:04:09 2001
@@ -95,6 +95,7 @@
 #define        TF_SENDCCNEW    0x08000         /* send CCnew instead of CC in SYN */
 #define        TF_MORETOCOME   0x10000         /* More data to be appended to sock */
 #define        TF_LQ_OVERFLOW  0x20000         /* listen queue overflow */
+#define        TF_LASTIDLE     0x40000         /* idle, when previously called */
        int     t_force;                /* 1 if forcing out a byte */
 
        tcp_seq snd_una;                /* send unacknowledged */

Reply via email to