From owner-freebsd-net@FreeBSD.ORG Wed Mar 5 06:22:52 2014 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96D9FA6B; Wed, 5 Mar 2014 06:22:52 +0000 (UTC) Received: from mail-ee0-x22b.google.com (mail-ee0-x22b.google.com [IPv6:2a00:1450:4013:c00::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B673099A; Wed, 5 Mar 2014 06:22:51 +0000 (UTC) Received: by mail-ee0-f43.google.com with SMTP id e53so201593eek.30 for ; Tue, 04 Mar 2014 22:22:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CASjv9kIrDHL110k6cX9m2WFXp35s0v08wnDDNy12tg=; b=panMCx9uioHzdU4TFM5SrR633e9xsQGQkI9LvKsXW+wYKh6j4IVb0KeQrtzTKXYwh3 cQqCH5Lj91bB7PeuVX/ErUZMZWGu3lr5yihZ2FOlA61KwuAdGlCxtAr1brX85SdeF4K9 +inIq6YH+m32ydsHRqbbHm4ZwH0K/uuzbHfaVxdVg6c0q90AdgUi6FkiQOzDzmjuFQtp GElj3M3ebd8a4q+i/LwN4yMggh27iVbA3x4mpKkPAq6SD+27SNFEwa4wt5jxBucEZyOJ R09BmeeGSDEoVa8IbH80R1+wav2tg4KlxwEo/7Dr+e8kYoGXqgvtYrnlIs8TjDABVRUQ uuYQ== MIME-Version: 1.0 X-Received: by 10.14.9.134 with SMTP id 6mr3612983eet.70.1394000570169; Tue, 04 Mar 2014 22:22:50 -0800 (PST) Received: by 10.14.65.4 with HTTP; Tue, 4 Mar 2014 22:22:50 -0800 (PST) In-Reply-To: <53169C19.5020008@freebsd.org> References: <201307051458.r65EwObo066269@svn.freebsd.org> <520AED2F.4050001@freebsd.org> <520BB3F0.4020506@freebsd.org> <520C4F03.9040601@freebsd.org> <5316413D.7050000@FreeBSD.org> <53169C19.5020008@freebsd.org> Date: Tue, 4 Mar 2014 22:22:50 -0800 Message-ID: Subject: Re: TCP Initial Window 10 MFC From: hiren panchasara To: Lawrence Stewart Content-Type: text/plain; charset=UTF-8 Cc: Andre Oppermann , koobs@freebsd.org, "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2014 06:22:52 -0000 On Tue, Mar 4, 2014 at 7:38 PM, Lawrence Stewart wrote: > I lost the battle of wills on this topic and 10.0 shipped with IW10 > enabled by default :( > > As for having it configurable, it is a trivial patch which perhaps, > Hiren, you might be willing to take a stab at? I obviously did not > manage to carve out the time last year to push forward with the agenda I > proposed in this thread, but I will get back to it at some point. Hi Lawrence, Let's fix it the right way if possible. Below is a rough/untested quick patch I came up with. Is this how you were planning to have "nonstandard" sysctl knob designed? Index: sys/netinet/tcp_input.c =================================================================== --- sys/netinet/tcp_input.c (revision 260833) +++ sys/netinet/tcp_input.c (working copy) @@ -164,6 +164,19 @@ &VNET_NAME(tcp_do_initcwnd10), 0, "Enable RFC 6928 (Increasing initial CWND to 10)"); +SYSCTL_NODE(_net_inet_tcp, OID_AUTO, nonstandard, CTLFLAG_RW, 0, + "Nonstandard TCP extensions"); + +VNET_DEFINE(int, tcp_nonstandard_allowed) = 0; +SYSCTL_VNET_INT(_net_inet_tcp_nonstandard, OID_AUTO, allowed, CTLFLAG_RW, + &VNET_NAME(tcp_nonstandard_allowed), 0, + "Allow nonstandard TCP extensions"); + +VNET_DEFINE(int, tcp_nonstandard_initcwnd) = 0; +SYSCTL_VNET_INT(_net_inet_tcp_nonstandard, OID_AUTO, initcwnd, CTLFLAG_RW, + &VNET_NAME(tcp_nonstandard_initcwnd), 0, + "Slow-start flight size (initial congestion window)"); + VNET_DEFINE(int, tcp_do_rfc3465) = 1; SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, rfc3465, CTLFLAG_RW, &VNET_NAME(tcp_do_rfc3465), 0, @@ -368,6 +381,8 @@ */ if (tp->snd_cwnd == 1) tp->snd_cwnd = tp->t_maxseg; /* SYN(-ACK) lost */ + else if (V_tcp_nonstandard_allowed && V_tcp_nonstandard_initcwnd) + tp->snd_cwnd = V_tcp_nonstandard_initcwnd * tp->t_maxseg; else if (V_tcp_do_initcwnd10) tp->snd_cwnd = min(10 * tp->t_maxseg, max(2 * tp->t_maxseg, 14600)); Index: sys/netinet/tcp_var.h =================================================================== --- sys/netinet/tcp_var.h (revision 260833) +++ sys/netinet/tcp_var.h (working copy) @@ -610,6 +610,7 @@ VNET_DECLARE(int, tcp_delack_enabled); VNET_DECLARE(int, tcp_do_rfc3390); VNET_DECLARE(int, tcp_do_initcwnd10); +VNET_DECLARE(int, tcp_nonstandard_allowed); +VNET_DECLARE(int, tcp_nonstandard_initcwnd); VNET_DECLARE(int, tcp_sendspace); VNET_DECLARE(int, tcp_recvspace); VNET_DECLARE(int, path_mtu_discovery); @@ -622,6 +623,7 @@ #define V_tcp_delack_enabled VNET(tcp_delack_enabled) #define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390) #define V_tcp_do_initcwnd10 VNET(tcp_do_initcwnd10) +#define V_tcp_nonstandard_allowed VNET(tcp_nonstandard_allowed) +#define V_tcp_nonstandard_initcwnd VNET(tcp_nonstandard_initcwnd) #define V_tcp_sendspace VNET(tcp_sendspace) #define V_tcp_recvspace VNET(tcp_recvspace) #define V_path_mtu_discovery VNET(path_mtu_discovery)