Re: [TCP] Avoid a divide in tcp_mtu_probing()

2007-12-21 Thread David Miller
From: Eric Dumazet <[EMAIL PROTECTED]> Date: Fri, 21 Dec 2007 14:32:41 +0100 > tcp_mtu_to_mss() being signed, compiler might emit an integer divide > to compute tcp_mtu_to_mss()/2 . > > Using a right shift is OK here and less expensive. > > Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]> Applie

[TCP] Avoid a divide in tcp_mtu_probing()

2007-12-21 Thread Eric Dumazet
tcp_mtu_to_mss() being signed, compiler might emit an integer divide to compute tcp_mtu_to_mss()/2 . Using a right shift is OK here and less expensive. Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]> diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index ea111e9..ea85bc0 100644 --- a/net