]> git.baikalelectronics.ru Git - kernel.git/commit
net: tcp: Refine the __tcp_select_window
authorGao Feng <fgao@ikuai8.com>
Wed, 29 Mar 2017 22:49:19 +0000 (06:49 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Mar 2017 22:41:32 +0000 (15:41 -0700)
commitaef9f8a63697e5be5afd06330c1d8aec52f9a0ca
treeccdac1cedab8d57aa7cfbfbf6e16fbd65d1041db
parentbaa91b2ee023d369e5767843510dab773fafdaa6
net: tcp: Refine the __tcp_select_window

1. Move the "window = tp->rcv_wnd;" into the condition block without
tp->rx_opt.rcv_wscale.
Because it is unnecessary when enable wscale;

2. Use the macro ALIGN instead of two statements.
The two statements are used to make window align to 1<<wscale.
Use the ALIGN is more clearer.

3. Use the rounddown to make codes clearer.

Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c