FreeBSD Bugzilla – Attachment 12849 Details for
Bug 24645
sometimes delayed ACKs timeout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.80 KB, created by
Paul Herman
on 2001-01-25 23:00:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Paul Herman
Created:
2001-01-25 23:00:01 UTC
Size:
2.80 KB
patch
obsolete
>Index: sys/netinet/tcp_input.c >=================================================================== >RCS file: /home/ncvs/src/sys/netinet/tcp_input.c,v >retrieving revision 1.107.2.4 >diff -u -r1.107.2.4 tcp_input.c >--- sys/netinet/tcp_input.c 2000/08/16 06:14:23 1.107.2.4 >+++ sys/netinet/tcp_input.c 2001/01/25 22:12:08 >@@ -177,10 +177,14 @@ > if ((th)->th_seq == (tp)->rcv_nxt && \ > LIST_EMPTY(&(tp)->t_segq) && \ > (tp)->t_state == TCPS_ESTABLISHED) { \ >- if (tcp_delack_enabled) \ >- callout_reset(tp->tt_delack, tcp_delacktime, \ >- tcp_timer_delack, tp); \ >- else \ >+ if (tcp_delack_enabled) { \ >+ if (callout_pending(tp->tt_delack)) { \ >+ callout_stop(tp->tt_delack); \ >+ tp->t_flags |= TF_ACKNOW; \ >+ } else \ >+ callout_reset(tp->tt_delack, tcp_delacktime, \ >+ tcp_timer_delack, tp); \ >+ } else \ > tp->t_flags |= TF_ACKNOW; \ > (tp)->rcv_nxt += *(tlenp); \ > flags = (th)->th_flags & TH_FIN; \ >@@ -962,8 +966,12 @@ > sbappend(&so->so_rcv, m); > sorwakeup(so); > if (tcp_delack_enabled) { >- callout_reset(tp->tt_delack, tcp_delacktime, >- tcp_timer_delack, tp); >+ if (callout_pending(tp->tt_delack)) { >+ callout_stop(tp->tt_delack); >+ tp->t_flags |= TF_ACKNOW; >+ } else >+ callout_reset(tp->tt_delack, tcp_delacktime, >+ tcp_timer_delack, tp); > } else { > tp->t_flags |= TF_ACKNOW; > tcp_output(tp); >@@ -1289,10 +1297,14 @@ > * If there's data, delay ACK; if there's also a FIN > * ACKNOW will be turned on later. > */ >- if (tcp_delack_enabled && tlen != 0) >- callout_reset(tp->tt_delack, tcp_delacktime, >- tcp_timer_delack, tp); >- else >+ if (tcp_delack_enabled && tlen != 0) { >+ if (callout_pending(tp->tt_delack)) { >+ callout_stop(tp->tt_delack); >+ tp->t_flags |= TF_ACKNOW; >+ } else >+ callout_reset(tp->tt_delack, tcp_delacktime, >+ tcp_timer_delack, tp); >+ } else > tp->t_flags |= TF_ACKNOW; > /* > * Received <SYN,ACK> in SYN_SENT[*] state. >@@ -2117,10 +2129,14 @@ > * Otherwise, since we received a FIN then no > * more input can be expected, send ACK now. > */ >- if (tcp_delack_enabled && (tp->t_flags & TF_NEEDSYN)) >- callout_reset(tp->tt_delack, tcp_delacktime, >- tcp_timer_delack, tp); >- else >+ if (tcp_delack_enabled && (tp->t_flags & TF_NEEDSYN)) { >+ if (callout_pending(tp->tt_delack)) { >+ callout_stop(tp->tt_delack); >+ tp->t_flags |= TF_ACKNOW; >+ } else >+ callout_reset(tp->tt_delack, tcp_delacktime, >+ tcp_timer_delack, tp); >+ } else > tp->t_flags |= TF_ACKNOW; > tp->rcv_nxt++; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 24645
: 12849