In the PRU_RCVD entry point, if TF_DELACK is set, don't send the window
update now, since it will be sent within 200ms when the delayed ACK is sent. Instrument how many hits we get on this optimization.
This commit is contained in:
parent
7f7bb7db17
commit
3026b32ab3
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tcp_usrreq.c,v 1.28 1997/11/08 02:35:26 kml Exp $ */
|
||||
/* $NetBSD: tcp_usrreq.c,v 1.29 1997/12/11 06:53:06 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1988, 1993
|
||||
|
@ -251,6 +251,14 @@ tcp_usrreq(so, req, m, nam, control, p)
|
|||
* After a receive, possibly send window update to peer.
|
||||
*/
|
||||
case PRU_RCVD:
|
||||
/*
|
||||
* Don't send a window update if we're about to send
|
||||
* a delayed ACK; we'll be able to piggyback.
|
||||
*/
|
||||
if (tp->t_flags & TF_DELACK) {
|
||||
tcpstat.tcps_delwin++;
|
||||
break;
|
||||
}
|
||||
(void) tcp_output(tp);
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tcp_var.h,v 1.27 1997/12/10 01:58:08 thorpej Exp $ */
|
||||
/* $NetBSD: tcp_var.h,v 1.28 1997/12/11 06:53:07 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993, 1994
|
||||
|
@ -229,6 +229,7 @@ struct tcpstat {
|
|||
u_long tcps_keepdrops; /* connections dropped in keepalive */
|
||||
u_long tcps_connsdrained; /* connections drained due to memory
|
||||
shortage */
|
||||
u_long tcps_delwin; /* window updates delayed */
|
||||
|
||||
u_long tcps_sndtotal; /* total packets sent */
|
||||
u_long tcps_sndpack; /* data packets sent */
|
||||
|
|
Loading…
Reference in New Issue