Sven Eckelmann | 24 Apr 16:19 2015

[PATCH] alfred: Fix dependency to IPv6

alfred always requires IPv6 support in the kernel and not only when
"Enable IPv6 support in packages" is enabled.

Signed-off-by: Sven Eckelmann <sven@...>
---
 alfred/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/alfred/Makefile b/alfred/Makefile
index dade218..8f6855b 100644
--- a/alfred/Makefile
+++ b/alfred/Makefile
 <at>  <at>  -28,7 +28,7  <at>  <at>  define Package/alfred
   SECTION:=net
   CATEGORY:=Network
   TITLE:=A.L.F.R.E.D. - Almighty Lightweight Fact Remote Exchange Daemon
-  DEPENDS:= +libc +IPV6:kmod-ipv6 +librt \
+  DEPENDS:= +libc +kmod-ipv6 +librt \
 	  +ALFRED_NEEDS_lua:lua \
 	  +ALFRED_NEEDS_libgps:libgps
 endef
--

-- 
2.1.4

Sven Eckelmann | 23 Apr 18:22 2015

[PATCH 1/2] batman-adv: Clarify calculation precedence for '&' and '?'

Signed-off-by: Sven Eckelmann <sven@...>
---
 net/batman-adv/bat_iv_ogm.c        |  2 +-
 net/batman-adv/main.h              |  2 +-
 net/batman-adv/translation-table.c | 42 +++++++++++++++++++-------------------
 3 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 9adbc61..753383c 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
 <at>  <at>  -479,7 +479,7  <at>  <at>  static void batadv_iv_ogm_send_to_if(struct batadv_forw_packet *forw_packet,
 			   batadv_ogm_packet->orig,
 			   ntohl(batadv_ogm_packet->seqno),
 			   batadv_ogm_packet->tq, batadv_ogm_packet->ttl,
-			   (batadv_ogm_packet->flags & BATADV_DIRECTLINK ?
+			   ((batadv_ogm_packet->flags & BATADV_DIRECTLINK) ?
 			    "on" : "off"),
 			   hard_iface->net_dev->name,
 			   hard_iface->net_dev->dev_addr);
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index 4cb77ed..3c981d0 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
 <at>  <at>  -182,7 +182,7  <at>  <at>  struct batadv_ogm_packet;
 struct seq_file;
 struct sk_buff;

-#define BATADV_PRINT_VID(vid) (vid & BATADV_VLAN_HAS_TAG ? \
+#define BATADV_PRINT_VID(vid) ((vid & BATADV_VLAN_HAS_TAG) ? \
(Continue reading)

Sven Eckelmann | 23 Apr 13:16 2015

[PATCH 1/2] batman-adv: update copyright years for 2015

Signed-off-by: Sven Eckelmann <sven@...>
---
 Makefile.kbuild         | 2 +-
 bat_algo.h              | 2 +-
 bat_iv_ogm.c            | 2 +-
 bitarray.c              | 2 +-
 bitarray.h              | 2 +-
 bridge_loop_avoidance.c | 2 +-
 bridge_loop_avoidance.h | 2 +-
 debugfs.c               | 2 +-
 debugfs.h               | 2 +-
 distributed-arp-table.c | 2 +-
 distributed-arp-table.h | 2 +-
 fragmentation.c         | 2 +-
 fragmentation.h         | 2 +-
 gateway_client.c        | 2 +-
 gateway_client.h        | 2 +-
 gateway_common.c        | 2 +-
 gateway_common.h        | 2 +-
 hard-interface.c        | 2 +-
 hard-interface.h        | 2 +-
 hash.c                  | 2 +-
 hash.h                  | 2 +-
 icmp_socket.c           | 2 +-
 icmp_socket.h           | 2 +-
 main.c                  | 2 +-
 main.h                  | 2 +-
 multicast.c             | 2 +-
 multicast.h             | 2 +-
 network-coding.c        | 2 +-
(Continue reading)

Sven Eckelmann | 22 Apr 21:12 2015

[PATCH-next] batman-adv: Remove unused compat function batadv_free_rcu_softif_vlan

The commit e78c16c0550c ("batman-adv: Revert "fix var name to keep
compatibility with old kernels"") should have renamed the function to
batadv_free_rcu_softif_vlan instead of adding a new function
batadv_free_rcu_vlan because it was only used in this single place.

Signed-off-by: Sven Eckelmann <sven@...>
---
This patch is complete optional and would only silence a build_test warning
until the master branch becomes the next branch. But this would create a merge
conflict because batadv_free_rcu_softif_vlan is already removed in master.
---
 compat.c | 9 ---------
 compat.h | 1 -
 2 files changed, 10 deletions(-)

diff --git a/compat.c b/compat.c
index 516d06c..f8e213f 100644
--- a/compat.c
+++ b/compat.c
 <at>  <at>  -33,15 +33,6  <at>  <at>  void batadv_free_rcu_orig_vlan(struct rcu_head *rcu)
 	kfree(vlan);
 }

