[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1396282964.29410.53.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Mon, 31 Mar 2014 09:22:44 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Laight <David.Laight@...LAB.COM>
Cc: Mahesh Bandewar <maheshb@...gle.com>,
Jay Vosburgh <fubar@...ibm.com>,
Veaceslav Falico <vfalico@...hat.com>,
Andy Gospodarek <andy@...yhouse.net>,
David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Maciej Zenczykowski <maze@...gle.com>
Subject: RE: [PATCH 4/5] bonding: Added bond_tlb_xmit() for tlb mode.
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.)
--
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