Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_var.h
Show First 20 Lines • Show All 1,149 Lines • ▼ Show 20 Lines | tcp_account_for_send(struct tcpcb *tp, uint32_t len, uint8_t is_rxt, | ||||
} | } | ||||
/* To get total bytes sent you must add t_snd_rxt_bytes to t_sndbytes */ | /* To get total bytes sent you must add t_snd_rxt_bytes to t_sndbytes */ | ||||
if (is_rxt) | if (is_rxt) | ||||
tp->t_snd_rxt_bytes += len; | tp->t_snd_rxt_bytes += len; | ||||
else | else | ||||
tp->t_sndbytes += len; | tp->t_sndbytes += len; | ||||
#ifdef KERN_TLS | #ifdef KERN_TLS | ||||
if (hw_tls && is_rxt) { | if (hw_tls && is_rxt && len != 0) { | ||||
uint64_t rexmit_percent = (1000ULL * tp->t_snd_rxt_bytes) / (10ULL * (tp->t_snd_rxt_bytes + tp->t_sndbytes)); | uint64_t rexmit_percent = (1000ULL * tp->t_snd_rxt_bytes) / (10ULL * (tp->t_snd_rxt_bytes + tp->t_sndbytes)); | ||||
if (rexmit_percent > ktls_ifnet_max_rexmit_pct) | if (rexmit_percent > ktls_ifnet_max_rexmit_pct) | ||||
ktls_disable_ifnet(tp); | ktls_disable_ifnet(tp); | ||||
} | } | ||||
#endif | #endif | ||||
} | } | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* _NETINET_TCP_VAR_H_ */ | #endif /* _NETINET_TCP_VAR_H_ */ |