免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4561 | 回复: 1
打印 上一主题 下一主题

TCP 拥塞控制慢启动中的tp->snd_cwnd_clamp的含义? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-04-17 15:36 |只看该作者 |倒序浏览

  1. static __inline__ void reno_cong_avoid(struct tcp_opt *tp)
  2. {
  3.         if (tp->snd_cwnd <= tp->snd_ssthresh) {
  4.                 /* In "safe" area, increase. */
  5.                 if (tp->snd_cwnd < tp->snd_cwnd_clamp)
  6.                         tp->snd_cwnd++;
  7.         } else {
  8.                 /* In dangerous area, increase slowly.
  9.                  * In theory this is tp->snd_cwnd += 1 / tp->snd_cwnd
  10.                  */
  11.                 if (tp->snd_cwnd_cnt >= bictcp_cwnd(tp)) {
  12.                         if (tp->snd_cwnd < tp->snd_cwnd_clamp)
  13.                                 tp->snd_cwnd++;
  14.                         tp->snd_cwnd_cnt=0;
  15.                 } else
  16.                         tp->snd_cwnd_cnt++;
  17.         }
  18.         tp->snd_cwnd_stamp = tcp_time_stamp;
  19. }
复制代码


snd_ssthresh是拥塞窗口的阈值,snd_cwnd是拥塞窗口的大小,那snd_cwnd_clamp是什么意思了?
我看kernel代码tcp_opt结构的定义中后面有注释
__u16        snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */
但是snd_cwnd_clamp和snd_ssthresh是什么关系。

论坛徽章:
0
2 [报告]
发表于 2009-05-06 14:45 |只看该作者

回复 #1 diker007 的帖子

这个很easy

snd_cwnd_clamp是拥塞窗口的最大值

snd_ssthresh是慢启动的阈值,当拥塞窗口小于snd_ssthresh,就处于慢启动阶段,大于就处于拥塞避免
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP