- 论坛徽章:
- 0
|
- static __inline__ void reno_cong_avoid(struct tcp_opt *tp)
- {
- if (tp->snd_cwnd <= tp->snd_ssthresh) {
- /* In "safe" area, increase. */
- if (tp->snd_cwnd < tp->snd_cwnd_clamp)
- tp->snd_cwnd++;
- } else {
- /* In dangerous area, increase slowly.
- * In theory this is tp->snd_cwnd += 1 / tp->snd_cwnd
- */
- if (tp->snd_cwnd_cnt >= bictcp_cwnd(tp)) {
- if (tp->snd_cwnd < tp->snd_cwnd_clamp)
- tp->snd_cwnd++;
- tp->snd_cwnd_cnt=0;
- } else
- tp->snd_cwnd_cnt++;
- }
- tp->snd_cwnd_stamp = tcp_time_stamp;
- }
复制代码
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是什么关系。 |
|