Andreas Pape | 9 Feb 08:01 2016

Antwort: Re: Looping unicast packets when using BLA

Hi Simon,

thanks for the quick reply.

Simon Wunderlich <sw@...> schrieb am 08.02.2016 13:29:55:

> Von: Simon Wunderlich <sw@...>
> An: b.a.t.m.a.n@...
> Kopie: Andreas Pape <APape@...>
> Datum: 09.02.2016 07:20
> Betreff: Re: [B.A.T.M.A.N.] Looping unicast packets when using BLA
>
> Hi Andreas,
>
> On Monday 08 February 2016 12:35:35 Andreas Pape wrote:
> > Hello
> >
> > I have a problem in my mesh setup which is quite similiar to Bug#216
of
> > the bug tracker.
> > I'm using batman-adv 2014.4.0 in a BLA setup consisting of 3 Mesh
Nodes
> > (A, B, C) connected to the same backone network via a common switch
and a
> > mesh node D connected to an end device E. I ping that single mesh node
D
> > and the connected end device E from a PC which is connected to the
same
> > switch as the three Nodes A to C. BLA is compiled and enabled.
>
(Continue reading)

Andreas Pape | 8 Feb 12:35 2016

Looping unicast packets when using BLA

Hello

I have a problem in my mesh setup which is quite similiar to Bug#216 of
the bug tracker.
I'm using batman-adv 2014.4.0 in a BLA setup consisting of 3 Mesh Nodes
(A, B, C) connected to the same backone network via a common switch and a
mesh node D connected to an end device E. I ping that single mesh node D
and the connected end device E from a PC which is connected to the same
switch as the three Nodes A to C. BLA is compiled and enabled.

From time to time I see looping unicast packets in my backbone network.
This unicast looping starts directly after one of the nodes A to C claimed
the mac address of my PC. The looping telegram is then the ping request
sent by the PC. I have a wireshark recording made in my backbone via port
mirroring of one of the switch ports where a mesh node is connected to
which shows this behaviour.

I am not sure if I understood bla correctly but isn't it nonsense that a
bla backbone gateway claims MAC addresses from its own backbone (i.e. the
one it is directly connected to via its ethernet port)?

A simple change in batadv_bla_rx seems to solve this problem: add an
additional check before claiming a new mac address: if this address is
already known from the tt local table (via command batadv_is_my_client)
don't claim it.

This seems to solve my problem as far as I have tested so far. Any
thoughts about that?

Best regards,
(Continue reading)

Andrew Lunn | 2 Feb 03:11 2016
Picon

Re: [PATCH 3/4] batman-adv: Handle parent interfaces in a different netns

On Mon, Feb 01, 2016 at 10:57:55AM +0800, Antonio Quartulli wrote:
> On Wed, Jan 27, 2016 at 11:13:53AM +0100, Sven Eckelmann wrote:
> > On Wednesday 20 January 2016 18:48:29 Andrew Lunn wrote:
> > > nameplace, so also retrieve the parents name space when finding the
> > 
> > s/nameplace/namespace/ ?
> > 
> > > Additionally, veth devices come in pairs and they are each others
> > > parents. Don't infinitely recurse in this situation.
> > 
> > Can we have this part as extra patch so Antonio can ask David for a stable 
> > backport?
> 
> Andrew,
> 
> do you have any plan about resending this fix ?
> Sven also sent a pair of fixes and it would be nice I could send everything in
> on pull request.

Sorry, been in the wilderness the last few days.

I will try to resend tomorrow. If not, it will be Thursday.  If you
want it sooner, feel free to fix it up yourself and add your own
Signed-off by, next to mine.

	   Andrew

Simon Wunderlich | 1 Feb 15:21 2016
Picon

[PATCHv2 1/2] batman-adv: move and restructure batadv_v_ogm_forward

From: Simon Wunderlich <simon@...>

To match our code better to the protocol description of B.A.T.M.A.N. V,
move batadv_v_ogm_forward() out into batadv_v_ogm_process_per_outif()
and move all checks directly deciding whether the OGM should be
forwarded into batadv_v_ogm_forward().

Signed-off-by: Simon Wunderlich <simon@...>
---
Changes to PATCH:
 * fix some embarassing compile issues and style issues (thanks Marek)
---
 net/batman-adv/bat_v_ogm.c | 110 ++++++++++++++++++++++++++-------------------
 1 file changed, 63 insertions(+), 47 deletions(-)

diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c
index d9bcbe6..341ff27 100644
--- a/net/batman-adv/bat_v_ogm.c
+++ b/net/batman-adv/bat_v_ogm.c
 <at>  <at>  -347,10 +347,12  <at>  <at>  static u32 batadv_v_forward_penalty(struct batadv_priv *bat_priv,
 }

 /**
- * batadv_v_ogm_forward - forward an OGM to the given outgoing interface
+ * batadv_v_ogm_forward - check conditions and forward an OGM to the given
+ *  outgoing interface
  *  <at> bat_priv: the bat priv with all the soft interface information
  *  <at> ogm_received: previously received OGM to be forwarded
- *  <at> throughput: throughput to announce, may vary per outgoing interface
+ *  <at> orig_node: the originator which has been updated
(Continue reading)

Sven Eckelmann | 1 Feb 13:26 2016

Re: [PATCHv2 next 2/3] batman-adv: convert wifi driver throughput to multiples of 100kbps

On Monday 01 February 2016 14:34:33 Marek Lindner wrote:
> The expected throughout returned by the cfg80211 API is expressed in kbps
> while internally batman-adv stores multiples of 100kbps. Ensure the
> conversion is performed properly.
> 
> Fixes: 5c324517 ("ELP - compute the metric based on the estimated throughput")
> 
> Signed-off-by: Marek Lindner <mareklindner@...>
> ---
>  net/batman-adv/bat_v_elp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
> index 46c6a00..461a765 100644
> --- a/net/batman-adv/bat_v_elp.c
> +++ b/net/batman-adv/bat_v_elp.c
>  <at>  <at>  -100,7 +100,7  <at>  <at>  static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
>  				return 0;
>  			}
>  			if (!ret)
> -				return sinfo.expected_throughput / 10;
> +				return sinfo.expected_throughput / 100;
>  		}

Just tested it here and can say that it now show the same value as
`iw dev adhoc0 station dump`. But the output of `iw dev adhoc0 station dump`
confuses me. I can get easily get over 40 Mbit/s but the output of
`iw dev adhoc0 station dump` show me 4.705Mbps. Also the output of
`cat /sys/kernel/debug/ieee80211/phy*/netdev\:adhoc0/stations/*/rc_stats` look
definitely more like ~40 Mbit/s.
(Continue reading)

Sven Eckelmann | 31 Jan 13:27 2016

[PATCH-maint 1/2] batman-adv: Only put gw_node list reference when removed

The batadv_gw_node reference counter in batadv_gw_node_update can only be
reduced when the list entry was actually removed. Otherwise the reference
counter may reach zero when batadv_gw_node_update is called from two
different contexts for the same gw_node but only one context is actually
removing the entry from the list.

The release function for this gw_node is not called inside the list_lock
spinlock protected region because the function batadv_gw_node_update still
holds a gw_node reference for the object pointer on the stack. Thus the
actual release function (when required) will be called only at the end of
the function.

Fixes: 0511575c4d03 ("batman-adv: remove obsolete deleted attribute for gateway node")
Signed-off-by: Sven Eckelmann <sven@...>
---
 net/batman-adv/gateway_client.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c
index 8350775..c9b8b48 100644
--- a/net/batman-adv/gateway_client.c
+++ b/net/batman-adv/gateway_client.c
 <at>  <at>  -527,11 +527,12  <at>  <at>  void batadv_gw_node_update(struct batadv_priv *bat_priv,
 		 * gets dereferenced.
 		 */
 		spin_lock_bh(&bat_priv->gw.list_lock);
