Thread (1 message) 1 message, 1 author, 2010-10-09

Re: [PATCHv5] net: Add batman-adv meshing protocol

From: Sven Eckelmann <hidden>
Date: 2010-10-09 12:34:41
Also in: batman

David Miller wrote:
From: Sven Eckelmann <redacted>
Date: Sat, 18 Sep 2010 21:03:30 +0200
quoted
B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is a routing
protocol for multi-hop ad-hoc mesh networks. The networks may be wired or
wireless. See http://www.open-mesh.org/ for more information and user
space tools.

Signed-off-by: Sven Eckelmann <redacted>
The only thing remaining which I really don't like is this hash helper
library thing in here.

It's a terrible abstraction and very inefficient.  Iteration uses
function calls, as does removal.  Key comparisons use callbacks, via
indirection function pointers, also very inefficient.
I would completely agree.
Just use the "struct hlist_head" and "struct hlist_node" objects we
have generically already.  Inline the list iteration, as well as the
key comparisons and the node linking/unlinking.
hlist_head and hlist_node is the right thing to do, but I am a little bit 
irritated by the rest.

Ok, no hash implementation from the basics, but there is functionality shared 
by the four hashing tables used, which I would not like to "implement" again 
everywhere. For example the "add to hash if data isn't already added there". 
This can easily done using a static inline function which receives a 
comparison and choose/key function (which also can be inlined by the compiler) 
and does the rest using hlist_*.

Speaks anything against such things shared in inside batman-adv only?

thanks,
	Sven

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