netdev
[Top] [All Lists]

rcv_wnd = init_cwnd*mss

To: <linux-kernel@xxxxxxxxxxxxxxx>
Subject: rcv_wnd = init_cwnd*mss
From: "Meda, Prasanna" <pmeda@xxxxxxxxxx>
Date: Wed, 27 Oct 2004 22:14:33 -0700
Cc: <netdev@xxxxxxxxxxx>, <davem@xxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
Thread-index: AcS8rM7hUF59s+QmQiiGoDvV2MwyDw==
Thread-topic: rcv_wnd = init_cwnd*mss
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.


<Prev in Thread] Current Thread [Next in Thread>