-		hlist_del_init_rcu(&gw_node->list);
+		if (!hlist_unhashed(&gw_node->list)) {
+			hlist_del_init_rcu(&gw_node->list);
+			batadv_gw_node_free_ref(gw_node);
(Continue reading)

Ufo | 30 Jan 21:28 2016
Picon
Gravatar

Fwd: [OpenWrt] #21756: batman-adv & batctl errors

i am missing batman-adv inside openwrt since some weeks :-o
please someone may have a look on it.. i just created a ticket on
openwrt for that

greeting, ufo

-------- Weitergeleitete Nachricht --------
Betreff: [OpenWrt] #21756: batman-adv & batctl errors
Datum: Sat, 30 Jan 2016 20:24:50 -0000
Von: OpenWrt <openwrt-devel@...>
Antwort an: openwrt-devel@...
Kopie (CC): openwrt-tickets@...

#21756: batman-adv & batctl errors
-------------------------+---------------------------------------
 Reporter:  ufo <at> …        |      Owner:  developers
     Type:  defect       |     Status:  new
 Priority:  normal       |  Milestone:  Designated Driver (Trunk)
Component:  base system  |    Version:  Trunk
 Keywords:               |
-------------------------+---------------------------------------
 batman-adv and batctl packages cant be built with openwrt at the moment.
 so its not built there:
 http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/

--
Ticket URL: <https://dev.openwrt.org/ticket/21756>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology

(Continue reading)

Andrew Lunn | 29 Jan 04:01 2016
Picon

Re: [PATCH] batctl: Add support for network namespaces

On Thu, Jan 28, 2016 at 12:06:38PM +0800, Antonio Quartulli wrote:
> On Thu, Jan 28, 2016 at 04:54:19AM +0100, Andrew Lunn wrote:
> > When running within a network namespace, access to files within
> > debugfs have to take into account the network name space. Each
> > namespace has its own directory under
> > /sys/kernel/debug/batman_adv/netns.
> 
> Thanks for providing the batctl patch Andrew.
> 
> What do you think about documenting this feature in the README file as well?
> Imho a few words in the "How does it work?" section plus an example on how to
> use it would be really nice!

Yes, i can do that. Here is a little example for three nodes which i
used for testing.

     Andrew

EMU1="ip netns exec emu1"
EMU2="ip netns exec emu2"

ip netns add emu1
ip netns add emu2

ip link add emu1-veth1 type veth peer name emu2-veth1
ip link set emu1-veth1 netns emu1
ip link set emu2-veth1 netns emu2

$EMU1 ip link set emu1-veth1 name veth1
$EMU2 ip link set emu2-veth1 name veth1
(Continue reading)

Andrew Lunn | 28 Jan 04:54 2016
Picon

[PATCH] batctl: Add support for network namespaces

When running within a network namespace, access to files within
debugfs have to take into account the network name space. Each
namespace has its own directory under
/sys/kernel/debug/batman_adv/netns.

Signed-off-by: Andrew Lunn <andrew@...>
---
 debug.h   |  2 +-
 debugfs.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/debug.h b/debug.h
index df65f50..ac7a97b 100644
--- a/debug.h
+++ b/debug.h
 <at>  <at>  -25,7 +25,7  <at>  <at> 
 #include <stddef.h>
 #include "main.h"

-#define DEBUG_BATIF_PATH_FMT "%s/batman_adv/%s"
+#define DEBUG_BATIF_PATH_FMT "%s/batman_adv/%s%s"
 #define DEBUG_TRANSTABLE_GLOBAL "transtable_global"
 #define DEBUG_LOG "log"
 #define DEBUG_ROUTING_ALGOS "routing_algos"
diff --git a/debugfs.c b/debugfs.c
index 3c58195..a66dbdd 100644
--- a/debugfs.c
+++ b/debugfs.c
 <at>  <at>  -20,11 +20,15  <at>  <at> 

(Continue reading)

Andrew Lunn | 28 Jan 04:53 2016
Picon

[PATCH 1/3] alfred: vis: Use debugfs_make_path helper

By using the helper, knowledge of network namespaces can be kept to
within the helper.

Signed-off-by: Andrew Lunn <andrew@...>
---
 vis/vis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vis/vis.c b/vis/vis.c
index c1f8dad..d1640b6 100644
--- a/vis/vis.c
+++ b/vis/vis.c
 <at>  <at>  -325,7 +325,7  <at>  <at>  static int parse_orig_list(struct globals *globals)
 	char path[1024];
 	struct vis_list_entry *v_entry;

-	snprintf(path, sizeof(path), "/sys/kernel/debug/batman_adv/%s/originators", globals->interface);
+	debugfs_make_path(DEBUG_BATIF_PATH_FMT "/" "originators", globals->interface, path, sizeof(path));
 	fbuf = read_file(path);
 	if (!fbuf)
 		return -1;
--

-- 
2.7.0.rc3

Andrew Lunn | 28 Jan 04:50 2016
Picon

Re: [PATCH 0/4] batman-adv: Add network name space support

> Andrew,
> 
> I guess that after this patchset gets applied we need to change batctl and
> provide some "netns" argument similar to ip ?

I have patches already. No new arguments needed. batctl and alfred
simply manipulate BATMAN in the current netns.

       Andrew


Gmane