[B.A.T.M.A.N.] [PATCH 14/15] batman-adv: Merge batadv_v_ogm_orig_update into batadv_v_ogm_route_update

2016-05-03 Thread Antonio Quartulli
From: Simon Wunderlich Since batadv_v_ogm_orig_update() was only called from one place and the calling function became very short, merge these two functions together. This should also reflect the protocol description of B.A.T.M.A.N. V better. Signed-off-by: Simon

[B.A.T.M.A.N.] [PATCH 12/15] batman-adv: fix debuginfo macro style issue

2016-05-03 Thread Antonio Quartulli
From: Simon Wunderlich Structure initialization within the macros should follow the general coding style used in the kernel: put the initialization of the first variable and the closing brace on a separate line. Reported-by: Antonio Quartulli

[B.A.T.M.A.N.] [PATCH 10/15] batman-adv: Add kernel-doc for batadv_interface_rx

2016-05-03 Thread Antonio Quartulli
From: Sven Eckelmann Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/soft-interface.c | 18 ++ 1 file changed, 18 insertions(+)

[B.A.T.M.A.N.] [PATCH 11/15] batman-adv: Fix function names on new line starting with '*'

2016-05-03 Thread Antonio Quartulli
From: Sven Eckelmann Some really long function names in batman-adv require a newline between return type and the function name. This has lead to some lines starting with *batadv_... This * belongs to the return type and thus should be on the same line as the return type.

[B.A.T.M.A.N.] [PATCH 13/15] batman-adv: move and restructure batadv_v_ogm_forward

2016-05-03 Thread Antonio Quartulli
From: Simon Wunderlich 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().

[B.A.T.M.A.N.] [PATCH 15/15] batman-adv: Split batadv_iv_ogm_orig_del_if function

2016-05-03 Thread Antonio Quartulli
From: Sven Eckelmann batadv_iv_ogm_orig_del_if handles two different buffers bcast_own and bcast_own_sum which should be resized. The error handling two for allocating these buffers causes the complexity of this function. This can be avoided completely when the function is

[B.A.T.M.A.N.] [PATCH 09/15] batman-adv: Fix kerneldoc for batadv_compare_claim

2016-05-03 Thread Antonio Quartulli
From: Sven Eckelmann Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/bridge_loop_avoidance.c | 2 +- 1 file changed, 1 insertion(+), 1

[B.A.T.M.A.N.] [PATCH 06/15] batman-adv: use to_delayed_work

2016-05-03 Thread Antonio Quartulli
From: Geliang Tang Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang Reviewed-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli

[B.A.T.M.A.N.] [PATCH 05/15] batman-adv: use list_for_each_entry_safe

2016-05-03 Thread Antonio Quartulli
From: Geliang Tang Use list_for_each_entry_safe() instead of list_for_each_safe() to simplify the code. Signed-off-by: Geliang Tang Acked-by: Antonio Quartulli Reviewed-by: Sven Eckelmann Signed-off-by: Marek

[B.A.T.M.A.N.] [PATCH 07/15] batman-adv: fix wrong names in kerneldoc

2016-05-03 Thread Antonio Quartulli
Signed-off-by: Antonio Quartulli [s...@narfation.org: Fix additional names] Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner --- net/batman-adv/bridge_loop_avoidance.c | 2 +- net/batman-adv/distributed-arp-table.c |

[B.A.T.M.A.N.] [PATCH 03/15] batman-adv: Start new development cycle

2016-05-03 Thread Antonio Quartulli
From: Simon Wunderlich Signed-off-by: Simon Wunderlich Signed-off-by: Antonio Quartulli --- net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/batman-adv/main.h

[B.A.T.M.A.N.] [PATCH 02/15] MAINTAINERS: Add BATMAN ADVANCED documentation files

2016-05-03 Thread Antonio Quartulli
From: Sven Eckelmann The sysfs ABI documentation files and the batman-adv.txt are maintained by the BATMAN ADVANCED maintainers and patches for them should therefore be sent to them. Signed-off-by: Sven Eckelmann Signed-off-by: Antonio Quartulli

[B.A.T.M.A.N.] pull request: batman-adv 20160504

