[B.A.T.M.A.N.] [PATCH 9/9] batman-adv: Calculate sizeof using variable insead of types

2011-05-14 Thread Sven Eckelmann
they are directly associated with p. Signed-off-by: Sven Eckelmann s...@narfation.org --- aggregation.c |2 +- bat_debugfs.c |2 +- gateway_client.c| 12 ++-- hard-interface.c|2 +- hash.c |7 --- icmp_socket.c |4 ++-- originator.c

[B.A.T.M.A.N.] pull request: batman-adv 2011-05-14

2011-05-14 Thread Sven Eckelmann
): batman-adv: reset broadcast flood protection on error Sven Eckelmann (1): batman-adv: Add missing hardif_free_ref in forw_packet_free net/batman-adv/aggregation.c | 14 +++--- net/batman-adv/send.c| 19 --- 2 files changed, 27 insertions(+), 6

[B.A.T.M.A.N.] [PATCH 10/09] batman-adv: Use rcu_dereference_protected by update-side

2011-05-14 Thread Sven Eckelmann
analysis. Signed-off-by: Sven Eckelmann s...@narfation.org --- compat.h |2 ++ gateway_client.c |2 +- hard-interface.c |2 +- soft-interface.c |3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/compat.h b/compat.h index fb49f9d..c11f6cd 100644 --- a/compat.h

Re: [B.A.T.M.A.N.] [PATCH 1/9] batman-adv: Annotate functions with format strings

2011-05-15 Thread Sven Eckelmann
Andrew Lunn wrote: Nice set of patches. Are you using any tools to find these issues? I don't think sparse points these out. I read the linux kernel mailinglist and found a mail where batman-ad was mentioned [1] - nothing to be proud of. So I started to look around and found something here

Re: [B.A.T.M.A.N.] [RFC/PATCH] net: add seq_before/seq_after functions

2011-05-18 Thread Sven Eckelmann
On Wednesday 18 May 2011 14:22:13 Antonio Quartulli wrote: Introduce two operations to handle comparison between packet sequence numbers taking into account overflow/wraparound. Batman-adv uses these functions already to check for successor packet even in case of overflow. --- I added this

[B.A.T.M.A.N.] [PATCH] batman-adv: Check type of x and y in seq_(before|after)

2011-05-19 Thread Sven Eckelmann
would create a warning like warning: comparison of distinct pointer types lacks a cast. Signed-off-by: Sven Eckelmann s...@narfation.org --- main.h |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/main.h b/main.h index db29444..3395bf9 100644 --- a/main.h +++ b/main.h

[B.A.T.M.A.N.] batman-adv bug 149: odd broadcast behavior -- generated CRC errors

2011-05-20 Thread Sven Eckelmann
Hi, I would assume that you don't monitor the bug as you didn't answer the questions on irc. So here the part of the IRC communication which needs comments/answers from your side. T_X dbeberman-away: hmm, weird. could be a batman specific bug. the first thing I'd have in mind to narrow things

Re: [B.A.T.M.A.N.] batman-adv bug 149: odd broadcast behavior -- generated CRC errors

2011-05-20 Thread Sven Eckelmann
Sven Eckelmann wrote: Hi, I would assume that you don't monitor the bug as you didn't answer the questions on irc. So here the part of the IRC communication which needs comments/answers from your side. [...] Just talked to Marek and we both are a little bit irritated by following part

