From owner-freebsd-net@FreeBSD.ORG Thu Sep 10 13:40:02 2009 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 202A41065676 for ; Thu, 10 Sep 2009 13:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0E47C8FC13 for ; Thu, 10 Sep 2009 13:40:02 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8ADe1Vu058872 for ; Thu, 10 Sep 2009 13:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8ADe1cZ058871; Thu, 10 Sep 2009 13:40:01 GMT (envelope-from gnats) Date: Thu, 10 Sep 2009 13:40:01 GMT Message-Id: <200909101340.n8ADe1cZ058871@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Gaurav Goel Cc: Subject: Re: kern/138652: TCP window scaling value calculated incorrectly? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Gaurav Goel List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Sep 2009 13:40:02 -0000 The following reply was made to PR kern/138652; it has been noted by GNATS. From: Gaurav Goel To: bug-followup@freebsd.org Cc: Subject: Re: kern/138652: TCP window scaling value calculated incorrectly? Date: Thu, 10 Sep 2009 19:00:37 +0530 --000feae95a4f797c710473393423 Content-Type: text/plain; charset=UTF-8 Dear Gavin, Please find the fix for the problem: *Replace* * while (tp->request_r_scale < TCP_MAX_WINSHIFT && (TCP_MAXWIN << tp->request_r_scale) < sb_max) tp->request_r_scale++;* *With* *unsigned int new_TCP_MAXWIN = TCP_MAXWIN; while (tp->request_r_scale < TCP_MAX_WINSHIFT) { if(new_TCP_MAXWIN < sb_max) tp->request_r_scale++; else break;** ** new_TCP_MAXWIN <<=1;** ** new_TCP_MAXWIN |=1;** **}* Please inform me if I am right/wrong. Thanks, Gaurav Goel On Wed, Sep 9, 2009 at 7:59 PM, wrote: > Old Synopsis: TCP window scaling value > New Synopsis: TCP window scaling value calculated incorrectly? > > State-Changed-From-To: feedback->open > State-Changed-By: gavin > State-Changed-When: Wed Sep 9 14:24:24 UTC 2009 > State-Changed-Why: > Over to maintainer(s) for investigation > > > Responsible-Changed-From-To: gavin->freebsd-net > Responsible-Changed-By: gavin > Responsible-Changed-When: Wed Sep 9 14:24:24 UTC 2009 > Responsible-Changed-Why: > Feedback was received, thanks! > > http://www.freebsd.org/cgi/query-pr.cgi?pr=138652 > -- Gaurav Goel --000feae95a4f797c710473393423 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear Gavin,

Please find the fix for the problem:

Replac= e
=C2=A0=C2=A0=C2=A0 while (tp->request_r_scale < TCP= _MAX_WINSHIFT &&
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 tp->= ;request_r_scale++;


With
unsigne= d int new_TCP_MAXWIN =3D TCP_MAXWIN;
while (tp->request_r_scale &= lt; TCP_MAX_WINSHIFT)
{
=C2=A0=C2=A0=C2=A0 if(new_TCP_MAXWIN < sb_max)=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 tp->request_r_scale++;
=C2=A0=C2=A0=C2=A0 else
=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break;

=C2=A0=C2=A0=C2=A0 new_TCP_MAXWIN <<=3D1;=
=C2=A0=C2=A0=C2=A0 new_TCP_MAXWIN |=3D1;
}

Please in= form me if I am right/wrong.

Thanks,
Gaurav Goel

On Wed, Sep 9, 2009 at 7:59 PM, <gavin@freebsd.org> wrote:<= br>
Old Synopsis: TCP= window scaling value
New Synopsis: TCP window scaling value calculated incorrectly?

State-Changed-From-To: feedback->open
State-Changed-By: gavin
State-Changed-When: Wed Sep 9 14:24:24 UTC 2009
State-Changed-Why:
Over to maintainer(s) for investigation


Responsible-Changed-From-To: gavin->freebsd-net
Responsible-Changed-By: gavin
Responsible-Changed-When: Wed Sep 9 14:24:24 UTC 2009
Responsible-Changed-Why:
Feedback was received, thanks!

http://www.freebsd.org/cgi/query-pr.cgi?pr=3D138652



--
Gaurav Goel
--000feae95a4f797c710473393423--