patch-2.0.1 linux/net/ipv4/tcp_output.c
Next file: linux/net/socket.c
Previous file: linux/net/ipv4/tcp_input.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Sat Jun 29 12:00:48 1996
- Orig file:
v2.0.0/linux/net/ipv4/tcp_output.c
- Orig date:
Sun Jun 9 13:28:48 1996
diff -u --recursive --new-file v2.0.0/linux/net/ipv4/tcp_output.c linux/net/ipv4/tcp_output.c
@@ -879,15 +879,22 @@
void tcp_send_delayed_ack(struct sock * sk, int max_timeout, unsigned long timeout)
{
unsigned long now;
+ static int delack_guard=0;
+ if(delack_guard)
+ return;
+
+ delack_guard++;
+
/* Calculate new timeout */
now = jiffies;
if (timeout > max_timeout)
timeout = max_timeout;
timeout += now;
if (sk->bytes_rcv >= sk->max_unacked) {
- timeout = now;
- mark_bh(TIMER_BH);
+ tcp_send_ack(sk);
+ delack_guard--;
+ return;
}
/* Use new timeout only if there wasn't a older one earlier */
@@ -896,6 +903,7 @@
sk->ack_backlog++;
add_timer(&sk->delack_timer);
+ delack_guard--;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov