Thread (6 messages) 6 messages, 3 authors, 2014-04-01

RE: [PATCH 4/5] bonding: Added bond_tlb_xmit() for tlb mode.

From: Eric Dumazet <hidden>
Date: 2014-03-31 16:22:45

On Mon, 2014-03-31 at 16:00 +0000, David Laight wrote:
Which may or not be faster...
We don't care of this kind of assertions.

Bring us real data, or just say nothing. This is a waste of time.
As coded the case labels may be dense enough to generate a jump table.
If byte reversed the generated code will be a branch tree.

A deep branch tree will be worse, a match on the first item of a branch
tree will almost certainly be better.
I'm not going to guess where the breakeven point is for any modern cpus.
This is ridiculous, there is no jumptable for ETH_P_IP, ETH_P_IPX,
ETH_P_IPV6.

Its not like their value will ever be 1 , 2 and 3

I suggest you take a look at the existing code in whole networking
stack. This is how we coded things, because there is no need to do
ntohs(variable) when we can simply write htons(constant) which even a
dumb compiler can understand. (We used to have __constant_htons() but it
looks its not needed these days.)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help