Re: [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: Add compatibility code for kfree_rcu

2011-05-20 Thread Sven Eckelmann
Sven Eckelmann wrote: Signed-off-by: Sven Eckelmann s...@narfation.org --- Rebased on top of current master + newest version from Paul E. McKenney Applied in 903ca65 signature.asc Description: This is a digitally signed message part.

Re: [B.A.T.M.A.N.] [PATCHv2 2/4] batman-adv: convert call_rcu(gw_node_free_rcu) to kfree_rcu

2011-05-20 Thread Sven Eckelmann
Sven Eckelmann wrote: From: Paul E. McKenney paul...@linux.vnet.ibm.com The RCU callback gw_node_free_rcu() just calls kfree(), so we can use kfree_rcu() instead of call_rcu(). Signed-off-by: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Marek Lindner lindner_ma...@yahoo.de Cc: Simon

Re: [B.A.T.M.A.N.] [PATCHv2 3/4] batman-adv: convert call_rcu(neigh_node_free_rcu) to kfree()

2011-05-20 Thread Sven Eckelmann
Sven Eckelmann wrote: From: Paul E. McKenney paul...@linux.vnet.ibm.com The RCU callback neigh_node_free_rcu() just calls kfree(), so we can use kfree_rcu() instead of call_rcu(). Signed-off-by: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Marek Lindner lindner_ma...@yahoo.de Cc

Re: [B.A.T.M.A.N.] [PATCHv2 4/4] batman-adv: convert call_rcu(softif_neigh_free_rcu) to kfree_rcu

2011-05-20 Thread Sven Eckelmann
Sven Eckelmann wrote: From: Paul E. McKenney paul...@linux.vnet.ibm.com The RCU callback softif_neigh_free_rcu() just calls kfree(), so we can use kfree_rcu() instead of call_rcu(). Signed-off-by: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Marek Lindner lindner_ma...@yahoo.de Cc

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: use is_broadcast_ether_addr() instead of compare_eth(.., brd_addr)

2011-05-21 Thread Sven Eckelmann
Antonio Quartulli wrote: Instead of comparing mac addresses with the broadcast address by means of compare_eth(), the is_broadcast_ether_addr() kernel function has to be used. Signed-off-by: Antonio Quartulli or...@autistici.org Acked-by: Sven Eckelmann s...@narfation.org --- routing.c

[B.A.T.M.A.N.] [PATCH 01/14] batctl: Remove optimisation and debugging options

2011-05-21 Thread Sven Eckelmann
Distributions like Gentoo or Debian have to strip the options regarding the optimisation levels and debugging information to fulfil their policies. There is currently no valid reason why the Makefile should override it. Signed-off-by: Sven Eckelmann s...@narfation.org --- Makefile |2 +- 1

[B.A.T.M.A.N.] [PATCH 02/14] batctl: Don't automatically build in parallel

2011-05-21 Thread Sven Eckelmann
Distributions like Gentoo and Debian have policies which make it necessary to use some kind of environmental variable to control the parallel build. Signed-off-by: Sven Eckelmann s...@narfation.org --- Makefile |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/Makefile

[B.A.T.M.A.N.] [PATCH 03/14] batctl: Remove unused Makefile variables

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- Makefile |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 61a81fb..cf0b5c5 100644 --- a/Makefile +++ b/Makefile @@ -32,10 +32,6 @@ LDFLAGS += -lm SBINDIR = $(INSTALL_PREFIX)/usr/sbin

[B.A.T.M.A.N.] [PATCH 04/14] batctl: Directly specify objects in Makefile

2011-05-21 Thread Sven Eckelmann
The information about header and source files aren't needed by the Makefile. Only the dependencies to headers provide useful information, but these are automatically included by the generated *.d files. Signed-off-by: Sven Eckelmann s...@narfation.org --- Makefile | 16 ++-- 1

[B.A.T.M.A.N.] [PATCH 06/14] batctl: Mark makefile targets without output as PHONY

2011-05-21 Thread Sven Eckelmann
Normally makefile targets should create an output with the same name as the target. It is necessary to mark them as PHONY to prevent that the virtual target like all, clean or install aren't executed when a file with the same name exists. Signed-off-by: Sven Eckelmann s...@narfation.org

[B.A.T.M.A.N.] [PATCH 05/14] batctl: Provide shebang to inform about interpreter

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- Makefile |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) mode change 100644 = 100755 Makefile diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 index 1bc4879..8fc2300 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5

[B.A.T.M.A.N.] [PATCH 07/14] batctl: Only define CC when not already specified

2011-05-21 Thread Sven Eckelmann
It is possible that a build environment specifies the CC different than gcc (for example gcc-4.6). The Makefile should only set it when the compiler wasn't explicitely set. Signed-off-by: Sven Eckelmann s...@narfation.org --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions

[B.A.T.M.A.N.] [PATCH 08/14] batctl: Build binary before installing it

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index a06177d..c8cb62f 100755 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ $(BINARY_NAME): $(OBJ) Makefile clean: rm -f

[B.A.T.M.A.N.] [PATCH 09/14] batctl: Reorder Makefile for better readability

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- Makefile | 40 1 files changed, 24 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index c8cb62f..0683fd7 100755 --- a/Makefile +++ b/Makefile @@ -18,6 +18,16 @@ # 02110-1301, USA

[B.A.T.M.A.N.] [PATCH 10/14] batctl: Use standard-like build rules

2011-05-21 Thread Sven Eckelmann
User expect a specific naming inside makefile rules which they can modify by changing environment variables or providing them explicitely as parameters of the make call. The naming was extracted from the gnu make standard rules database. Signed-off-by: Sven Eckelmann s...@narfation.org

[B.A.T.M.A.N.] [PATCH 12/14] batctl: Rename INSTALL_PREFIX to DESTDIR