2016-05-03 Thread Antonio Quartulli
Hello David, this is a pull request intended for net-next. In this batch you don't have any patch that depends on our fixes, therefore you can safely merge it even if the net tree has not been merged yet. In this patchset you basically have some cleanup work, code refactoring, style fixes and

[B.A.T.M.A.N.] [PATCH 01/15] MAINTAINERS: Mark BATMAN ADVANCED mailing list as moderated

2016-05-03 Thread Antonio Quartulli
From: Sven Eckelmann The mailing list of b.a.t.m.a.n@lists.open-mesh.org is moderated for non-subscribers and non-whitelisted addresses. Such mails will be delayed but the sender will not be informed about the moderation. Signed-off-by: Sven Eckelmann

Re: [B.A.T.M.A.N.] [PATCHv2] batctl: Use netlink to replace some of debugfs

2016-05-03 Thread Andrew Lunn
> > Once the code is mostly complete and stable, i think a local copy > > would be good. It does seems to be the common way. > > A local copy sounds like a sensible choice and common practice. Hi Marek v3 has a local copy. Andrew

Re: [B.A.T.M.A.N.] [PATCHv2] batctl: Use netlink to replace some of debugfs

2016-05-03 Thread Marek Lindner
On Tuesday, May 03, 2016 14:20:46 Andrew Lunn wrote: > On Tue, May 03, 2016 at 09:07:35AM +0200, Sven Eckelmann wrote: > > [...] > > > > > +ifeq ($(origin LIBNL_GENL_CFLAGS) $(origin LIBNL_GENL_LDLIBS), > > > undefined undefined) + LIBNL_GENL_NAME ?= libnl-genl-3.0 > > > + ifeq ($(shell

Re: [B.A.T.M.A.N.] [PATCHv3] batctl: Use netlink to replace some of debugfs

2016-05-03 Thread Andrew Lunn
Hi Sven > diff --git a/debug.c b/debug.c > index 3db3ed9..c61970e 100644 > --- a/debug.c > +++ b/debug.c > @@ -23,10 +23,12 @@ > #include > #include > #include > +#include > > #include "debug.h" > #include "debugfs.h" > #include "functions.h" > +#include "netlink.h" > #include

Re: [B.A.T.M.A.N.] [PATCHv3] batctl: Use netlink to replace some of debugfs

2016-05-03 Thread Sven Eckelmann
On Tuesday 03 May 2016 18:30:26 Andrew Lunn wrote: [...] > --- > Makefile | 13 +- > batman_adv.h | 111 +++ > debug.c | 19 +- > debug.h |4 +- > functions.c | 11 + > functions.h |2 + > main.h |1 + > netlink.c| 1024 >

Re: [B.A.T.M.A.N.] pull request [net]: batman-adv 20160430

2016-05-03 Thread David Miller
From: Antonio Quartulli Date: Tue, 3 May 2016 22:42:29 +0800 > Do you have any plan on merging net into net-next in the following days ? > > I am asking because I'd prefer to avoid you the hassle of dealing with the > conflicts. I'll try to do this in the next few days.

[B.A.T.M.A.N.] [PATCH net-next 4/5] treewide: replace dev->trans_start update with helper

2016-05-03 Thread Florian Westphal
Replace all trans_start updates with netif_trans_update helper. change was done via spatch: struct net_device *d; @@ - d->trans_start = jiffies + netif_trans_update(d) Compile tested only. Cc: user-mode-linux-de...@lists.sourceforge.net Cc: linux-xte...@linux-xtensa.org Cc:

Re: [B.A.T.M.A.N.] pull request [net]: batman-adv 20160430

2016-05-03 Thread Antonio Quartulli
On Tue, May 03, 2016 at 12:18:13AM -0400, David Miller wrote: > Pulled, thanks Antonio. Thanks a lot David. We now have some patches for net-next that somewhat depend on the fixes you have recently pulled. Do you have any plan on merging net into net-next in the following days ? I am asking

Re: [B.A.T.M.A.N.] [PATCHv2] batctl: Use netlink to replace some of debugfs

2016-05-03 Thread Andrew Lunn
On Tue, May 03, 2016 at 02:54:26PM +0200, Sven Eckelmann wrote: > On Tuesday 03 May 2016 14:47:19 Andrew Lunn wrote: > > On Tue, May 03, 2016 at 02:26:34PM +0200, Sven Eckelmann wrote: > > > On Tuesday 03 May 2016 14:20:46 Andrew Lunn wrote: > > > [...] > > > > There does not seem to be a way to

Re: [B.A.T.M.A.N.] [PATCHv2] batctl: Use netlink to replace some of debugfs

2016-05-03 Thread Sven Eckelmann
On Tuesday 03 May 2016 14:47:19 Andrew Lunn wrote: > On Tue, May 03, 2016 at 02:26:34PM +0200, Sven Eckelmann wrote: > > On Tuesday 03 May 2016 14:20:46 Andrew Lunn wrote: > > [...] > > > There does not seem to be a way to say that BATADV_ATTR_VERSION is > > > also an NLA_STRING. > > > > Please

Re: [B.A.T.M.A.N.] [PATCHv2] batctl: Use netlink to replace some of debugfs

2016-05-03 Thread Andrew Lunn
On Tue, May 03, 2016 at 02:26:34PM +0200, Sven Eckelmann wrote: > On Tuesday 03 May 2016 14:20:46 Andrew Lunn wrote: > [...] > > There does not seem to be a way to say that BATADV_ATTR_VERSION is > > also an NLA_STRING. > > Please check "policy" in the link I gave you. I did. And i still don't

Re: [B.A.T.M.A.N.] [PATCHv2] batctl: Use netlink to replace some of debugfs

2016-05-03 Thread Andrew Lunn
> It looks like the header line is missing here. The debugfs table show > something like: > > " Originator last-seen (#/255) Nexthop [outgoingIF]: > Potential nexthops ...\n"); > > or > > " Originator last-seen ( throughput) Nexthop > [outgoingIF]:

Re: [B.A.T.M.A.N.] [v3] Add throughput meter support

2016-05-03 Thread Sven Eckelmann
On Tuesday 03 May 2016 13:28:16 Simon Wunderlich wrote: > On Tuesday 03 May 2016 10:59:07 Sven Eckelmann wrote: > > Hi, > > > > here is the third version of the throughput meter support. It is just a > > rebased version of the patchset with two little bugfixes. Both problems were > > detected and

Re: [B.A.T.M.A.N.] [v3] Add throughput meter support

2016-05-03 Thread Simon Wunderlich
On Tuesday 03 May 2016 10:59:07 Sven Eckelmann wrote: > Hi, > > here is the third version of the throughput meter support. It is just a > rebased version of the patchset with two little bugfixes. Both problems were > detected and reported by Antonio: > > * batctl didn't check if the test_time

Re: [B.A.T.M.A.N.] [PATCHv2] batctl: Use netlink to replace some of debugfs

2016-05-03 Thread Sven Eckelmann
On Tuesday 03 May 2016 14:20:46 Andrew Lunn wrote: [...] > There does not seem to be a way to say that BATADV_ATTR_VERSION is > also an NLA_STRING. Please check "policy" in the link I gave you. Kind regards, Sven signature.asc Description: This is a digitally signed message part.

Re: [B.A.T.M.A.N.] [PATCH v2 3/3] batman-adv: throughput meter implementation

2016-05-03 Thread Antonio Quartulli
On Tue, May 03, 2016 at 10:18:50AM +0200, Sven Eckelmann wrote: > On Tuesday 03 May 2016 01:28:28 Antonio Quartulli wrote: > [...] > > shouldn't we propagate the value saved in err to tp_vars->reason ? > > > > We found this error while using the tp_meter, because we tried to run it > > against a

Re: [B.A.T.M.A.N.] [PATCHv2] batctl: Use netlink to replace some of debugfs

2016-05-03 Thread Andrew Lunn
On Tue, May 03, 2016 at 09:07:35AM +0200, Sven Eckelmann wrote: > [...] > > +ifeq ($(origin LIBNL_GENL_CFLAGS) $(origin LIBNL_GENL_LDLIBS), undefined > > undefined) > > + LIBNL_GENL_NAME ?= libnl-genl-3.0 > > + ifeq ($(shell $(PKG_CONFIG) --modversion $(LIBNL_GENL_NAME) > > 2>/dev/null),) > >

Re: [B.A.T.M.A.N.] [PATCHv2] batctl: Use netlink to replace some of debugfs

2016-05-03 Thread Sven Eckelmann
[] > +static int originators_callback(struct nl_msg *msg, void *arg) > +{ [...] > + > + if (!genlmsg_valid_hdr(nlh, 0)) { > + fputs("Received invalid data from kernel.", stderr); [...] > + > + orig = nla_data(attrs[BATADV_ATTR_ORIG_ADDRESS]); > + neigh =

Re: [B.A.T.M.A.N.] [PATCHv2] batctl: Use netlink to replace some of debugfs

2016-05-03 Thread Sven Eckelmann
> #include "debug.h" > #include "debugfs.h" > #include "functions.h" > +#include "netlink.h" > #include "sys.h" Header file is missing in this patch. Kind regards, Sven signature.asc Description: This is a digitally signed message part.

Re: [B.A.T.M.A.N.] [PATCHv2] batctl: Use netlink to replace some of debugfs

2016-05-03 Thread Sven Eckelmann
On Monday 02 May 2016 22:56:57 Andrew Lunn wrote: > The kernel has gained support for exporting some information via > netlink. Use this when available, rather than debugfs. > > If netlink is not available, or the information is not yet available > via netlink, batctl will fall back to debugfs.

[B.A.T.M.A.N.] [PATCH v3] batctl: introduce throughput meter support

2016-05-03 Thread Sven Eckelmann
From: Antonio Quartulli Add command to launch the throughput meter test. The throughput meter is a batman kernelspace tool for throughput measurements. The syntax is: batctl tp The test is interruptible with SIGINT or SIGTERM; if the test succeeds with no

[B.A.T.M.A.N.] [PATCH v3 3/3] batman-adv: throughput meter implementation

2016-05-03 Thread Sven Eckelmann
From: Antonio Quartulli The throughput meter module is a simple, kernel-space replacement for throughtput measurements tool like iperf and netperf. It is intended to approximate TCP behaviour. It is invoked through batctl: the protocol is connection oriented,

[B.A.T.M.A.N.] [PATCH v3 2/3] batman-adv: use another ICMP packet when sending command from userspace

2016-05-03 Thread Sven Eckelmann
From: Antonio Quartulli In the current code a real batadv ICMP packet is used to communicate from userspace to the module which ICMP operation should be start (the operation to start depends on the size of the received packet). This worked good so far because the

[B.A.T.M.A.N.] [PATCH v3 1/3] batman-adv: return netdev status in the TX path

2016-05-03 Thread Sven Eckelmann
From: Antonio Quartulli Return the proper netdev TX status along the TX path so that the tp_meter can understand when the queue is full and should stop sending packets. Signed-off-by: Antonio Quartulli Signed-off-by: Sven

[B.A.T.M.A.N.] [v3] Add throughput meter support

2016-05-03 Thread Sven Eckelmann
Hi, here is the third version of the throughput meter support. It is just a rebased version of the patchset with two little bugfixes. Both problems were detected and reported by Antonio: * batctl didn't check if the test_time is > 0 before doing a division * batman-adv wasn't returning an

Re: [B.A.T.M.A.N.] [PATCH v2 3/3] batman-adv: throughput meter implementation

2016-05-03 Thread Sven Eckelmann
On Tuesday 03 May 2016 01:28:28 Antonio Quartulli wrote: [...] > shouldn't we propagate the value saved in err to tp_vars->reason ? > > We found this error while using the tp_meter, because we tried to run it > against a non-existing originator and batctl crashed. Yes, looks like I've missed

Re: [B.A.T.M.A.N.] [PATCHv2] batctl: Use netlink to replace some of debugfs

2016-05-03 Thread Sven Eckelmann
[...] > +ifeq ($(origin LIBNL_GENL_CFLAGS) $(origin LIBNL_GENL_LDLIBS), undefined > undefined) > + LIBNL_GENL_NAME ?= libnl-genl-3.0 > + ifeq ($(shell $(PKG_CONFIG) --modversion $(LIBNL_GENL_NAME) 2>/dev/null),) > +$(error No $(LIBNL_GENL_NAME) development libraries found!) > + endif > +