mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-17 16:55:41 +08:00
Update to FreeBSD head 2017-08-01
Git mirror commit f5002f5e5f78cae9f0269d812dc0aedb0339312c. Update #3472.
This commit is contained in:
@@ -437,16 +437,9 @@ cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type)
|
||||
tp->t_dupacks = 0;
|
||||
tp->t_bytes_acked = 0;
|
||||
EXIT_RECOVERY(tp->t_flags);
|
||||
if (CC_ALGO(tp)->cong_signal == NULL) {
|
||||
/*
|
||||
* RFC5681 Section 3.1
|
||||
* ssthresh = max (FlightSize / 2, 2*SMSS) eq (4)
|
||||
*/
|
||||
tp->snd_ssthresh =
|
||||
max((tp->snd_max - tp->snd_una) / 2 / maxseg, 2)
|
||||
* maxseg;
|
||||
tp->snd_cwnd = maxseg;
|
||||
}
|
||||
tp->snd_ssthresh = max(2, min(tp->snd_wnd, tp->snd_cwnd) / 2 /
|
||||
maxseg) * maxseg;
|
||||
tp->snd_cwnd = maxseg;
|
||||
break;
|
||||
case CC_RTO_ERR:
|
||||
TCPSTAT_INC(tcps_sndrexmitbad);
|
||||
@@ -2013,8 +2006,10 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
|
||||
/*
|
||||
* If the state is SYN_SENT:
|
||||
* if seg contains a RST, then drop the connection.
|
||||
* if seg does not contain SYN, then drop it.
|
||||
* if seg contains a RST with valid ACK (SEQ.ACK has already
|
||||
* been verified), then drop the connection.
|
||||
* if seg contains a RST without an ACK, drop the seg.
|
||||
* if seg does not contain SYN, then drop the seg.
|
||||
* Otherwise this is an acceptable SYN segment
|
||||
* initialize tp->rcv_nxt and tp->irs
|
||||
* if seg contains ack then advance tp->snd_una
|
||||
@@ -2613,15 +2608,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
|
||||
if (awnd < tp->snd_ssthresh) {
|
||||
tp->snd_cwnd += maxseg;
|
||||
/*
|
||||
* RFC5681 Section 3.2 talks about cwnd
|
||||
* inflation on additional dupacks and
|
||||
* deflation on recovering from loss.
|
||||
*
|
||||
* We keep cwnd into check so that
|
||||
* we don't have to 'deflate' it when we
|
||||
* get out of recovery.
|
||||
*/
|
||||
if (tp->snd_cwnd > tp->snd_ssthresh)
|
||||
tp->snd_cwnd = tp->snd_ssthresh;
|
||||
}
|
||||
@@ -2661,22 +2647,19 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
TCPSTAT_INC(
|
||||
tcps_sack_recovery_episode);
|
||||
tp->sack_newdata = tp->snd_nxt;
|
||||
if (CC_ALGO(tp)->cong_signal == NULL)
|
||||
tp->snd_cwnd = maxseg;
|
||||
tp->snd_cwnd = maxseg;
|
||||
(void) tp->t_fb->tfb_tcp_output(tp);
|
||||
goto drop;
|
||||
}
|
||||
tp->snd_nxt = th->th_ack;
|
||||
if (CC_ALGO(tp)->cong_signal == NULL)
|
||||
tp->snd_cwnd = maxseg;
|
||||
tp->snd_cwnd = maxseg;
|
||||
(void) tp->t_fb->tfb_tcp_output(tp);
|
||||
KASSERT(tp->snd_limited <= 2,
|
||||
("%s: tp->snd_limited too big",
|
||||
__func__));
|
||||
if (CC_ALGO(tp)->cong_signal == NULL)
|
||||
tp->snd_cwnd = tp->snd_ssthresh +
|
||||
maxseg *
|
||||
(tp->t_dupacks - tp->snd_limited);
|
||||
tp->snd_cwnd = tp->snd_ssthresh +
|
||||
maxseg *
|
||||
(tp->t_dupacks - tp->snd_limited);
|
||||
if (SEQ_GT(onxt, tp->snd_nxt))
|
||||
tp->snd_nxt = onxt;
|
||||
goto drop;
|
||||
|
Reference in New Issue
Block a user