2011-05-21 Thread Sven Eckelmann
Makefile generators like cmake or configure (generated by autotools) usually use DESTDIR to allow the modification of the root path without affecting other build steps. Signed-off-by: Sven Eckelmann s...@narfation.org --- Makefile |6 +++--- 1 files changed, 3 insertions(+), 3 deletions

[B.A.T.M.A.N.] [PATCH 13/14] batctl: Introduce PREFIX as standard installation prefix

2011-05-21 Thread Sven Eckelmann
cmake and configure (generated by autotools) use a prefix configuration which is by default /usr/local to define to which all other paths are relative to. SBINDIR is then defined as $PREFIX/sbin but can also be redefined. Signed-off-by: Sven Eckelmann s...@narfation.org --- Makefile |5

[B.A.T.M.A.N.] [PATCH 14/14] batctl: Install manpage

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- Makefile |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index 7ac72ed..eee5a63 100755 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ # batctl build BINARY_NAME = batctl OBJ = main.o bat

[B.A.T.M.A.N.] [PATCH 01/14] batmand: Remove optimisation and debugging options

2011-05-21 Thread Sven Eckelmann
Distributions like Gentoo or Debian have to strip the options regarding the optimisation levels and debugging information to fulfil their policies. There is currently no valid reason why the Makefile should override it. Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends

[B.A.T.M.A.N.] [PATCH 03/14] batmand: Remove unused Makefile variables

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - batmand: Fix FTBFS on second build attempt - batmand: Remove obsolete creation of source packages - batmand: Remove subversion/svk revision information - batmand: Use nproc to get

[B.A.T.M.A.N.] [PATCH 04/14] batmand: Directly specify objects in Makefile

2011-05-21 Thread Sven Eckelmann
The information about header and source files aren't needed by the Makefile. Only the dependencies to headers provide useful information, but these are automatically included by the generated *.d files. Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches

[B.A.T.M.A.N.] [PATCH 05/14] batmand: Provide shebang to inform about interpreter

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - batmand: Fix FTBFS on second build attempt - batmand: Remove obsolete creation of source packages - batmand: Remove subversion/svk revision information - batmand: Use nproc to get

[B.A.T.M.A.N.] [PATCH 06/14] batmand: Mark makefile targets without output as PHONY

2011-05-21 Thread Sven Eckelmann
Normally makefile targets should create an output with the same name as the target. It is necessary to mark them as PHONY to prevent that the virtual target like all, clean or install aren't executed when a file with the same name exists. Signed-off-by: Sven Eckelmann s...@narfation.org

[B.A.T.M.A.N.] [PATCH 09/14] batmand: Reorder Makefile for better readability

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - batmand: Fix FTBFS on second build attempt - batmand: Remove obsolete creation of source packages - batmand: Remove subversion/svk revision information - batmand: Use nproc to get

[B.A.T.M.A.N.] [PATCH 08/14] batmand: Build binary before installing it

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - batmand: Fix FTBFS on second build attempt - batmand: Remove obsolete creation of source packages - batmand: Remove subversion/svk revision information - batmand: Use nproc to get

[B.A.T.M.A.N.] [PATCH 11/14] Make called tools in clean and install configurable

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - batmand: Fix FTBFS on second build attempt - batmand: Remove obsolete creation of source packages - batmand: Remove subversion/svk revision information - batmand: Use nproc to get

[B.A.T.M.A.N.] [PATCH 12/14] batmand: Rename INSTALL_PREFIX to DESTDIR

2011-05-21 Thread Sven Eckelmann
Makefile generators like cmake or configure (generated by autotools) usually use DESTDIR to allow the modification of the root path without affecting other build steps. Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - batmand: Fix

[B.A.T.M.A.N.] [PATCH 07/14] batmand: Only define CC when not already specified

2011-05-21 Thread Sven Eckelmann
It is possible that a build environment specifies the CC different than gcc (for example gcc-4.6). The Makefile should only set it when the compiler wasn't explicitely set. Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - batmand: Fix

[B.A.T.M.A.N.] [PATCH 13/14] batmand: Introduce PREFIX as standard installation prefix

2011-05-21 Thread Sven Eckelmann
cmake and configure (generated by autotools) use a prefix configuration which is by default /usr/local to define to which all other paths are relative to. SBINDIR is then defined as $PREFIX/sbin but can also be redefined. Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends

[B.A.T.M.A.N.] [PATCH 14/14] batmand: Install manpage

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - batmand: Fix FTBFS on second build attempt - batmand: Remove obsolete creation of source packages - batmand: Remove subversion/svk revision information - batmand: Use nproc to get

[B.A.T.M.A.N.] [PATCH 01/13] vis: Remove optimisation and debugging options

