netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: rcv_wnd = init_cwnd*mss
@ 2004-10-28  6:15 Meda, Prasanna
  2004-10-28 23:56 ` David S. Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Meda, Prasanna @ 2004-10-28  6:15 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-kernel, netdev, davem


> From: David S. Miller [mailto:davem@davemloft.net]
> Sent: Wednesday, October 27, 2004 10:21 PM
> To: Meda, Prasanna
> Cc: linux-kernel@vger.kernel.org; netdev@oss.sgi.com; davem@redhat.com
> Subject: Re: rcv_wnd = init_cwnd*mss
>
>
> On Wed, 27 Oct 2004 22:14:33 -0700
> "Meda, Prasanna" <pmeda@akamai.com> wrote:
>
> > 
> > What is the reason for checking mss with 1<<rcv_wscale?
> > include/net/tcp.h:

> Because the advertised window field is 16-bits.  It is
> interpreted as "value << rcv_wscale"

Thanks, still it is unclear to me why are we
downsizing the advertised window(rcv_wnd) to cwnd? 
To defeat disobeying sender, or something like below?

Suppose when wscale is zero, it is now checking mss > 1,
and perhaps the intention was to check mss > rcv_wnd,
where mss is greater than advertised, and we still
want to advertise window to spwan 2 to 4 cwnd packets.

And also in the following line,
if (*rcv_wscale && sysctl_tcp_app_win && space>=mss &&
                    space - max((space>>sysctl_tcp_app_win), mss>>*rcv_wscale) <
65536/2)

space is actual_space>>rcv_wscale, mss is actual value.
Why are we checking space>=mss, which are in different
scales? The second line is doing max on space and mss 
on same scales, and looks right.


Thanks,
Prasanna.

^ permalink raw reply	[flat|nested] 5+ messages in thread
* rcv_wnd = init_cwnd*mss
@ 2004-10-28  5:14 Meda, Prasanna
  2004-10-28  5:21 ` David S. Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Meda, Prasanna @ 2004-10-28  5:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, davem


What is the reason for checking mss with 1<<rcv_wscale?
include/net/tcp.h:
static inline void tcp_select_initial_window(int __space, __u32 mss,
        __u32 *rcv_wnd,
        __u32 *window_clamp,
        int wscale_ok,
        __u8 *rcv_wscale)
{
.....
        /* Set initial window to value enough for senders,
         * following RFC1414. Senders, not following this RFC,
         * will be satisfied with 2.
         */
        if (mss > (1<<*rcv_wscale)) {
                int init_cwnd = 4;
                if (mss > 1460*3)
                        init_cwnd = 2;
                else if (mss > 1460)
                        init_cwnd = 3;
                if (*rcv_wnd > init_cwnd*mss)
                        *rcv_wnd = init_cwnd*mss;
        }
 ......
}
---------
Perhaps the motivation was checking for
     if (mss >  rcv_wnd * (1<<*rcv_wscale)) {



Thanks,
Prasanna.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-10-29  0:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-28  6:15 rcv_wnd = init_cwnd*mss Meda, Prasanna
2004-10-28 23:56 ` David S. Miller
2004-10-29  0:55   ` Prasanna Meda
  -- strict thread matches above, loose matches on Subject: below --
2004-10-28  5:14 Meda, Prasanna
2004-10-28  5:21 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).