rcv_wnd = init_cwnd*mss

2 messages, 2 authors, 2004-10-28 · open the first message on its own page

rcv_wnd = init_cwnd*mss

From: Meda, Prasanna <hidden>
Date: 2004-10-28 05:18:07

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.

Re: rcv_wnd = init_cwnd*mss

From: "David S. Miller" <davem@davemloft.net>
Date: 2004-10-28 05:29:37

On Wed, 27 Oct 2004 22:14:33 -0700
"Meda, Prasanna" [off-list ref] 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"
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help