TCP拥塞控制算法 — CUBIC的补丁(二)

描述

 

以下是提交者Stephen Hemminger对这个patch的描述:

make ack train delta value a parameter

Make the spacing between ACK's that indicates a train a tuneable value like other bystart values.

 

代码

 

--- a/net/ipv4/tcp_cubic.c
+++ b/net/ipv4/tcp_cubic.c
@@ -52,6 +52,7 @@ static int tcp_friendliness __read_mostly = 1;
 static int hystart __read_mostly = 1;
 static int hystart_detect __read_mostly = HYSTART_ACK_TRAIN | HYSTART_DELAY;
 static int hystart_low_window __read_mostly = 16;
+static int hystart_ack_delta __read_mostly = 2;
 
 static u32 cube_rtt_scale __read_mostly;
 static u32 beta_scale __read_mostly;
@@ -75,6 +76,8 @@ MODULE_PARM_DESC(hystart_detect, "hyrbrid slow start detection mechanisms"
    " 1: packet-train 2: delay 3: both packet-train and delay");
 module_param(hystart_low_window, int, 0644);
 MODULE_PARM_DESC(hystart_low_window, "lower bound cwnd for hybrid slow start");
+module_param(hystart_ack_delta, int, 0644);
+MODULE_PARM_DESC(hystart_ack_delta, "spacing between ack's indicating train (msecs)");
 
 /* BIC TCP Parameters */
 struct bictcp {
@@ -343,7 +346,7 @@ static void hystart_update(struct sock *sk, u32 delay)
 
   /* first detection parameter - ack-train detection */
   if ((s32)(curr_jiffies - ca->last_jiffies) <=
-      msecs_to_jiffies(2)) {
+      msecs_to_jiffies(hystart_ack_delta)) {
    ca->last_jiffies = curr_jiffies;
    if ((s32) (curr_jiffies - ca->round_start) >
        ca->delay_min >> 4)

 

评价

 

把ACK序列号之间允许的时间间隔设置为一个可调参数,允许用户自行调整。这个补丁并不是必须的。

 

Author

 

zhangskd @ csdn blog



转载于:https://www.cnblogs.com/aiwz/archive/2013/03/02/6333352.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值