diff options
-rw-r--r-- | sys/netinet/tcp_input.c | 42 | ||||
-rw-r--r-- | sys/netinet/tcp_output.c | 6 | ||||
-rw-r--r-- | sys/netinet/tcp_timer.c | 6 | ||||
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_var.h | 8 |
5 files changed, 25 insertions, 41 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 81362ad1b37..5b28a0fd020 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.55 1999/12/21 15:41:07 itojun Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.56 1999/12/21 17:49:28 provos Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -837,14 +837,14 @@ findpcb: ND6_HINT(tp); sbdrop(&so->so_snd, acked); tp->snd_una = th->th_ack; -#if defined(TCP_SACK) || defined(TCP_NEWRENO) +#if defined(TCP_SACK) /* * We want snd_last to track snd_una so * as to avoid sequence wraparound problems * for very large transfers. */ tp->snd_last = tp->snd_una; -#endif /* TCP_SACK or TCP_NEWRENO */ +#endif /* TCP_SACK */ #if defined(TCP_SACK) && defined(TCP_FACK) tp->snd_fack = tp->snd_una; tp->retran_data = 0; @@ -1108,9 +1108,9 @@ findpcb: #endif /* !TCP_COMPAT_42 */ tp->irs = th->th_seq; tcp_sendseqinit(tp); -#if defined (TCP_SACK) || defined (TCP_NEWRENO) +#if defined (TCP_SACK) tp->snd_last = tp->snd_una; -#endif /* TCP_SACK || TCP_NEWRENO */ +#endif /* TCP_SACK */ #if defined(TCP_SACK) && defined(TCP_FACK) tp->snd_fack = tp->snd_una; tp->retran_data = 0; @@ -1545,7 +1545,7 @@ trimthenstep6: ulmin(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_maxseg; -#if defined(TCP_SACK) || defined(TCP_NEWRENO) +#if defined(TCP_SACK) if (SEQ_LT(th->th_ack, tp->snd_last)){ /* * False fast retx after @@ -1560,7 +1560,7 @@ trimthenstep6: if (win < 2) win = 2; tp->snd_ssthresh = win * tp->t_maxseg; -#if defined(TCP_SACK) || defined(TCP_NEWRENO) +#if defined(TCP_SACK) tp->snd_last = tp->snd_max; #endif #ifdef TCP_SACK @@ -1631,23 +1631,7 @@ trimthenstep6: * If the congestion window was inflated to account * for the other side's cached packets, retract it. */ -#ifdef TCP_NEWRENO - if (tp->t_dupacks >= tcprexmtthresh && !tcp_newreno(tp, th)) { - /* Out of fast recovery */ - tp->snd_cwnd = tp->snd_ssthresh; - /* - * Window inflation should have left us with approx. - * snd_ssthresh outstanding data. But in case we - * would be inclined to send a burst, better to do - * it via the slow start mechanism. - */ - if (tcp_seq_subtract(tp->snd_max, th->th_ack) < - tp->snd_ssthresh) - tp->snd_cwnd = tcp_seq_subtract(tp->snd_max, - th->th_ack) + tp->t_maxseg; - tp->t_dupacks = 0; - } -#elif defined(TCP_SACK) +#if defined(TCP_SACK) if (!tp->sack_disable) { if (tp->t_dupacks >= tcprexmtthresh) { /* Check for a partial ACK */ @@ -1688,7 +1672,7 @@ trimthenstep6: tp->t_dupacks = 0; } } -#else /* else neither TCP_NEWRENO nor TCP_SACK */ +#else /* else no TCP_SACK */ if (tp->t_dupacks >= tcprexmtthresh && tp->snd_cwnd > tp->snd_ssthresh) tp->snd_cwnd = tp->snd_ssthresh; @@ -1740,7 +1724,7 @@ trimthenstep6: if (cw > tp->snd_ssthresh) incr = incr * incr / cw; -#if defined (TCP_NEWRENO) || defined (TCP_SACK) +#if defined (TCP_SACK) if (SEQ_GEQ(th->th_ack, tp->snd_last)) #endif tp->snd_cwnd = min(cw + incr, TCP_MAXWIN<<tp->snd_scale); @@ -2178,7 +2162,7 @@ tcp_dooptions(tp, cp, cnt, th, ts_present, ts_val, ts_ecr) (void) tcp_mss(tp, mss); /* sets t_maxseg */ } -#if defined(TCP_SACK) || defined(TCP_NEWRENO) +#if defined(TCP_SACK) u_long tcp_seq_subtract(a, b) u_long a, b; @@ -2911,7 +2895,7 @@ tcp_mss(tp, offer) } #endif /* TUBA_INCLUDE */ -#if defined(TCP_NEWRENO) || defined (TCP_SACK) +#if defined (TCP_SACK) /* * Checks for partial ack. If partial ack arrives, force the retransmission * of the next unacknowledged segment, do not clear tp->t_dupacks, and return @@ -2953,4 +2937,4 @@ tcp_newreno(tp, th) } return 0; } -#endif /* TCP_NEWRENO || TCP_SACK */ +#endif /* TCP_SACK */ diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 593748d0d41..fdccb07e017 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_output.c,v 1.27 1999/12/15 16:37:20 provos Exp $ */ +/* $OpenBSD: tcp_output.c,v 1.28 1999/12/21 17:49:28 provos Exp $ */ /* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */ /* @@ -187,7 +187,7 @@ tcp_output(tp) int i, sack_rxmit = 0; struct sackhole *p; #endif -#if defined(TCP_SACK) || defined(TCP_NEWRENO) +#if defined(TCP_SACK) int maxburst = TCP_MAXBURST; #endif #ifdef TCP_SIGNATURE @@ -1061,7 +1061,7 @@ out: tp->rcv_adv = tp->rcv_nxt + win; tp->last_ack_sent = tp->rcv_nxt; tp->t_flags &= ~(TF_ACKNOW|TF_DELACK); -#if defined(TCP_SACK) || defined(TCP_NEWRENO) +#if defined(TCP_SACK) if (sendalot && --maxburst) #else if (sendalot) diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 591dc18d7d1..ccc114118bf 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_timer.c,v 1.15 1999/11/15 05:50:59 hugh Exp $ */ +/* $OpenBSD: tcp_timer.c,v 1.16 1999/12/21 17:49:28 provos Exp $ */ /* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */ /* @@ -250,13 +250,13 @@ tcp_timers(tp, timer) tp->t_srtt = 0; } tp->snd_nxt = tp->snd_una; -#if defined(TCP_SACK) || defined(TCP_NEWRENO) +#if defined(TCP_SACK) /* * Note: We overload snd_last to function also as the * snd_last variable described in RFC 2582 */ tp->snd_last = tp->snd_max; -#endif /* TCP_SACK or TCP_NEWRENO */ +#endif /* TCP_SACK */ /* * If timing a segment in this window, stop the timer. */ diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index eba6162e263..093739ad071 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_usrreq.c,v 1.38 1999/12/20 16:06:25 itojun Exp $ */ +/* $OpenBSD: tcp_usrreq.c,v 1.39 1999/12/21 17:49:28 provos Exp $ */ /* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */ /* @@ -352,7 +352,7 @@ tcp_usrreq(so, req, m, nam, control) tcp_iss += arc4random() % TCP_ISSINCR + 1; #endif /* !TCP_COMPAT_42 */ tcp_sendseqinit(tp); -#if defined(TCP_SACK) || defined(TCP_NEWRENO) +#if defined(TCP_SACK) tp->snd_last = tp->snd_una; #endif #if defined(TCP_SACK) && defined(TCP_FACK) diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index c22b3b8c61d..47c8ecd06c5 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_var.h,v 1.25 1999/12/08 06:50:20 itojun Exp $ */ +/* $OpenBSD: tcp_var.h,v 1.26 1999/12/21 17:49:28 provos Exp $ */ /* $NetBSD: tcp_var.h,v 1.17 1996/02/13 23:44:24 christos Exp $ */ /* @@ -103,7 +103,7 @@ struct tcpcb { int retran_data; /* amount of outstanding retx. data */ #endif /* TCP_FACK */ #endif /* TCP_SACK */ -#if defined(TCP_SACK) || defined(TCP_NEWRENO) +#if defined(TCP_SACK) tcp_seq snd_last; /* for use in fast recovery */ #endif /* receive sequence variables */ @@ -383,10 +383,10 @@ int tcp_sack_partialack __P((struct tcpcb *, struct tcphdr *)); void tcp_print_holes __P((struct tcpcb *tp)); #endif #endif /* TCP_SACK */ -#if defined(TCP_NEWRENO) || defined(TCP_SACK) +#if defined(TCP_SACK) int tcp_newreno __P((struct tcpcb *, struct tcphdr *)); u_long tcp_seq_subtract __P((u_long, u_long )); -#endif /* TCP_NEWRENO || TCP_SACK */ +#endif /* TCP_SACK */ #ifdef TCP_SIGNATURE int tcp_signature_apply __P((caddr_t, caddr_t, unsigned int)); #endif /* TCP_SIGNATURE */ |