Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Mar 2011 20:41:09 +0100
From:      Stefan `Sec` Zehl <sec@42.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-net@freebsd.org, Doug Barton <dougb@freebsd.org>
Subject:   Re: The tale of a TCP bug
Message-ID:  <20110325194109.GB25392@ice.42.org>
In-Reply-To: <201103250825.10674.jhb@freebsd.org>
References:  <4D8B99B4.4070404@FreeBSD.org> <201103241615.57852.jhb@freebsd.org> <20110324230235.GB90901@ice.42.org> <201103250825.10674.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Fri, Mar 25, 2011 at 08:25 -0400, John Baldwin wrote:
> Ah, ok.  Can you try this patch first (without the other)?  If it doesn't
> work then we can refine the patch above further.

I tried it completely unpatched and with your new patch. In both cases
that if() statement is not taken. 

Instrumenting this part of the code with printf()s shows that recwin is
65536 right after your patched if, but reduced to 65535 by the next
statment.

|  	if (recwin > (long)TCP_MAXWIN << tp->rcv_scale)
|  		recwin = (long)TCP_MAXWIN << tp->rcv_scale;

That's the same effect as in the the affected adv calculation:

% long adv = min(recwin, (long)TCP_MAXWIN << tp->rcv_scale) -
%       (tp->rcv_adv - tp->rcv_nxt);

recwin is 65535, but the min limits it to 65535.

CU,
    Sec
-- 
But anyway, once I did that, it ran fine!  Accelerated, full-screen.
Then I remembered I don't like Quake :-)



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