Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Sep 2009 13:40:01 GMT
From:      Gaurav Goel <gaurav0287@gmail.com>
To:        freebsd-net@FreeBSD.org
Subject:   Re: kern/138652: TCP window scaling value calculated incorrectly?
Message-ID:  <200909101340.n8ADe1cZ058871@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/138652; it has been noted by GNATS.

From: Gaurav Goel <gaurav0287@gmail.com>
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, <gavin@freebsd.org> 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,<br><br>Please find the fix for the problem:<br><br><u><b>Replac=
 e</b></u><br><b><span style=3D"color: rgb(153, 0, 0); background-color: rgb=
 (255, 255, 255);">=C2=A0=C2=A0=C2=A0 while (tp-&gt;request_r_scale &lt; TCP=
 _MAX_WINSHIFT &amp;&amp;</span><br style=3D"color: rgb(153, 0, 0); backgrou=
 nd-color: rgb(255, 255, 255);">
 <span style=3D"color: rgb(153, 0, 0); background-color: rgb(255, 255, 255);=
 ">=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (TCP_MAXWIN &lt;&lt; tp-&gt;request=
 _r_scale) &lt; sb_max)</span><br style=3D"color: rgb(153, 0, 0); background=
 -color: rgb(255, 255, 255);"><span style=3D"color: rgb(153, 0, 0); backgrou=
 nd-color: rgb(255, 255, 255);">=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 tp-&gt=
 ;request_r_scale++;</span></b><br>
 <br><u><b>With</b></u><br><b><span style=3D"color: rgb(0, 153, 0);">unsigne=
 d int new_TCP_MAXWIN =3D TCP_MAXWIN;</span><br style=3D"color: rgb(0, 153, =
 0);"><span style=3D"color: rgb(0, 153, 0);">while (tp-&gt;request_r_scale &=
 lt; TCP_MAX_WINSHIFT)</span><br style=3D"color: rgb(0, 153, 0);">
 <span style=3D"color: rgb(0, 153, 0);">{</span><span style=3D"color: rgb(0,=
  153, 0);"></span><br style=3D"color: rgb(0, 153, 0);"><span style=3D"color=
 : rgb(0, 153, 0);">=C2=A0=C2=A0=C2=A0 if(new_TCP_MAXWIN &lt; sb_max)</span>=
 <br style=3D"color: rgb(0, 153, 0);">
 <span style=3D"color: rgb(0, 153, 0);">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
 =C2=A0 tp-&gt;request_r_scale++;</span><br style=3D"color: rgb(0, 153, 0);"=
 ><span style=3D"color: rgb(0, 153, 0);">=C2=A0=C2=A0=C2=A0 else</span><br s=
 tyle=3D"color: rgb(0, 153, 0);"><span style=3D"color: rgb(0, 153, 0);">=C2=
 =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break;</span></b><b><span style=3D"=
 color: rgb(0, 153, 0);"></span><br style=3D"color: rgb(0, 153, 0);">
 
 <span style=3D"color: rgb(0, 153, 0);"></span></b><b><span style=3D"color: =
 rgb(0, 153, 0);">=C2=A0=C2=A0=C2=A0 new_TCP_MAXWIN &lt;&lt;=3D1;</span></b>=
 <b><br style=3D"color: rgb(0, 153, 0);"></b><b><span style=3D"color: rgb(0,=
  153, 0);">=C2=A0=C2=A0=C2=A0 new_TCP_MAXWIN |=3D1;</span></b><b><br style=
 =3D"color: rgb(0, 153, 0);">
 
 </b><b><span style=3D"color: rgb(0, 153, 0);">}</span></b><br><br>Please in=
 form me if I am right/wrong.<br><br>Thanks,<br>Gaurav Goel<br><br><div clas=
 s=3D"gmail_quote">On Wed, Sep 9, 2009 at 7:59 PM,  <span dir=3D"ltr">&lt;<a=
  href=3D"mailto:gavin@freebsd.org">gavin@freebsd.org</a>&gt;</span> wrote:<=
 br>
 <blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Old Synopsis: TCP=
  window scaling value<br>
 New Synopsis: TCP window scaling value calculated incorrectly?<br>
 <br>
 State-Changed-From-To: feedback-&gt;open<br>
 State-Changed-By: gavin<br>
 State-Changed-When: Wed Sep 9 14:24:24 UTC 2009<br>
 State-Changed-Why:<br>
 Over to maintainer(s) for investigation<br>
 <br>
 <br>
 Responsible-Changed-From-To: gavin-&gt;freebsd-net<br>
 Responsible-Changed-By: gavin<br>
 Responsible-Changed-When: Wed Sep 9 14:24:24 UTC 2009<br>
 Responsible-Changed-Why:<br>
 Feedback was received, thanks!<br>
 <br>
 <a href=3D"http://www.freebsd.org/cgi/query-pr.cgi?pr=3D138652" target=3D"_=
 blank">http://www.freebsd.org/cgi/query-pr.cgi?pr=3D138652</a><br>;
 </blockquote></div><br><br clear=3D"all"><br>-- <br>Gaurav Goel<br>
 
 --000feae95a4f797c710473393423--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909101340.n8ADe1cZ058871>