2011-05-21 Thread Sven Eckelmann
Distributions like Gentoo or Debian have to strip the options regarding the optimisation levels and debugging information to fulfil their policies. There is currently no valid reason why the Makefile should override it. Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends

[B.A.T.M.A.N.] [PATCH 02/13] vis: Don't automatically build in parallel

2011-05-21 Thread Sven Eckelmann
Distributions like Gentoo and Debian have policies which make it necessary to use some kind of environmental variable to control the parallel build. Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - vis: Remove obsolete creation

[B.A.T.M.A.N.] [PATCH 04/13] vis: Directly specify objects in Makefile

2011-05-21 Thread Sven Eckelmann
The information about header and source files aren't needed by the Makefile. Only the dependencies to headers provide useful information, but these are automatically included by the generated *.d files. Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches

[B.A.T.M.A.N.] [PATCH 05/13] vis: Provide shebang to inform about interpreter

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - vis: Remove obsolete creation of source packages - vis: Remove subversion/svk revision information Makefile |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) mode change

[B.A.T.M.A.N.] [PATCH 06/13] vis: Mark makefile targets without output as PHONY

2011-05-21 Thread Sven Eckelmann
Normally makefile targets should create an output with the same name as the target. It is necessary to mark them as PHONY to prevent that the virtual target like all, clean or install aren't executed when a file with the same name exists. Signed-off-by: Sven Eckelmann s...@narfation.org

[B.A.T.M.A.N.] [PATCH 07/13] vis: Only define CC when not already specified

2011-05-21 Thread Sven Eckelmann
It is possible that a build environment specifies the CC different than gcc (for example gcc-4.6). The Makefile should only set it when the compiler wasn't explicitely set. Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - vis: Remove

[B.A.T.M.A.N.] [PATCH 08/13] vis: Build binary before installing it

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - vis: Remove obsolete creation of source packages - vis: Remove subversion/svk revision information Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[B.A.T.M.A.N.] [PATCH 09/13] vis: Reorder Makefile for better readability

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - vis: Remove obsolete creation of source packages - vis: Remove subversion/svk revision information Makefile | 39 --- 1 files changed, 24

[B.A.T.M.A.N.] [PATCH 10/13] vis: Use standard-like build rules

2011-05-21 Thread Sven Eckelmann
User expect a specific naming inside makefile rules which they can modify by changing environment variables or providing them explicitely as parameters of the make call. The naming was extracted from the gnu make standard rules database. Signed-off-by: Sven Eckelmann s...@narfation.org

[B.A.T.M.A.N.] [PATCH 12/13] vis: Rename INSTALL_PREFIX to DESTDIR

2011-05-21 Thread Sven Eckelmann
Makefile generators like cmake or configure (generated by autotools) usually use DESTDIR to allow the modification of the root path without affecting other build steps. Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - vis: Remove

[B.A.T.M.A.N.] [PATCH 13/13] vis: Introduce PREFIX as standard installation prefix

2011-05-21 Thread Sven Eckelmann
cmake and configure (generated by autotools) use a prefix configuration which is by default /usr/local to define to which all other paths are relative to. SBINDIR is then defined as $PREFIX/sbin but can also be redefined. Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends

[B.A.T.M.A.N.] [PATCH 11/13] vis: Make called tools in clean and install configurable

2011-05-21 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- This patch depends on other patches submitted earlier: - vis: Remove obsolete creation of source packages - vis: Remove subversion/svk revision information Makefile |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff

Re: [B.A.T.M.A.N.] [PATCHv5 1/3] batman-adv: improved client announcement mechanism

2011-05-22 Thread Sven Eckelmann
Antonio Quartulli wrote: - Cleaned following ecsv's patches/suggestions. - recv_unicast_packet() now uses seq_before() Antonio Quartulli wrote: + (diff 0 diff -0xff/2)) { + /* Linearize the skb before accessing it */ What? Sry, have to Nack this one. Kind

Re: [B.A.T.M.A.N.] [PATCHv2 2/3] batman-adv: improved roaming mechanism

2011-05-22 Thread Sven Eckelmann
Antonio Quartulli wrote: int16_t diff; [...] diff = unicast_packet-ttvn - curr_ttvn; diff is set but never used in recv_unicast_packet Kind regards, Sven signature.asc Description: This is a digitally signed message part.

Re: [B.A.T.M.A.N.] [PATCHv2 2/3] batman-adv: improved roaming mechanism

2011-05-22 Thread Sven Eckelmann
Antonio Quartulli wrote: + memcpy(roam_adv_packet-src, + bat_priv-primary_if-net_dev-dev_addr, ETH_ALEN); Again, Nack. This is _definitely_ not allowed. Please use the primary_if != NULL that you got through primary_if_get_selected instead of dereferencing bat_priv-primary_if

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: move the ttl field to the third position of unicast_* packets

