From owner-freebsd-net@FreeBSD.ORG Mon Apr 6 10:20:01 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C71291065677 for ; Mon, 6 Apr 2009 10:20:01 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: from bizet.nethelp.no (bizet.nethelp.no [195.1.209.33]) by mx1.freebsd.org (Postfix) with SMTP id 121A28FC1F for ; Mon, 6 Apr 2009 10:20:00 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: (qmail 18860 invoked from network); 6 Apr 2009 10:19:59 -0000 Received: from bizet.nethelp.no (HELO localhost) (195.1.209.33) by bizet.nethelp.no with SMTP; 6 Apr 2009 10:19:59 -0000 Date: Mon, 06 Apr 2009 12:19:59 +0200 (CEST) Message-Id: <20090406.121959.74751582.sthaug@nethelp.no> To: bzeeb-lists@lists.zabbadoz.net From: sthaug@nethelp.no In-Reply-To: <20090405215842.C15361@maildrop.int.zabbadoz.net> References: <20090405.231044.74688369.sthaug@nethelp.no> <20090405214757.E15361@maildrop.int.zabbadoz.net> <20090405215842.C15361@maildrop.int.zabbadoz.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: IPv6 window scaling factor always 1 on initial SYN X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2009 10:20:02 -0000 > Ok, both versions had: < so->so_rcv.sb_hiwat) > > http://svn.freebsd.org/viewvc/base?view=revision&revision=166403 > > changed it for IPv4 the first time, > > http://svn.freebsd.org/viewvc/base?view=revision&revision=172795 > > changed it a second time for IPv4. > > Noone changed the IPv6 version. > > The syncache already seems to do it for both v4/v6 (common code). > > Can you try changing it to < sb_max) for IPv6 as well and see if > things work (better) for you? I changed it, and that worked like a dream. Now I get basically the same throughput with IPv4 and IPv6. There are of course still issues like lots of IPv6 tunnels that add extra latency - but that's not the fault of FreeBSD. Anyway, thanks for your work. Below is a context diff (against 7-STABLE cvsupped last night). Do we need a PR to get this into FreeBSD? Steinar Haug, Nethelp consulting, sthaug@nethelp.no ---------------------------------------------------------------------- *** tcp_usrreq.c.orig Sun Apr 5 22:51:49 2009 --- tcp_usrreq.c Mon Apr 6 11:15:11 2009 *************** *** 1153,1159 **** /* Compute window scaling to request. */ while (tp->request_r_scale < TCP_MAX_WINSHIFT && ! (TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat) tp->request_r_scale++; soisconnecting(so); --- 1153,1159 ---- /* Compute window scaling to request. */ while (tp->request_r_scale < TCP_MAX_WINSHIFT && ! (TCP_MAXWIN << tp->request_r_scale) < sb_max) tp->request_r_scale++; soisconnecting(so);