Changeset View
Changeset View
Standalone View
Standalone View
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 13,522 Lines • ▼ Show 20 Lines | #endif | ||||
/* Update the rcv time and perform idle reduction possibly */ | /* Update the rcv time and perform idle reduction possibly */ | ||||
if (tp->t_idle_reduce && | if (tp->t_idle_reduce && | ||||
(tp->snd_max == tp->snd_una) && | (tp->snd_max == tp->snd_una) && | ||||
(TICKS_2_USEC(ticks - tp->t_rcvtime) >= tp->t_rxtcur)) { | (TICKS_2_USEC(ticks - tp->t_rcvtime) >= tp->t_rxtcur)) { | ||||
counter_u64_add(rack_input_idle_reduces, 1); | counter_u64_add(rack_input_idle_reduces, 1); | ||||
rack_cc_after_idle(rack, tp); | rack_cc_after_idle(rack, tp); | ||||
} | } | ||||
tp->t_rcvtime = ticks; | tp->t_rcvtime = ticks; | ||||
/* Now what about ECN? */ | /* Now what about ECN of a chain of pure ACKs? */ | ||||
if (tcp_ecn_input_segment(tp, ae->flags, ae->codepoint)) | if (tcp_ecn_input_segment(tp, ae->flags, 0, ae->codepoint)) | ||||
rack_cong_signal(tp, CC_ECN, ae->ack, __LINE__); | rack_cong_signal(tp, CC_ECN, ae->ack, __LINE__); | ||||
#ifdef TCP_ACCOUNTING | #ifdef TCP_ACCOUNTING | ||||
/* Count for the specific type of ack in */ | /* Count for the specific type of ack in */ | ||||
counter_u64_add(tcp_cnt_counters[ae->ack_val_set], 1); | counter_u64_add(tcp_cnt_counters[ae->ack_val_set], 1); | ||||
if (tp->t_flags2 & TF2_TCP_ACCOUNTING) { | if (tp->t_flags2 & TF2_TCP_ACCOUNTING) { | ||||
tp->tcp_cnt_counters[ae->ack_val_set]++; | tp->tcp_cnt_counters[ae->ack_val_set]++; | ||||
} | } | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 773 Lines • ▼ Show 20 Lines | #ifdef STATS | ||||
stats_voi_update_abs_ulong(tp->t_stats, VOI_TCP_FRWIN, tiwin); | stats_voi_update_abs_ulong(tp->t_stats, VOI_TCP_FRWIN, tiwin); | ||||
#endif | #endif | ||||
if (tiwin > rack->r_ctl.rc_high_rwnd) | if (tiwin > rack->r_ctl.rc_high_rwnd) | ||||
rack->r_ctl.rc_high_rwnd = tiwin; | rack->r_ctl.rc_high_rwnd = tiwin; | ||||
/* | /* | ||||
* TCP ECN processing. XXXJTL: If we ever use ECN, we need to move | * TCP ECN processing. XXXJTL: If we ever use ECN, we need to move | ||||
* this to occur after we've validated the segment. | * this to occur after we've validated the segment. | ||||
*/ | */ | ||||
if (tcp_ecn_input_segment(tp, thflags, iptos)) | if (tcp_ecn_input_segment(tp, thflags, tlen, iptos)) | ||||
rack_cong_signal(tp, CC_ECN, th->th_ack, __LINE__); | rack_cong_signal(tp, CC_ECN, th->th_ack, __LINE__); | ||||
/* | /* | ||||
* If echoed timestamp is later than the current time, fall back to | * If echoed timestamp is later than the current time, fall back to | ||||
* non RFC1323 RTT calculation. Normalize timestamp if syncookies | * non RFC1323 RTT calculation. Normalize timestamp if syncookies | ||||
* were used when this connection was established. | * were used when this connection was established. | ||||
*/ | */ | ||||
if ((to.to_flags & TOF_TS) && (to.to_tsecr != 0)) { | if ((to.to_flags & TOF_TS) && (to.to_tsecr != 0)) { | ||||
▲ Show 20 Lines • Show All 6,627 Lines • Show Last 20 Lines |