Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/cc/cc_htcp.c
Show First 20 Lines • Show All 319 Lines • ▼ Show 20 Lines | case CC_RTO: | ||||
* Grab the current time and record it so we know when the | * Grab the current time and record it so we know when the | ||||
* most recent congestion event was. Only record it when the | * most recent congestion event was. Only record it when the | ||||
* timeout has fired more than once, as there is a reasonable | * timeout has fired more than once, as there is a reasonable | ||||
* chance the first one is a false alarm and may not indicate | * chance the first one is a false alarm and may not indicate | ||||
* congestion. | * congestion. | ||||
*/ | */ | ||||
if (CCV(ccv, t_rxtshift) >= 2) | if (CCV(ccv, t_rxtshift) >= 2) | ||||
htcp_data->t_last_cong = ticks; | htcp_data->t_last_cong = ticks; | ||||
CCV(ccv, snd_ssthresh) = max(2 * mss, cwin / 2); | CCV(ccv, snd_ssthresh) = max((CCV(ccv, snd_max) - | ||||
CCV(ccv, snd_una)) / 2, 2 * mss); | |||||
CCV(ccv, snd_cwnd) = mss; | CCV(ccv, snd_cwnd) = mss; | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
static int | static int | ||||
htcp_mod_init(void) | htcp_mod_init(void) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines |