大佬教程收集整理的这篇文章主要介绍了关于CentOS 6.7之一个TCP重传细节的证实,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
if (do_lost || (tcp_is_fack(tp) && tcp_head_timedout(sk))) tcp_update_scoreboard(sk,fast_rexmit); tp->prr_delivered += newly_acked_sacked; tcp_update_cwnd_in_recovery(sk,newly_acked_sacked,fast_rexmit,flag); tcp_xmit_retransmit_queue(sk);
/* This function implements the PRR algorithm,specifcally the PRR-SSRB * (proportional rate reduction with slow start reduction bound) as described in * http://www.ietf.org/id/draft-mathis-tcpm-proportional-rate-reduction-01.txt. * It computes the number of packets to send (sndcnt) based on packets newly * delivered: * 1) If the packets in flight is larger than ssthresh,PRR spreads the * cwnd reductions across a full RTT. * 2) If packets in flight is lower than ssthresh (such as due to excess * losses and/or application stalls),do not perform any further cwnd * reductions,but instead slow start up to ssthresh. */ static void tcp_update_cwnd_in_recovery(struct sock *sk,int newly_acked_sacked,int fast_rexmit,int flag) { struct tcp_sock *tp = tcp_sk(sk); int sndcnt = 0; int delta = tp->snd_ssthresh - tcp_packets_in_flight(tp); if (tcp_packets_in_flight(tp) > tp->snd_ssthresh) { u64 dividend = (u64)tp->snd_ssthresh * tp->prr_delivered + tp->prior_cwnd - 1; sndcnt = div_u64(dividend,tp->prior_cwnd) - tp->prr_out; } else { sndcnt = min_t(int,delta,max_t(int,tp->prr_delivered - tp->prr_out,newly_acked_sacked) + 1); } sndcnt = max(sndcnt,(fast_rexmit ? 1 : 0)); tp->snd_cwnd = tcp_packets_in_flight(tp) + sndcnt; }这就是PRR了。通过rpm安装包的发布时间以及PRR草案正式变成标准的时间,我们可以看到RH对这个PRR patch的反应是多么的及时。
以上是大佬教程为你收集整理的关于CentOS 6.7之一个TCP重传细节的证实全部内容,希望文章能够帮你解决关于CentOS 6.7之一个TCP重传细节的证实所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。