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 12,744 Lines • ▼ Show 20 Lines | if (sack_rxmit) { | ||||
if ((rsm->r_flags & RACK_HAS_FIN) == 0) | if ((rsm->r_flags & RACK_HAS_FIN) == 0) | ||||
flags &= ~TH_FIN; | flags &= ~TH_FIN; | ||||
} else { | } else { | ||||
if (SEQ_LT(tp->snd_nxt + len, tp->snd_una + | if (SEQ_LT(tp->snd_nxt + len, tp->snd_una + | ||||
sbused(sb))) | sbused(sb))) | ||||
flags &= ~TH_FIN; | flags &= ~TH_FIN; | ||||
} | } | ||||
} | } | ||||
recwin = sbspace(&so->so_rcv); | recwin = lmin(lmax(sbspace(&so->so_rcv), 0), | ||||
(long)TCP_MAXWIN << tp->rcv_scale); | |||||
/* | /* | ||||
* Sender silly window avoidance. We transmit under the following | * Sender silly window avoidance. We transmit under the following | ||||
* conditions when len is non-zero: | * conditions when len is non-zero: | ||||
* | * | ||||
* - We have a full segment (or more with TSO) - This is the last | * - We have a full segment (or more with TSO) - This is the last | ||||
* buffer in a write()/send() and we are either idle or running | * buffer in a write()/send() and we are either idle or running | ||||
* NODELAY - we've timed out (e.g. persist timer) - we have more | * NODELAY - we've timed out (e.g. persist timer) - we have more | ||||
▲ Show 20 Lines • Show All 889 Lines • ▼ Show 20 Lines | if (flags & TH_RST) { | ||||
recwin = 0; | recwin = 0; | ||||
} else { | } else { | ||||
if (recwin < (long)(so->so_rcv.sb_hiwat / 4) && | if (recwin < (long)(so->so_rcv.sb_hiwat / 4) && | ||||
recwin < (long)segsiz) | recwin < (long)segsiz) | ||||
recwin = 0; | recwin = 0; | ||||
if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt) && | if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt) && | ||||
recwin < (long)(tp->rcv_adv - tp->rcv_nxt)) | recwin < (long)(tp->rcv_adv - tp->rcv_nxt)) | ||||
recwin = (long)(tp->rcv_adv - tp->rcv_nxt); | recwin = (long)(tp->rcv_adv - tp->rcv_nxt); | ||||
if (recwin > (long)TCP_MAXWIN << tp->rcv_scale) | |||||
recwin = (long)TCP_MAXWIN << tp->rcv_scale; | |||||
} | } | ||||
/* | /* | ||||
* According to RFC1323 the window field in a SYN (i.e., a <SYN> or | * According to RFC1323 the window field in a SYN (i.e., a <SYN> or | ||||
* <SYN,ACK>) segment itself is never scaled. The <SYN,ACK> case is | * <SYN,ACK>) segment itself is never scaled. The <SYN,ACK> case is | ||||
* handled in syncache. | * handled in syncache. | ||||
*/ | */ | ||||
if (flags & TH_SYN) | if (flags & TH_SYN) | ||||
▲ Show 20 Lines • Show All 1,479 Lines • Show Last 20 Lines |