Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/cc/cc.c
| Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | |||||
| /* | /* | ||||
| * Have a sane default if no CC_DEFAULT is specified in the kernel config file. | * Have a sane default if no CC_DEFAULT is specified in the kernel config file. | ||||
| */ | */ | ||||
| #ifndef CC_DEFAULT | #ifndef CC_DEFAULT | ||||
| #define CC_DEFAULT "newreno" | #define CC_DEFAULT "newreno" | ||||
| #endif | #endif | ||||
| uint32_t hystart_minrtt_thresh = 4000; | |||||
| uint32_t hystart_maxrtt_thresh = 16000; | |||||
| uint32_t hystart_n_rttsamples = 8; | |||||
| uint32_t hystart_css_growth_div = 4; | |||||
| uint32_t hystart_css_rounds = 5; | |||||
| uint32_t hystart_bblogs = 0; | |||||
| MALLOC_DEFINE(M_CC_MEM, "CC Mem", "Congestion Control State memory"); | MALLOC_DEFINE(M_CC_MEM, "CC Mem", "Congestion Control State memory"); | ||||
| /* | /* | ||||
| * List of available cc algorithms on the current system. First element | * List of available cc algorithms on the current system. First element | ||||
| * is used as the system default CC algorithm. | * is used as the system default CC algorithm. | ||||
| */ | */ | ||||
| struct cc_head cc_list = STAILQ_HEAD_INITIALIZER(cc_list); | struct cc_head cc_list = STAILQ_HEAD_INITIALIZER(cc_list); | ||||
| ▲ Show 20 Lines • Show All 481 Lines • ▼ Show 20 Lines | SYSCTL_PROC(_net_inet_tcp_cc, OID_AUTO, algorithm, | ||||
| CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, | CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, | ||||
| NULL, 0, cc_default_algo, "A", | NULL, 0, cc_default_algo, "A", | ||||
| "Default congestion control algorithm"); | "Default congestion control algorithm"); | ||||
| SYSCTL_PROC(_net_inet_tcp_cc, OID_AUTO, available, | SYSCTL_PROC(_net_inet_tcp_cc, OID_AUTO, available, | ||||
| CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, | CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, | ||||
| NULL, 0, cc_list_available, "A", | NULL, 0, cc_list_available, "A", | ||||
| "List available congestion control algorithms"); | "List available congestion control algorithms"); | ||||
| SYSCTL_NODE(_net_inet_tcp_cc, OID_AUTO, hystartplusplus, | |||||
| CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, | |||||
| "New Reno related HyStart++ settings"); | |||||
| SYSCTL_UINT(_net_inet_tcp_cc_hystartplusplus, OID_AUTO, minrtt_thresh, | |||||
| CTLFLAG_RW, | |||||
| &hystart_minrtt_thresh, 4000, | |||||
| "HyStarts++ minimum RTT thresh used in clamp (in microseconds)"); | |||||
| SYSCTL_UINT(_net_inet_tcp_cc_hystartplusplus, OID_AUTO, maxrtt_thresh, | |||||
| CTLFLAG_RW, | |||||
| &hystart_maxrtt_thresh, 16000, | |||||
| "HyStarts++ maximum RTT thresh used in clamp (in microseconds)"); | |||||
| SYSCTL_UINT(_net_inet_tcp_cc_hystartplusplus, OID_AUTO, n_rttsamples, | |||||
| CTLFLAG_RW, | |||||
| &hystart_n_rttsamples, 8, | |||||
| "The number of RTT samples that must be seen to consider HyStart++"); | |||||
| SYSCTL_UINT(_net_inet_tcp_cc_hystartplusplus, OID_AUTO, css_growth_div, | |||||
| CTLFLAG_RW, | |||||
| &hystart_css_growth_div, 4, | |||||
| "The divisor to the growth when in Hystart++ CSS"); | |||||
| SYSCTL_UINT(_net_inet_tcp_cc_hystartplusplus, OID_AUTO, css_rounds, | |||||
| CTLFLAG_RW, | |||||
| &hystart_css_rounds, 5, | |||||
| "The number of rounds HyStart++ lasts in CSS before falling to CA"); | |||||
| SYSCTL_UINT(_net_inet_tcp_cc_hystartplusplus, OID_AUTO, bblogs, | |||||
| CTLFLAG_RW, | |||||
| &hystart_bblogs, 0, | |||||
| "Do we enable HyStart++ Black Box logs to be generated if BB logging is on"); | |||||
| VNET_DEFINE(int, cc_do_abe) = 0; | VNET_DEFINE(int, cc_do_abe) = 0; | ||||
| SYSCTL_INT(_net_inet_tcp_cc, OID_AUTO, abe, CTLFLAG_VNET | CTLFLAG_RW, | SYSCTL_INT(_net_inet_tcp_cc, OID_AUTO, abe, CTLFLAG_VNET | CTLFLAG_RW, | ||||
| &VNET_NAME(cc_do_abe), 0, | &VNET_NAME(cc_do_abe), 0, | ||||
| "Enable draft-ietf-tcpm-alternativebackoff-ecn (TCP Alternative Backoff with ECN)"); | "Enable draft-ietf-tcpm-alternativebackoff-ecn (TCP Alternative Backoff with ECN)"); | ||||
| VNET_DEFINE(int, cc_abe_frlossreduce) = 0; | VNET_DEFINE(int, cc_abe_frlossreduce) = 0; | ||||
| SYSCTL_INT(_net_inet_tcp_cc, OID_AUTO, abe_frlossreduce, CTLFLAG_VNET | CTLFLAG_RW, | SYSCTL_INT(_net_inet_tcp_cc, OID_AUTO, abe_frlossreduce, CTLFLAG_VNET | CTLFLAG_RW, | ||||
| &VNET_NAME(cc_abe_frlossreduce), 0, | &VNET_NAME(cc_abe_frlossreduce), 0, | ||||
| "Apply standard beta instead of ABE-beta during ECN-signalled congestion " | "Apply standard beta instead of ABE-beta during ECN-signalled congestion " | ||||
| "recovery episodes if loss also needs to be repaired"); | "recovery episodes if loss also needs to be repaired"); | ||||