Messages in this thread Patch in this message | | | Date | Wed, 18 Mar 1998 22:08:02 -0800 | From | "David S. Miller" <> | Subject | TCP fix for sluggish rlogin/rsh |
| |
This is the right fix. It should apply cleanly to 2.1.90, but even if it doesn't you can get the idea. We ACK quickly, if we see PSH _and_ we saw less than 1/2 the MSS worth of data in incoming packet.
--- net/ipv4/tcp_input.c.~1~ Wed Mar 18 19:20:15 1998 +++ net/ipv4/tcp_input.c Wed Mar 18 22:05:52 1998 @@ -1254,10 +1254,15 @@ dst_confirm(sk->dst_cache); skb_queue_tail(&sk->receive_queue, skb); tp->rcv_nxt = skb->end_seq; - if(skb->h.th->fin) + if(skb->h.th->fin) { tcp_fin(skb, sk, skb->h.th); - else + } else { tp->delayed_acks++; + + /* Tiny-grams with PSH set make us ACK quickly. */ + if(skb->h.th->psh && (skb->len < (sk->mss >> 1))) + tp->ato = HZ/50; + } tcp_ofo_queue(sk); if (skb_queue_len(&tp->out_of_order_queue) == 0) tp->pred_flags = htonl(((tp->tcp_header_len >> 2) << 28) | @@ -1623,6 +1628,11 @@ */ sk->data_ready(sk, 0); tcp_delack_estimator(tp); + + /* Tiny-grams with PSH set make us ACK quickly. */ + if(th->psh && (skb->len < (sk->mss >> 1))) + tp->ato = HZ/50; + tp->delayed_acks++; __tcp_ack_snd_check(sk); return 0; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |