Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_input.c
Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | SYSCTL_INT(_net_inet_tcp, OID_AUTO, delayed_ack, CTLFLAG_VNET | CTLFLAG_RW, | ||||
&VNET_NAME(tcp_delack_enabled), 0, | &VNET_NAME(tcp_delack_enabled), 0, | ||||
"Delay ACK to try and piggyback it onto a data packet"); | "Delay ACK to try and piggyback it onto a data packet"); | ||||
VNET_DEFINE(int, drop_synfin) = 0; | VNET_DEFINE(int, drop_synfin) = 0; | ||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, drop_synfin, CTLFLAG_VNET | CTLFLAG_RW, | SYSCTL_INT(_net_inet_tcp, OID_AUTO, drop_synfin, CTLFLAG_VNET | CTLFLAG_RW, | ||||
&VNET_NAME(drop_synfin), 0, | &VNET_NAME(drop_synfin), 0, | ||||
"Drop TCP packets with SYN+FIN set"); | "Drop TCP packets with SYN+FIN set"); | ||||
VNET_DEFINE(int, tcp_do_newcwv) = 0; | |||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, newcwv, CTLFLAG_VNET | CTLFLAG_RW, | |||||
&VNET_NAME(tcp_do_newcwv), 0, | |||||
"Enable New Congestion Window Validation per RFC7661"); | |||||
VNET_DEFINE(int, tcp_do_rfc6675_pipe) = 0; | VNET_DEFINE(int, tcp_do_rfc6675_pipe) = 0; | ||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc6675_pipe, CTLFLAG_VNET | CTLFLAG_RW, | SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc6675_pipe, CTLFLAG_VNET | CTLFLAG_RW, | ||||
&VNET_NAME(tcp_do_rfc6675_pipe), 0, | &VNET_NAME(tcp_do_rfc6675_pipe), 0, | ||||
"Use calculated pipe/in-flight bytes per RFC 6675"); | "Use calculated pipe/in-flight bytes per RFC 6675"); | ||||
VNET_DEFINE(int, tcp_do_rfc3042) = 1; | VNET_DEFINE(int, tcp_do_rfc3042) = 1; | ||||
SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_VNET | CTLFLAG_RW, | SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_VNET | CTLFLAG_RW, | ||||
&VNET_NAME(tcp_do_rfc3042), 0, | &VNET_NAME(tcp_do_rfc3042), 0, | ||||
▲ Show 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | |||||
void | void | ||||
cc_ack_received(struct tcpcb *tp, struct tcphdr *th, uint16_t nsegs, | cc_ack_received(struct tcpcb *tp, struct tcphdr *th, uint16_t nsegs, | ||||
uint16_t type) | uint16_t type) | ||||
{ | { | ||||
INP_WLOCK_ASSERT(tp->t_inpcb); | INP_WLOCK_ASSERT(tp->t_inpcb); | ||||
tp->ccv->nsegs = nsegs; | tp->ccv->nsegs = nsegs; | ||||
tp->ccv->bytes_this_ack = BYTES_THIS_ACK(tp, th); | tp->ccv->bytes_this_ack = BYTES_THIS_ACK(tp, th); | ||||
if (tp->snd_cwnd <= tp->snd_wnd) | if ((!V_tcp_do_newcwv && (tp->snd_cwnd <= tp->snd_wnd)) || | ||||
(V_tcp_do_newcwv && (tp->snd_cwnd <= tp->snd_wnd) && | |||||
(tp->snd_cwnd < (tcp_compute_pipe(tp) * 2)))) | |||||
tp->ccv->flags |= CCF_CWND_LIMITED; | tp->ccv->flags |= CCF_CWND_LIMITED; | ||||
else | else | ||||
tp->ccv->flags &= ~CCF_CWND_LIMITED; | tp->ccv->flags &= ~CCF_CWND_LIMITED; | ||||
if (type == CC_ACK) { | if (type == CC_ACK) { | ||||
if (tp->snd_cwnd > tp->snd_ssthresh) { | if (tp->snd_cwnd > tp->snd_ssthresh) { | ||||
tp->t_bytes_acked += min(tp->ccv->bytes_this_ack, | tp->t_bytes_acked += min(tp->ccv->bytes_this_ack, | ||||
nsegs * V_tcp_abc_l_var * tcp_maxseg(tp)); | nsegs * V_tcp_abc_l_var * tcp_maxseg(tp)); | ||||
▲ Show 20 Lines • Show All 3,472 Lines • Show Last 20 Lines |