I read kernel tcp/ip stack code, in function tcp_select_initial_window, there is a judgement I could not understand. The snippet code is as below:
if (mss > (1 << *rcv_wscale)) {
if (!init_rcv_wnd) /* Use default unless specified otherwise */
init_rcv_wnd = tcp_default_init_rwnd(mss);
*rcv_wnd = min(*rcv_wnd, init_rcv_wnd * mss);
}
Why do we need to check mss > (1 << *rcv_wscale)
here? Is there any specific rule for it? I can not find any detailed description in web. could someone give some explanation about this?