[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20071221.155030.131184865.yoshfuji@linux-ipv6.org>
Date: Fri, 21 Dec 2007 15:50:30 +0900 (JST)
From: YOSHIFUJI Hideaki / 吉藤英明
<yoshfuji@...ux-ipv6.org>
To: dada1@...mosbay.com
Cc: davem@...emloft.net, netdev@...r.kernel.org,
yoshfuji@...ux-ipv6.org
Subject: Re: [TCP] IPV6 : Change a divide into a right shift in
tcp_v6_send_ack()
In article <476B574E.80601@...mosbay.com> (at Fri, 21 Dec 2007 07:03:58 +0100), Eric Dumazet <dada1@...mosbay.com> says:
> Because tot_len is signed in tcp_v6_send_ack(), tot_len/4 forces compiler
> to emit an integer divide, while we can help it to use a right shift,
> less expensive.
Are you really sure?
At least, gcc-4.1.2-20061115 (debian) does not make any difference.
And, IMHO, because shift for signed variable is fragile, so we should
avoid using it.
--yoshfuji
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists