Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_stacks/rack.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 1,419 Lines • ▼ Show 20 Lines | #ifdef NETFLIX_STATS | ||||
if (tp->t_state == TCPS_ESTABLISHED) | if (tp->t_state == TCPS_ESTABLISHED) | ||||
TCPSTAT_INC(tcps_idle_estrestarts); | TCPSTAT_INC(tcps_idle_estrestarts); | ||||
#endif | #endif | ||||
if (CC_ALGO(tp)->after_idle != NULL) | if (CC_ALGO(tp)->after_idle != NULL) | ||||
CC_ALGO(tp)->after_idle(tp->ccv); | CC_ALGO(tp)->after_idle(tp->ccv); | ||||
if (tp->snd_cwnd == 1) | if (tp->snd_cwnd == 1) | ||||
i_cwnd = tp->t_maxseg; /* SYN(-ACK) lost */ | i_cwnd = tp->t_maxseg; /* SYN(-ACK) lost */ | ||||
else if (V_tcp_initcwnd_segments) | |||||
i_cwnd = min((V_tcp_initcwnd_segments * tp->t_maxseg), | |||||
max(2 * tp->t_maxseg, V_tcp_initcwnd_segments * 1460)); | |||||
else if (V_tcp_do_rfc3390) | |||||
i_cwnd = min(4 * tp->t_maxseg, | |||||
max(2 * tp->t_maxseg, 4380)); | |||||
else { | |||||
/* Per RFC5681 Section 3.1 */ | |||||
if (tp->t_maxseg > 2190) | |||||
i_cwnd = 2 * tp->t_maxseg; | |||||
else if (tp->t_maxseg > 1095) | |||||
i_cwnd = 3 * tp->t_maxseg; | |||||
else | else | ||||
i_cwnd = 4 * tp->t_maxseg; | i_cwnd = tcp_compute_initwnd(tcp_maxseg(tp)); | ||||
} | |||||
if (reduce_largest) { | if (reduce_largest) { | ||||
/* | /* | ||||
* Do we reduce the largest cwnd to make | * Do we reduce the largest cwnd to make | ||||
* rack play nice on restart hptsi wise? | * rack play nice on restart hptsi wise? | ||||
*/ | */ | ||||
if (((struct tcp_rack *)tp->t_fb_ptr)->r_ctl.rc_rack_largest_cwnd > i_cwnd) | if (((struct tcp_rack *)tp->t_fb_ptr)->r_ctl.rc_rack_largest_cwnd > i_cwnd) | ||||
((struct tcp_rack *)tp->t_fb_ptr)->r_ctl.rc_rack_largest_cwnd = i_cwnd; | ((struct tcp_rack *)tp->t_fb_ptr)->r_ctl.rc_rack_largest_cwnd = i_cwnd; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 7,719 Lines • Show Last 20 Lines |