Re: [B.A.T.M.A.N.] [PATCH next] batman-adv: use ETH_P_BATMAN

2012-11-26 Thread Antonio Quartulli
On Mon, Nov 26, 2012 at 09:17:31AM +0800, Marek Lindner wrote: On Monday, November 26, 2012 07:38:50 Antonio Quartulli wrote: The ETH_P_BATMAN ethertype is now defined kernel-wide. Use it instead of the private BATADV_ETH_P_BATMAN define. How about batctl ? Right, but of course, in a

Re: [B.A.T.M.A.N.] [PATCH 1/5] batman-adv: Use common Jenkins Hash implementation

2012-11-26 Thread Antonio Quartulli
On Sun, Nov 25, 2012 at 07:23:27PM +0100, Sven Eckelmann wrote: An unoptimized version of the Jenkins one-at-a-time hash function is copied all over the code wherever an hashtable is used. Instead the optimized version shared between the whole kernel should be used to reduce code duplication

Re: [B.A.T.M.A.N.] [PATCH 1/5] batman-adv: Use common Jenkins Hash implementation

2012-11-26 Thread Sven Eckelmann
On Monday 26 November 2012 10:33:09 Antonio Quartulli wrote: On Sun, Nov 25, 2012 at 07:23:27PM +0100, Sven Eckelmann wrote: An unoptimized version of the Jenkins one-at-a-time hash function is copied all over the code wherever an hashtable is used. Instead the optimized version shared

[B.A.T.M.A.N.] [PATCH] batctl: use ETH_P_BATMAN

2012-11-26 Thread Antonio Quartulli
ETH_P_BATMAN is now defined in linux/if_ether.h. batctl does not need to use the private BATADV_ETH_P_BATMAN define. However, depending on the kernel-headers version installed on the system, this new constant may not be available, therefore a redefinition inside an ifndef check is needed.

Re: [B.A.T.M.A.N.] [PATCH 1/5] batman-adv: Use common Jenkins Hash implementation

2012-11-26 Thread Sven Eckelmann
On Monday 26 November 2012 10:40:07 Sven Eckelmann wrote: [...] I don't fully get why we can't use this new implementation in TT. What's wrong with the CRC computation? The in kernel implementation will create a different hash sum - tt entries will end up in a different bucket - CRC will

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: don't compile the BLA switch if not requested

2012-11-26 Thread Simon Wunderlich
On Mon, Nov 26, 2012 at 01:27:29AM +0100, Antonio Quartulli wrote: When the Bridge Loop Avoidance component is not compiled-in, its boolean switch should be not compiled as well. This patch surrounds the switch with a proper ifdef. This behaviour was introduced by

Re: [B.A.T.M.A.N.] [RFC] batman-adv boot setup scheme on OpenWRT

2012-11-26 Thread Marek Lindner
On Friday, November 23, 2012 22:00:47 Gui Iribarren wrote: Boring bootlog at http://pastebin.com/59FEPttY Proposed patch follows (against current batman-adv in openwrt 'packages' feed) Signed-off-by: Gui Iribarren g...@altermundi.net I made the necessary changes myself after I

Re: [B.A.T.M.A.N.] [RFC] batman-adv boot setup scheme on OpenWRT

2012-11-26 Thread Sven Eckelmann
On Monday 26 November 2012 18:40:20 Marek Lindner wrote: On Friday, November 23, 2012 22:00:47 Gui Iribarren wrote: Boring bootlog at http://pastebin.com/59FEPttY Proposed patch follows (against current batman-adv in openwrt 'packages' feed) Signed-off-by: Gui Iribarren

[B.A.T.M.A.N.] [PATCHv2 2/5] batman-adv: Define the size of hashtables by hash bits

2012-11-26 Thread Sven Eckelmann
The common hashtable implementation in the kernel uses bits of the hash to compute the final size of the hastable. The current batman-adv hash implementations should do the same to allow a migration to the common hashtable implementation. Signed-off-by: Sven Eckelmann s...@narfation.org ---

[B.A.T.M.A.N.] [PATCHv2 3/5] batman-adv: Remove size information from hash table

2012-11-26 Thread Sven Eckelmann
The size of an hashtable is known by the user of the hash and doesn't have to be stored inside the batadv_hashtable structure. This is an intermediate step before the size information is extracted by the compiler instead of manually added by the code. Signed-off-by: Sven Eckelmann

[B.A.T.M.A.N.] [PATCHv2 5/5] batman-adv: Allow to use different sized hash locks array

2012-11-26 Thread Sven Eckelmann
The amount of locks of a hash directly affects the parallelity when all access independent parts of the hash. But this also affects the amount of memory used for each hash. Allowing to decouple the hash size and the lock size allows to reduce this memory consumption for hashes which don't allow