2011-05-27 Thread Sven Eckelmann
On Saturday 28 May 2011 00:10:22 Antonio Quartulli wrote: Move the ttl field to the third position of unicast_packet and unicast_frag_packet. In this way it possible to give them a better shape for later usage Signed-off-by: Antonio Quartulli or...@autistici.org --- [..] struct

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: move the ttl field to the third position of unicast_* packets

2011-05-28 Thread Sven Eckelmann
Marek Lindner wrote: On Saturday 28 May 2011 00:20:21 Sven Eckelmann wrote: struct unicast_frag_packet { uint8_t packet_type; uint8_t version; /* batman version field */ - uint8_t dest[6]; uint8_t ttl; + uint8_t align

[B.A.T.M.A.N.] [PATCH-sven] batman-adv: Unify the first 4 bytes in each packet

2011-05-28 Thread Sven Eckelmann
From: Antonio Quartulli or...@autistici.org The amount of duplicated code in the receive and routing code can be reduced when all headers provide the packet type, version and ttl in the same first bytes. Signed-off-by: Antonio Quartulli or...@autistici.org --- just my suggestion packet.h |

Re: [B.A.T.M.A.N.] [PATCH-sven] batman-adv: Unify the first 4 bytes in each packet

2011-05-28 Thread Sven Eckelmann
On Saturday 28 May 2011 10:43:03 Sven Eckelmann wrote: From: Antonio Quartulli or...@autistici.org The amount of duplicated code in the receive and routing code can be reduced when all headers provide the packet type, version and ttl in the same first bytes. Signed-off-by: Antonio

Re: [B.A.T.M.A.N.] [PATCH-marek] batman-adv: Unify the first 3 bytes in each packet

2011-05-28 Thread Sven Eckelmann
On Saturday 28 May 2011 14:17:14 Marek Lindner wrote: On Saturday 28 May 2011 14:07:10 Sven Eckelmann wrote: Why dont you use the reserverd part for the flags which are currently not in unicast? Then you could also remove that other align byte. It would still be possible to add flags

[B.A.T.M.A.N.] [PATCHv3-sven] batman-adv: Unify the first 3 bytes in each packet

2011-05-28 Thread Sven Eckelmann
From: Antonio Quartulli or...@autistici.org The amount of duplicated code in the receive and routing code can be reduced when all headers provide the packet type, version and ttl in the same first bytes. Signed-off-by: Antonio Quartulli or...@autistici.org --- * Keep the reserved fields in

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: correct !x y in !(x y)

2011-05-29 Thread Sven Eckelmann
On Sunday 29 May 2011 00:26:17 Antonio Quartulli wrote: This error was introduced with: 4dea0274b8edeab50bfeb6685ef33362e3ec9299 Signed-off-by: Antonio Quartulli or...@autistici.org An extrem large and loud Acked-by: Sven Eckelmann s...@narfation.org And to the Acked-by: Simon Wunderlich

[B.A.T.M.A.N.] batman-adv 2011-05-30

2011-05-30 Thread Sven Eckelmann
is_broadcast_ether_addr() instead of compare_eth(.., brd_addr) batman-adv: a multiline comment should precede the variable it is describing Sven Eckelmann (13): batman-adv: Use kzalloc rather than kmalloc followed by memset with 0 batman-adv: Annotate functions with format

[B.A.T.M.A.N.] [PATCH 01/17] batman-adv: move neigh_node-if_incoming-if_status check in find_router()

2011-05-30 Thread Sven Eckelmann
From: Antonio Quartulli or...@autistici.org Every time that find_router() is invoked, if_status has to be compared with IF_ACTIVE. Moving this comparison inside find_router() will avoid to write it each time. Signed-off-by: Antonio Quartulli or...@autistici.org Signed-off-by: Sven Eckelmann s

[B.A.T.M.A.N.] [PATCH 03/17] batman-adv: Annotate functions with format strings

2011-05-30 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/bat_debugfs.c |1 + net/batman-adv/main.h|3 ++- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/net/batman-adv/bat_debugfs.c b/net/batman-adv/bat_debugfs.c index abaeec5..4577d3f 100644 --- a/net

[B.A.T.M.A.N.] [PATCH 04/17] batman-adv: Print jiffies as unsigned long

2011-05-30 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/bat_debugfs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/batman-adv/bat_debugfs.c b/net/batman-adv/bat_debugfs.c index 4577d3f..e8491ee 100644 --- a/net/batman-adv/bat_debugfs.c +++ b/net/batman

[B.A.T.M.A.N.] [PATCH 05/17] batman-adv: Remove comparising 0 for unsigned type

2011-05-30 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/bat_debugfs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/batman-adv/bat_debugfs.c b/net/batman-adv/bat_debugfs.c index e8491ee..628ab18 100644 --- a/net/batman-adv/bat_debugfs.c +++ b/net/batman

[B.A.T.M.A.N.] [PATCH 07/17] batman-adv: Add const type qualifier for pointers

2011-05-30 Thread Sven Eckelmann
batman-adv uses pointers which are marked as const and should not violate that type qualifier by passing it to functions which force a cast to the non-const version. Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/aggregation.c | 21 ++- net/batman-adv

[B.A.T.M.A.N.] [PATCH 08/17] batman-adv: Only use int up and down gw representation

2011-05-30 Thread Sven Eckelmann
It is not save to provide memory for an int and then cast the pointer to it to long*. It is better to standardize the up and down gateway bandwith representation to simple ints and only use long inside conversation routines. Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv

[B.A.T.M.A.N.] [PATCH 09/17] batman-adv: Remove explicit casts cast from void* for store

2011-05-30 Thread Sven Eckelmann
It is not necessary to cast a void* to the pointer type when we just store it and don't want to do pointer arithmetic before the actual assignment. Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/bitarray.c |2 +- net/batman-adv/hard-interface.c|2 +- net

[B.A.T.M.A.N.] [PATCH 10/17] batman-adv: Remove casts from type x to type x

2011-05-30 Thread Sven Eckelmann
Casting from pointer like 'struct orig_node*' to 'struct orig_node *' doesn't provide any additional functionality and can be savely removed. Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/unicast.c |2 +- net/batman-adv/vis.c |2 +- 2 files changed, 2 insertions

[B.A.T.M.A.N.] [PATCH 12/17] batman-adv: Use rcu_dereference_protected by update-side

2011-05-30 Thread Sven Eckelmann
analysis. Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/gateway_client.c |2 +- net/batman-adv/hard-interface.c |2 +- net/batman-adv/soft-interface.c |3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv

[B.A.T.M.A.N.] [PATCH 11/17] batman-adv: Calculate sizeof using variable insead of types

2011-05-30 Thread Sven Eckelmann
they are directly associated with p. Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/aggregation.c |2 +- net/batman-adv/bat_debugfs.c |2 +- net/batman-adv/gateway_client.c| 12 +- net/batman-adv/hard-interface.c|2 +- net/batman-adv/hash.c

[B.A.T.M.A.N.] [PATCH 17/17] batman-adv: Ensure that we really have route changes in update_route

2011-05-30 Thread Sven Eckelmann
reading it without this test. Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/routing.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index 90ae6f0..368ceeb 100644 --- a/net/batman-adv/routing.c +++ b

[B.A.T.M.A.N.] [PATCH 13/17] batman-adv: move smallest_signed_int(), seq_before() and seq_after() into main.h

2011-05-30 Thread Sven Eckelmann
-off-by: Antonio Quartulli or...@autistici.org Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/main.h | 16 net/batman-adv/vis.c | 16 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/net/batman-adv/main.h b/net/batman-adv

[B.A.T.M.A.N.] [PATCH 14/17] batman-adv: Check type of x and y in seq_(before|after)

2011-05-30 Thread Sven Eckelmann
would create a warning like warning: comparison of distinct pointer types lacks a cast. Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/main.h |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index 80be5ad

[B.A.T.M.A.N.] [PATCH 15/17] batman-adv: use is_broadcast_ether_addr() instead of compare_eth(.., brd_addr)

2011-05-30 Thread Sven Eckelmann
From: Antonio Quartulli or...@autistici.org Instead of comparing mac addresses with the broadcast address by means of compare_eth(), the is_broadcast_ether_addr() kernel function has to be used. Signed-off-by: Antonio Quartulli or...@autistici.org Acked-by: Sven Eckelmann s...@narfation.org

[B.A.T.M.A.N.] [PATCH 16/17] batman-adv: a multiline comment should precede the variable it is describing

2011-05-30 Thread Sven Eckelmann
From: Antonio Quartulli or...@autistici.org This comment has been wrongly put after the variable it refers to and was also bad indented Signed-off-by: Antonio Quartulli or...@autistici.org Acked-by: Sven Eckelmann s...@narfation.org Signed-off-by: Sven Eckelmann s...@narfation.org --- net

[B.A.T.M.A.N.] [PATCH] batman-adv: Use enums for related constants

2011-06-04 Thread Sven Eckelmann
by shifts of a bit. Signed-off-by: Sven Eckelmann s...@narfation.org --- These patches are based on ordex's patches to reduce the amount of rebase related heart attacks for him. hard-interface.h | 14 ++- main.h | 18 +- packet.h | 65

[B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Don't return value in void function

2011-06-04 Thread Sven Eckelmann
gw_node_delete is defined with void as return type, but still tries to return a value. The called function gw_node_delete is also return as void and thus doesn't provide a value for us. Signed-off-by: Sven Eckelmann s...@narfation.org --- gateway_client.c |2 +- 1 files changed, 1 insertions

[B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Fix signedness problem in parse_gw_bandwidth

2011-06-04 Thread Sven Eckelmann
strict_strtoul as used in parse_gw_bandwidth is defined for unsigned long and strict_strtol should be used instead for long. Signed-off-by: Sven Eckelmann s...@narfation.org --- gateway_common.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gateway_common.c b

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Fix signedness problem in parse_gw_bandwidth

2011-06-04 Thread Sven Eckelmann
Marek Lindner wrote: On Saturday 04 June 2011 12:40:38 Sven Eckelmann wrote: strict_strtoul as used in parse_gw_bandwidth is defined for unsigned long and strict_strtol should be used instead for long. Don't we need a strict_strtol macro in compat.h next to the strict_strtoul that we have

[B.A.T.M.A.N.] [PATCH] batman-adv: Rewrite debugfs kobj_to_* helpers as functions

2011-06-05 Thread Sven Eckelmann
CodingStyle Chapter 12: Macros, Enums and RTL highly recommends to use functions instead of macros were possible. This ensures type safety and prevents shadowing of other variables. Signed-off-by: Sven Eckelmann s...@narfation.org --- bat_sysfs.c | 14 +++--- 1 files changed, 11

[B.A.T.M.A.N.] [PATCH] batctl: Remove unused but set variable in roam and tt dump functions

2011-06-05 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann s...@narfation.org --- tcpdump.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/tcpdump.c b/tcpdump.c index 3e68844..85d461e 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -253,12 +253,10 @@ static void dump_vlan(unsigned char *packet_buff

[B.A.T.M.A.N.] customize batman-adv for a new dashboard (was: Marek Linder)

2011-06-07 Thread Sven Eckelmann
Michel de Geofroy wrote: Hi Sven, Marek, All First thanks for the feedback really appreciated, I actually dont know if it is Batman or the Robin script that we would need to customize or both not being a programmer its hard for me to tell... I try to help. batman-adv can be understood as

[B.A.T.M.A.N.] [PATCH] batman-adv: Remove cast after kmalloc

2011-06-08 Thread Sven Eckelmann
Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. This regression was introduced in cea194d90b11aff7fc289149e4c7f305fad3535a Signed-off-by: Sven Eckelmann s...@narfation.org --- translation-table.c |3 +-- 1 files changed, 1 insertions

[B.A.T.M.A.N.] [PATCH] batman-adv: Fix line over 80 characters

2011-06-08 Thread Sven Eckelmann
Regression was introduced in 4d30670880c84071dba4b220f595e64d6c01d1ba. Signed-off-by: Sven Eckelmann s...@narfation.org --- routing.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/routing.c b/routing.c index 5e99188..7f458e9 100644 --- a/routing.c +++ b/routing.c

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: use NO_FLAGS define instead of hard-coding 0

2011-06-09 Thread Sven Eckelmann
On Thursday 09 June 2011 17:13:09 Marek Lindner wrote: The definition NO_FLAGS was introduced to make the code more readable and shall be used to initialize flag fields. Signed-off-by: Marek Lindner lindner_ma...@yahoo.de Acked-by: Sven Eckelmann s...@narfation.org --- aggregation.c

[B.A.T.M.A.N.] [PATCH 1/6] batman-adv: accept delayed rebroadcasts to avoid bogus routing under heavy load

2011-06-09 Thread Sven Eckelmann
). With this patch batman-adv will also accept delayed OGMs in order to avoid a bogus influence on the routing metric. Signed-off-by: Daniele Furlan daniele.fur...@gmail.com Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/routing.c |9 - 1 files changed, 4 insertions

[B.A.T.M.A.N.] pull request: batman-adv 2011-06-09

2011-06-09 Thread Sven Eckelmann
: accept delayed rebroadcasts to avoid bogus routing under heavy load Marek Lindner (1): batman-adv: use NO_FLAGS define instead of hard-coding 0 Sven Eckelmann (4): batman-adv: Don't return value in void function batman-adv: Fix signedness problem in parse_gw_bandwidth batman

[B.A.T.M.A.N.] [PATCH 3/6] batman-adv: Fix signedness problem in parse_gw_bandwidth

2011-06-09 Thread Sven Eckelmann
strict_strtoul as used in parse_gw_bandwidth is defined for unsigned long and strict_strtol should be used instead for long. Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/gateway_common.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/batman

[B.A.T.M.A.N.] [PATCH 4/6] batman-adv: Rewrite debugfs kobj_to_* helpers as functions

2011-06-09 Thread Sven Eckelmann
CodingStyle Chapter 12: Macros, Enums and RTL highly recommends to use functions instead of macros were possible. This ensures type safety and prevents shadowing of other variables. Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/bat_sysfs.c | 14 +++--- 1 files

[B.A.T.M.A.N.] [PATCH 5/6] batman-adv: Use enums for related constants

2011-06-09 Thread Sven Eckelmann
by shifts of a bit. Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/hard-interface.h | 14 ++- net/batman-adv/main.h | 17 - net/batman-adv/packet.h | 47 --- 3 files changed, 47 insertions(+), 31

[B.A.T.M.A.N.] [PATCH 6/6] batman-adv: use NO_FLAGS define instead of hard-coding 0

2011-06-09 Thread Sven Eckelmann
From: Marek Lindner lindner_ma...@yahoo.de The definition NO_FLAGS was introduced to make the code more readable and shall be used to initialize flag fields. Signed-off-by: Marek Lindner lindner_ma...@yahoo.de Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/aggregation.c

[B.A.T.M.A.N.] [PATCH 2/6] batman-adv: Don't return value in void function

2011-06-09 Thread Sven Eckelmann
gw_node_delete is defined with void as return type, but still tries to return a value. The called function gw_node_delete is also return as void and thus doesn't provide a value for us. Signed-off-by: Sven Eckelmann s...@narfation.org --- net/batman-adv/gateway_client.c |2 +- 1 files

[B.A.T.M.A.N.] [PATCH] batman-adv: Force packed placment of tt_change

2011-06-12 Thread Sven Eckelmann
that structure to copy the correct amount of data from an internal structure to the actual packet. We must ensure that this packet buffer only has data which can be interpreted by any architecture. Signed-off-by: Sven Eckelmann s...@narfation.org --- packet.h |2 +- 1 files changed, 1 insertions

[B.A.T.M.A.N.] Combination of flags in tt_query packets

2011-06-12 Thread Sven Eckelmann
Hi, just looked a little bit closer at your tt_query implementation and was reminded that we had a small discussion in IRC some weeks ago. ecsv can those flags be mixed? ordex mixed? in which way? ecsv request | table - still a valid package ecsv sry, packet ordex yes it is, because it means

Re: [B.A.T.M.A.N.] Combination of flags in tt_query packets

2011-06-13 Thread Sven Eckelmann
Antonio Quartulli wrote: just looked a little bit closer at your tt_query implementation and was reminded that we had a small discussion in IRC some weeks ago. ecsv can those flags be mixed? ordex mixed? in which way? ecsv request | table - still a valid package ecsv sry, packet

Re: [B.A.T.M.A.N.] Combination of flags in tt_query packets

2011-06-13 Thread Sven Eckelmann
Sven Eckelmann wrote: Then you say that you don't use flags but 2 bits to store 2 values. Please don't use it in your code as flags, but use something like (x TT_TYPE_MASK) to extract the corresponding bits and compare the resulting values against representation of TT_RESPONSE and TT_RESPONSE

[B.A.T.M.A.N.] [PATCHv2] batman-adv: clean up the tt_query flags field

2011-06-13 Thread Sven Eckelmann
to the related enum values (TT_RESPONSE, TT_REQUEST) Signed-off-by: Antonio Quartulli or...@autistici.org Signed-off-by: Sven Eckelmann s...@narfation.org --- * Just added three missing tabs as mentioned in the last mail. packet.h | 10 -- routing.c | 34

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: clean up the tt_query flags field

2011-06-13 Thread Sven Eckelmann
); + tt_query-tt_data = htons(tt_query-tt_data); + return route_unicast_packet(skb, recv_if); Could you indent everything (except the return) with one more tab? The rest: Acked-by; Sven Eckelmann s...@narfation.org Thanks, Sven signature.asc Description

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: compare_eth() should take const pointer arguments

2011-06-14 Thread Sven Eckelmann
' discards qualifiers from pointer target type Signed-off-by: David Howells dhowe...@redhat.com cc: Marek Lindner lindner_ma...@yahoo.de cc: Simon Wunderlich s...@hrz.tu-chemnitz.de cc: Sven Eckelmann s...@narfation.org cc: b.a.t.m.a.n@lists.open-mesh.org cc: net...@vger.kernel.org --- net

<    3   4   5   6   7   8   9   10   11   12   >