-void batadv_free_rcu_softif_vlan(struct rcu_head *rcu)
-{
-	struct batadv_softif_vlan *vlan;
-
-	vlan = container_of(rcu, struct batadv_softif_vlan, rcu);
-
-	kfree(vlan);
(Continue reading)

Omar Shrit | 21 Apr 17:26 2015
Picon

Installing issue (Makefile configuration doesn't exist)

HI everybody:

I have four Raspberry Pi's, connected as a mesh network, I am trying
to  use Batman as routing protocol (the batman-adv module is used),
however I need to have the log file, and debug folder, as they already
doesn’t exist in the installed module in the Linux kernel.
The FAQ page explained that I have to re-install the module and
modifying the Makefile Debug option to y ,
In fact I have found that only the module which exist in the website
of Batman have these options in the Makefile, the makefile of the
module that exist in the Linux kernel is different, and doesn’t have
any option ,
by default the batman module in the Linux kernel doesn’t enable the
Debug option as I'm using in my RPI's Raspian with kernel version
3.18.5
Does anyone have any idea about how to change the options in the
module Makefile in Linux kernel before installing it ??, I need to use
cross-compile for compiling the kernel.
All suggestions are welcomed.

Thanks.

Sven Eckelmann | 21 Apr 14:48 2015

[PATCHv2] batman-adv: Document multicast compile time option

The README.external lists all options which can be enabled/disabled during
compile time. The CONFIG_BATMAN_ADV_MCAST option wasn't document in this
list.

Signed-off-by: Sven Eckelmann <sven@...>
---
v2: Remove the wrong Makefile change which slipped into the patch

 README.external | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README.external b/README.external
index e3b533d..f068273 100644
--- a/README.external
+++ b/README.external
 <at>  <at>  -38,6 +38,7  <at>  <at>  module).  Available  options  and  their    possible   values are
  * CONFIG_BATMAN_ADV_DEBUG=[y|n*] (B.A.T.M.A.N. debugging)
  * CONFIG_BATMAN_ADV_BLA=[y*|n] (B.A.T.M.A.N. bridge loop avoidance)
  * CONFIG_BATMAN_ADV_DAT=[y*|n] (B.A.T.M.A.N. Distributed ARP Table)
+ * CONFIG_BATMAN_ADV_MCAST=[y*|n] (B.A.T.M.A.N. multicast optimizations)
  * CONFIG_BATMAN_ADV_NC=[y|n*] (B.A.T.M.A.N. Network Coding)

 e.g., debugging can be enabled by
--

-- 
2.1.4

Sven Eckelmann | 21 Apr 12:45 2015

[PATCHv3 1/3] batman-adv: Use kernel-like folder structure

The person submitting the patches to the Networking maintainer has to take
each patch and move files around and add some files to make it work in the
actual kernel tree. Having all files included and already  in the correct
kernel tree layout should make this a lot easier.

The only files not part of the kernel tree are compat-include and every
regular file in the top level directory.

Signed-off-by: Sven Eckelmann <sven@...>
---
v3: Rebased it on current master without the the hashtable patches
v2:
 * Cleaned up the Makefile
 * Rebased on top of 9f01c16a4409e43e86629418fae9184fabb59da5
 * Use symlink to show the Documentation/networking/batman-adv.txt as README
   in the root folder

 .../ABI/testing/sysfs-class-net-batman-adv         |  0
 .../ABI/testing/sysfs-class-net-mesh               |  0
 README => Documentation/networking/batman-adv.txt  |  0
 Makefile                                           | 22 +++++++++++++++-------
 Makefile.kbuild => net/batman-adv/Makefile         |  0
 bat_algo.h => net/batman-adv/bat_algo.h            |  0
 bat_iv_ogm.c => net/batman-adv/bat_iv_ogm.c        |  0
 bitarray.c => net/batman-adv/bitarray.c            |  0
 bitarray.h => net/batman-adv/bitarray.h            |  0
 .../batman-adv/bridge_loop_avoidance.c             |  0
 .../batman-adv/bridge_loop_avoidance.h             |  0
 debugfs.c => net/batman-adv/debugfs.c              |  0
 debugfs.h => net/batman-adv/debugfs.h              |  0
(Continue reading)

Sven Eckelmann | 21 Apr 12:42 2015

[PATCH] batman-adv: Document multicast compile time option

The README.external lists all options which can be enabled/disabled during
compile time. The CONFIG_BATMAN_ADV_MCAST option wasn't document in this
list.

Signed-off-by: Sven Eckelmann <sven@...>
---
 Makefile        | 1 +
 README.external | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index 8a04d12..d8bd4ef 100644
--- a/Makefile
+++ b/Makefile
 <at>  <at>  -59,6 +59,7  <at>  <at>  BUILD_FLAGS := \
 	CONFIG_BATMAN_ADV_NC=$(CONFIG_BATMAN_ADV_NC) \
 	CONFIG_BATMAN_ADV_MCAST=$(CONFIG_BATMAN_ADV_MCAST) \
 	INSTALL_MOD_DIR=updates/net/batman-adv/
+export batman-adv-y += ../../compat.o

 all: config
 	$(MAKE) -C $(KERNELPATH) $(BUILD_FLAGS)	modules
diff --git a/README.external b/README.external
index e3b533d..f068273 100644
--- a/README.external
+++ b/README.external
 <at>  <at>  -38,6 +38,7  <at>  <at>  module).  Available  options  and  their    possible   values are
  * CONFIG_BATMAN_ADV_DEBUG=[y|n*] (B.A.T.M.A.N. debugging)
  * CONFIG_BATMAN_ADV_BLA=[y*|n] (B.A.T.M.A.N. bridge loop avoidance)
  * CONFIG_BATMAN_ADV_DAT=[y*|n] (B.A.T.M.A.N. Distributed ARP Table)
