]> Git Repo - qemu.git/blobdiff - slirp/tcp_input.c
monitor/mwait support
[qemu.git] / slirp / tcp_input.c
index 4f74d0cdbc51c51d01498f96ffa2cb2eb11550c5..c01516101a75db42e4eb14a90433ce45243c5cc8 100644 (file)
@@ -580,28 +580,11 @@ findso:
                         *      congestion avoidance sender won't send more until
                         *      he gets an ACK.
                         * 
-                        * Here are 3 interpretations of what should happen.
-                        * The best (for me) is to delay-ack everything except
-                        * if it's a one-byte packet containing an ESC
-                        * (this means it's an arrow key (or similar) sent using
-                        * Nagel, hence there will be no echo)
-                        * The first of these is the original, the second is the
-                        * middle ground between the other 2
+                        * It is better to not delay acks at all to maximize
+                        * TCP throughput.  See RFC 2581.
                         */ 
-/*                     if (((unsigned)ti->ti_len < tp->t_maxseg)) {
- */                         
-/*                     if (((unsigned)ti->ti_len < tp->t_maxseg && 
- *                          (so->so_iptos & IPTOS_LOWDELAY) == 0) ||
- *                         ((so->so_iptos & IPTOS_LOWDELAY) && 
- *                          ((struct tcpiphdr_2 *)ti)->first_char == (char)27)) {
- */
-                       if ((unsigned)ti->ti_len == 1 &&
-                           ((struct tcpiphdr_2 *)ti)->first_char == (char)27) {
-                               tp->t_flags |= TF_ACKNOW;
-                               tcp_output(tp);
-                       } else {
-                               tp->t_flags |= TF_DELACK;
-                       }
+                       tp->t_flags |= TF_ACKNOW;
+                       tcp_output(tp);
                        return;
                }
        } /* header prediction */
@@ -658,10 +641,11 @@ findso:
              if(lastbyte==CTL_CMD || lastbyte==CTL_EXEC) {
                /* Command or exec adress */
                so->so_state |= SS_CTL;
-             } else {
+             } else 
+#endif
+              {
                /* May be an add exec */
                struct ex_list *ex_ptr;
-
                for(ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) {
                  if(ex_ptr->ex_fport == so->so_fport && 
                     lastbyte == ex_ptr->ex_addr) {
@@ -671,7 +655,6 @@ findso:
                }
              }
              if(so->so_state & SS_CTL) goto cont_input;
-#endif
            }
            /* CTL_ALIAS: Do nothing, tcp_fconnect will be called on it */
          }
@@ -681,7 +664,7 @@ findso:
            goto cont_input;
          }
          
-         if(tcp_fconnect(so) == -1 && errno != EINPROGRESS) {
+         if((tcp_fconnect(so) == -1) && (errno != EINPROGRESS) && (errno != EWOULDBLOCK)) {
            u_char code=ICMP_UNREACH_NET;
            DEBUG_MISC((dfd," tcp fconnect errno = %d-%s\n",
                        errno,strerror(errno)));
This page took 0.02626 seconds and 4 git commands to generate.