From patchwork Mon Mar 14 17:52:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: stephen hemminger X-Patchwork-Id: 86790 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 95E13B6F12 for ; Tue, 15 Mar 2011 05:02:17 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757139Ab1CNSCG (ORCPT ); Mon, 14 Mar 2011 14:02:06 -0400 Received: from suva.vyatta.com ([76.74.103.44]:58244 "EHLO suva.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757051Ab1CNSCD (ORCPT ); Mon, 14 Mar 2011 14:02:03 -0400 Received: from suva.vyatta.com (suva [127.0.0.1]) by suva.vyatta.com (8.13.7/8.13.7) with ESMTP id p2EI1M8l014832; Mon, 14 Mar 2011 11:01:23 -0700 Received: (from shemminger@localhost) by suva.vyatta.com (8.13.7/8.13.7/Submit) id p2EI1M3o014831; Mon, 14 Mar 2011 11:01:22 -0700 Message-Id: <20110314175439.471612260@vyatta.com> User-Agent: quilt/0.48-1 Date: Mon, 14 Mar 2011 10:52:14 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@vger.kernel.org Subject: [PATCH 3/7] tcp_cubic: make ack train delta value a parameter References: <20110314175211.788224699@vyatta.com> Content-Disposition: inline; filename=tcp-cubic-ackdelta.patch Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Make the spacing between ACK's that indicates a train a tuneable value like other hystart values. Signed-off-by: Stephen Hemminger --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/net/ipv4/tcp_cubic.c 2011-03-14 08:19:15.697936023 -0700 +++ b/net/ipv4/tcp_cubic.c 2011-03-14 08:19:18.361944814 -0700 @@ -52,6 +52,7 @@ static int tcp_friendliness __read_mostl 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, "hyrbri " 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 * /* 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)