(Continue reading)

Sven Eckelmann | 21 Apr 10:42 2015

[PATCHv6 1/2] batman-adv: Remove dynamically allocated hashtables

It is unnecessary to allocate an extra memory region for hashtables and the
corresponding locks. This brings the hashes used in batman-adv slightly in
the direction of the common statically sized hash table implementation.
More common hashtable functionality cannot be used batman-adv wide because
the simple hashtable and rhashtable implementations don't provide bucket
based locking.

A side-effect of this change is the initialization of each array of locks
for each hashtable with a different lock_class. This allows to correct
nesting of write access to two different hashtables withouttriggering
a lockdep warning.

This also fixes the problem of unprotected access to the pointer to the
hashtables. These were dynamically allocated/freed and the pointers were
stored in batadv_priv*. Access to these pointers were never protected by
any lock and using them could always lead to problems when the batman-adv
device was removed.

Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw <at> public.gmane.org>
---
v6:

 * remove kerneldoc about hash_lock in types.h when there was no hash_lock in
   the struct batadv_priv_dat

v5: Rebased on top of patches:

 * batman-adv: Remove explicit compat.h include and split compat.h
 * batman-adv: Add required to includes to all files
 * batman-adv: Remove unused IFF_BRIDGE_PORT live patching hack
(Continue reading)

Sven Eckelmann | 21 Apr 08:35 2015

Re: [PATCHv4 4/4] batman-adv: Automatically create nested kfree_rcu helper functions

On Tuesday 21 April 2015 11:52:16 Marek Lindner wrote:
> On Friday, April 17, 2015 19:40:30 Sven Eckelmann wrote:
> > The kfree_rcu compat helper for old kernels require a special function
> > that
> > knows how to calculate the offsets to the actual data pointer to call
> > kfree. These can either be manually provided or the GCC extension for
> > nested functions can be used to automatically create a local function
> > using a macro.
> > 
> > Signed-off-by: Sven Eckelmann <sven@...>
> > ---
> > 
> > v4:
> >  * rebased on top of master with merged patches from
> >  
> >    https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2015-April/012985.htm
> >    l
> > 
> > v3: no change
> > v2: no change
> > 
> >  Makefile                        |   1 -
> >  compat-include/linux/rcupdate.h |  15 +++++
> >  compat.c                        | 120
> > 
> > ----------------------------------------
> > compat.h                        |  20 -------
> > 
> >  4 files changed, 15 insertions(+), 141 deletions(-)
> >  delete mode 100644 compat.c
(Continue reading)

Sven Eckelmann | 21 Apr 08:19 2015

Re: [PATCHv4 1/4] batman-adv: Remove explicit compat.h include and split compat.h

On Tuesday 21 April 2015 11:41:48 Marek Lindner wrote:
> On Friday, April 17, 2015 19:40:27 Sven Eckelmann wrote:
> > The current approach for the compat layer is to include the compat.h file
> > at exactly the right time to provide additional functionality and to live
> > patch the batman-adv sources. This has the problem that the compat.h file
> > becomes harder to read over time. Also live patching and adding of
> > missing functionality partially conflict. This becomes obvious when the
> > include order in some files is different compared to the one the author
> > of an compat.h entry expected.
> > 
> > A different approach is to inject intermediate header files which add
> > additional features. This allows to reduce the size of compat.h and only
> > leaves the live patching part in it. The compat.h can then added
> > automatically to each compile run before anything else is included.
> > compat.h has therefore the control which headers must be included before
> > the live patching of the batman-adv source can begin.
> > 
> > Signed-off-by: Sven Eckelmann <sven@...>
> 
> Applied in revision 8746f0f.

The patch you've added is not the one I've send. All files in compat-include 
are missing now in your commit.

Btw. I had prepared a patch v5 which fixed some merge conflicts with the state 
of the next from yesterday.

Kind regards,
	Sven

Gmane