Re: [TCP] Avoid two divides in tcp_output.c

2007-12-20 Thread David Miller
From: Eric Dumazet <[EMAIL PROTECTED]> Date: Fri, 21 Dec 2007 06:34:28 +0100 > Because 'free_space' variable in __tcp_select_window() is signed, > expression (free_space / 2) forces compiler to emit an integer divide. > > This can be changed to a plain right shift, less expensive. > > Signed-off

[TCP] Avoid two divides in tcp_output.c

2007-12-20 Thread Eric Dumazet
Because 'free_space' variable in __tcp_select_window() is signed, expression (free_space / 2) forces compiler to emit an integer divide. This can be changed to a plain right shift, less expensive. Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_o