Re: [TCP] Avoid two divides in __tcp_grow_window()

2007-12-21 Thread David Miller
From: Eric Dumazet [EMAIL PROTECTED] Date: Fri, 21 Dec 2007 15:05:51 +0100 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 [EMAIL PROTECTED] Applied,

[TCP] Avoid two divides in __tcp_grow_window()

2007-12-21 Thread Eric Dumazet
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 [EMAIL PROTECTED] diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 6931946..145b51a 100644 ---