]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[TCP]: Avoid two divides in __tcp_grow_window()
authorEric Dumazet <dada1@cosmosbay.com>
Fri, 21 Dec 2007 14:07:53 +0000 (06:07 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:00:01 +0000 (15:00 -0800)
commitdfd4f0ae2e111e2b93c295938c0e64ebbb69ae6e
tree0ce2c35f0ffce2553d897116e9370fdaf0433f12
parent8beb5c5f12c8484c59edf9b691f2c4bb4d31f3a0
[TCP]: Avoid two divides in __tcp_grow_window()

tcp_win_from_space() being signed, compiler might emit an integer divide
to compute tcp_win_from_space()/2 .

Using right shifts is OK here and less expensive.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c