Thread (7 messages) flat view 7 messages, 5 authors, 2007-12-21

Re: [TCP] IPV6 : Change a divide into a right shift in tcp_v6_send_ack()

From: Ilpo Järvinen <hidden>
Date: 2007-12-21 07:21:10

On Fri, 21 Dec 2007, Eric Dumazet wrote:
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.
Can't you just change tot_len to unsigned here? It's just sizeof and some 
positive constants added...

-- 
 i.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help