Re: panic in TCP Limited Transmit after RTO

看板DFBSD_bugs作者時間21年前 (2005/03/14 10:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/11 (看更多)
This is a multi-part message in MIME format. --------------030401020306030605040308 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Limited Transmit is supposed to send new data, and, we are out of SACK recovery at this point, so I think we can safely ignore any old SACK blocks. Please try this patch. --------------030401020306030605040308 Content-Type: text/plain; name="lt.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lt.diff" Index: tcp_input.c =================================================================== RCS file: /j/dragonfly/dcvs/src/sys/netinet/tcp_input.c,v retrieving revision 1.54 diff -u -p -r1.54 tcp_input.c --- tcp_input.c 9 Mar 2005 06:57:29 -0000 1.54 +++ tcp_input.c 12 Mar 2005 22:28:35 -0000 @@ -1954,9 +1954,10 @@ fastretransmit: (tp->t_dupacks - tp->snd_limited); } else if (tcp_do_limitedtransmit) { u_long oldcwnd = tp->snd_cwnd; - tcp_seq oldsndmax = tp->snd_max; + u_long oldssthresh = tp->snd_ssthresh; + tcp_seq oldsndnxt = tp->snd_nxt; /* outstanding data */ - uint32_t ownd = tp->snd_max - tp->snd_una; + uint32_t ownd = tp->snd_nxt - tp->snd_una; u_int sent; #define iceildiv(n, d) (((n)+(d)-1) / (d)) @@ -1969,9 +1970,11 @@ fastretransmit: tp->snd_cwnd = ownd + (tp->t_dupacks - tp->snd_limited) * tp->t_maxseg; + tp->snd_ssthresh = tp->snd_cwnd; tcp_output(tp); tp->snd_cwnd = oldcwnd; - sent = tp->snd_max - oldsndmax; + tp->snd_ssthresh = oldssthresh; + sent = tp->snd_nxt - oldsndnxt; if (sent > tp->t_maxseg) { KASSERT((tp->t_dupacks == 2 && tp->snd_limited == 0) || Index: tcp_output.c =================================================================== RCS file: /j/dragonfly/dcvs/src/sys/netinet/tcp_output.c,v retrieving revision 1.25 diff -u -p -r1.25 tcp_output.c --- tcp_output.c 9 Mar 2005 06:54:34 -0000 1.25 +++ tcp_output.c 12 Mar 2005 22:23:00 -0000 @@ -193,13 +193,13 @@ tcp_output(tp) else tp->t_flags &= ~TF_LASTIDLE; - if (TCP_DO_SACK(tp) && tp->snd_nxt != tp->snd_max && + if (TCP_DO_SACK(tp) && (tp->snd_cwnd < tp->snd_ssthresh) && !IN_FASTRECOVERY(tp)) nsacked = tcp_sack_bytes_below(&tp->scb, tp->snd_nxt); again: /* Make use of SACK information when slow-starting after a RTO. */ - if (TCP_DO_SACK(tp) && tp->snd_nxt != tp->snd_max && + if (TCP_DO_SACK(tp) && (tp->snd_cwnd < tp->snd_ssthresh) && !IN_FASTRECOVERY(tp)) { tcp_seq old_snd_nxt = tp->snd_nxt; --------------030401020306030605040308--
文章代碼(AID): #12DF1k00 (DFBSD_bugs)
討論串 (同標題文章)
文章代碼(AID): #12DF1k00 (DFBSD_bugs)