[B.A.T.M.A.N.] [RFC v6 5/5] batman-adv: throughput meter implementation

2016-05-09 Thread Sven Eckelmann
-by: Sven Eckelmann --- v6: * increase total_bytes to 64 bit to allow higher speeds/longer test times * still waiting for decision about whether this signaling approach with netlink is ok before trying to add compat-code --- compat-include/net/genetlink.h |3 +- include/uapi/linux

[B.A.T.M.A.N.] [RFC v6 4/4] batctl: introduce throughput meter support

2016-05-09 Thread Sven Eckelmann
elapsed time are printed to stdout, otherwise occurred an error message is displayed (on stdout) accordingly. Based on a prototype from Edo Monticelli Signed-off-by: Antonio Quartulli Signed-off-by: Sven Eckelmann --- Makefile | 1 + batman_adv.h | 39 + main.c | 6 + main.h

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

2016-05-09 Thread Sven Eckelmann
On Wednesday 04 May 2016 16:30:07 Andrew Lunn wrote: > +int netlink_print_originators(char *mesh_iface, int read_opts, > + float orig_timeout, > + float watch_interval) > +{ > + char *header; > + int ifindex; > + > + ifindex

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

2016-05-09 Thread Sven Eckelmann
On Wednesday 04 May 2016 16:30:07 Andrew Lunn wrote: > + [BATADV_ATTR_THROUGHPUT]= { .type = NLA_FLAG }, Why is throughput a flag when you access it with throughput_kbits = nla_get_u32(attrs[BATADV_ATTR_THROUGHPUT]); Most likely just a copy+paste error and it should be NLA_U32

[B.A.T.M.A.N.] [PATCH v7 1/4] batman-adv: add generic netlink family for batman-adv

2016-05-09 Thread Sven Eckelmann
add genl family, add missing kerneldoc] Signed-off-by: Sven Eckelmann --- MAINTAINERS | 1 + Makefile| 1 + compat-include/net/genetlink.h | 34 include/uapi/linux/batman_adv.h | 53 ++ net

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

2016-05-09 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 Eckelmann --- net/batman-adv/fragmentation.c | 41

[B.A.T.M.A.N.] [PATCH v7 2/4] batman-adv: add netlink command to query generic mesh information files

2016-05-09 Thread Sven Eckelmann
[sven.eckelm...@open-mesh.com: Reduce the number of changes to BATADV_CMD_GET_MESH_INFO, add missing kerneldoc, add policy for attributes] Signed-off-by: Sven Eckelmann --- compat.h| 6 ++ include/uapi/linux/batman_adv.h | 18 ++ net/batman-adv/netlink.c| 135

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

2016-05-09 Thread Sven Eckelmann
-by: Sven Eckelmann --- v7: * add compatibility code for v3.13 * make batadv_netlink_mcgrps non-const because v3.12 needs it writable v6: * increase total_bytes to 64 bit to allow higher speeds/longer test times --- compat-include/net/genetlink.h | 124 +++- include/uapi/linux/batman_adv.h

[B.A.T.M.A.N.] [PATCH v7 4/4] batctl: introduce throughput meter support

2016-05-09 Thread Sven Eckelmann
elapsed time are printed to stdout, otherwise occurred an error message is displayed (on stdout) accordingly. Based on a prototype from Edo Monticelli Signed-off-by: Antonio Quartulli Signed-off-by: Sven Eckelmann --- Makefile | 1 + batman_adv.h | 39 + main.c | 6 + main.h

[B.A.T.M.A.N.] [PATCH v7 1/4] batctl: Split list of objects in Makefile into separate lines

2016-05-09 Thread Sven Eckelmann
From: Sven Eckelmann The line of objects which are required to compile batctl gets longer and becomes harder to read. Instead save each object on its own line to make it easier to edit and easier to solve conflicts when multiple patches modify the list of objects. Signed-off-by: Sven Eckelmann

[B.A.T.M.A.N.] [PATCH v7 3/4] batctl: Add attributes/command for BATADV_CMD_GET_MESH_INFO

2016-05-09 Thread Sven Eckelmann
From: Sven Eckelmann BATADV_CMD_GET_MESH_INFO will be used as common function to retrieve information from the kernel. This information can be used to display a header for debugfs tables. Signed-off-by: Sven Eckelmann Forwarded: https://patchwork.open-mesh.org/patch/16080/ --- batman_adv.h

[B.A.T.M.A.N.] [PATCH v7 2/4] batctl: Add basic infrastructure to integrate netlink

2016-05-09 Thread Sven Eckelmann
From: Sven Eckelmann Netlink can be used to add new communication functionality to the kernel module. It can also be used to replace the old debugfs files. The binary interface used for this will be defined in the added files. Signed-off-by: Sven Eckelmann Forwarded: https://patchwork.open

[B.A.T.M.A.N.] [PATCH v7 0/8] batman-adv: throughput meter

2016-05-09 Thread Sven Eckelmann
Hi, I was told that the general approach seems to be ok. I have therefore prepared the compatibility wrapper for multicast netlink for Linux <3.12. The batctl patches didn't change but were only resubmitted. The changes since v6: * add compatibility code for v3.13 * make batadv_netlink_mcgrps

Re: [B.A.T.M.A.N.] [PATCHv4 00/12] netns and netlink support

2016-05-09 Thread Sven Eckelmann
On Monday 09 May 2016 20:07:07 Andrew Lunn wrote: > This patchset completes netns support, by disabling debugfs entries > when not in the default name space, and correctly handling interface > stack loops when the parent is in a different name space. > > It additionally adds netlink support for mos

Re: [B.A.T.M.A.N.] [PATCHv4 00/12] netns and netlink support

2016-05-09 Thread Sven Eckelmann
On Monday 09 May 2016 20:29:21 Sven Eckelmann wrote: > On Monday 09 May 2016 20:07:07 Andrew Lunn wrote: > > This patchset completes netns support, by disabling debugfs entries > > when not in the default name space, and correctly handling interface > > stack loops wh

Re: [B.A.T.M.A.N.] [PATCHv4 00/12] netns and netlink support

2016-05-10 Thread Sven Eckelmann
On Monday 09 May 2016 21:06:08 Andrew Lunn wrote: > > I hope this helps to reduce the conflicts (even when not resolving it > > completely) between the tp_meter and the netlink patchset. > > Hi Sven > > Do you want to take over my patches and merge them all into one set? No, this is the last thi

Re: [B.A.T.M.A.N.] [PATCHv14 0/4] Multicast optimizations for bridges

2016-05-10 Thread Sven Eckelmann
On Tuesday 10 May 2016 02:03:11 Linus Lüssing wrote: > On Thu, May 05, 2016 at 11:15:28PM +0200, Sven Eckelmann wrote: > > On Thursday 05 May 2016 17:07:01 Linus Lüssing wrote: > > > This patchset can be found in the current linus/multicast-bridge > > > branch. > &g

Re: [B.A.T.M.A.N.] [PATCHv14 0/4] Multicast optimizations for bridges

2016-05-10 Thread Sven Eckelmann
On Tuesday 10 May 2016 09:43:00 Sven Eckelmann wrote: > > * linux/icmp6.h in multicast.c > > -> icmp6_hdr() > > * linux/ipv6.h in multicast.c > > -> ipv6_hdr() > > > > * net/addrconf.h in multicast.c > > -> ipv6_mc_check_mld() >

Re: [B.A.T.M.A.N.] [PATCHv4 00/12] netns and netlink support

2016-05-10 Thread Sven Eckelmann
On Tuesday 10 May 2016 09:00:49 Sven Eckelmann wrote: > On Monday 09 May 2016 21:06:08 Andrew Lunn wrote: > > > I hope this helps to reduce the conflicts (even when not resolving it > > > completely) between the tp_meter and the netlink patchset. > > > > Hi Sven

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: fix skb deref after free

2016-05-10 Thread Sven Eckelmann
ing - buffer unicast packets before forward") Reviewed-by: Sven Eckelmann Kind regards, Sven signature.asc Description: This is a digitally signed message part.

[B.A.T.M.A.N.] [PATCH] batman-adv: Remove unused include atomic.h

2016-05-10 Thread Sven Eckelmann
The only atomic_* function was removed in the bat_v.c and thus the include should also be removed. Fixes: 71e957cd30a0 ("batman-adv: init ELP tweaking options only once") Signed-off-by: Sven Eckelmann --- net/batman-adv/bat_v.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/

Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Set skb priority in fragments

2016-05-10 Thread Sven Eckelmann
On Monday 09 May 2016 20:03:35 Andrew Lunn wrote: > BATMAN will set the skb->priority based on the IP precedence or 802.1q > tag. However, if it needs to fragment the frame, it currently leaves > the fragment skb with the default priority and actually overwrites the > priority in the unfragmented f

Re: [B.A.T.M.A.N.] [PATCH v2] batman-adv: init ELP tweaking options only once

2016-05-11 Thread Sven Eckelmann
On Tuesday 10 May 2016 22:31:59 Marek Lindner wrote: > The ELP interval and throughput override interface settings are initialized > with default settings on every time an interface is added to a mesh. > This patch prevents this behavior by moving the configuration init to the > interface detection

[B.A.T.M.A.N.] [PATCH] batman-adv: Only init ELP tweaking options when BATMAN_V is enabled

2016-05-11 Thread Sven Eckelmann
From: Sven Eckelmann The build currently fails with CONFIG_BATMAN_ADV_BATMAN_V=n because hard_iface->bat_v is only defined when CONFIG_BATMAN_ADV_BATMAN_V=y is set. The initialization of bat_v.throughput_override/bat_v.elp_interval must therefore only be compiled in when also BATMAN_V is enab

[B.A.T.M.A.N.] [PATCH v8 0/4] batman-adv: throughput meter

2016-05-11 Thread Sven Eckelmann
Hi, Marek applied some of the netlink patches to get the initial support for a netlink family in the kernel. He also started to merge some of the batctl patches. These were removed from this patchset. Antonio also suggested that all *_IFNAME attributes should be limited to IFNAMSIZ in userspac

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

2016-05-11 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 Eckelmann --- v8: * rebase on current master --- net/batman-adv

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

2016-05-11 Thread Sven Eckelmann
-by: Sven Eckelmann --- v8: * rebase on current master v7: * add compatibility code for v3.13 * make batadv_netlink_mcgrps non-const because v3.12 needs it writable v6: * increase total_bytes to 64 bit to allow higher speeds/longer test times --- compat-include/net/genetlink.h | 124

[B.A.T.M.A.N.] [PATCH v8 1/2] batctl: Add attributes/command for BATADV_CMD_GET_MESH_INFO

2016-05-11 Thread Sven Eckelmann
From: Sven Eckelmann BATADV_CMD_GET_MESH_INFO will be used as common function to retrieve information from the kernel. This information can be used to display a header for debugfs tables. Signed-off-by: Sven Eckelmann --- v8: * check *_IFNAME to not be larger than IFNAMSIZ as suggested by

[B.A.T.M.A.N.] [PATCH v8 2/2] batctl: introduce throughput meter support

2016-05-11 Thread Sven Eckelmann
elapsed time are printed to stdout, otherwise occurred an error message is displayed (on stdout) accordingly. Based on a prototype from Edo Monticelli Signed-off-by: Antonio Quartulli Signed-off-by: Sven Eckelmann --- v8: * rebase on current master --- Makefile | 1 + batman_adv.h | 39

Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: remove forward declaration by including proper header

2016-05-11 Thread Sven Eckelmann
On Wednesday 11 May 2016 18:29:16 Antonio Quartulli wrote: > If main.h is included, the forward declaration for struct batadv_priv > is not required. > > Cc: Sven Eckelmann > Signed-off-by: Antonio Quartulli > --- > > Sven, is there any special region for not having

Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: remove forward declaration by including proper header

2016-05-11 Thread Sven Eckelmann
On Wednesday 11 May 2016 18:47:30 Antonio Quartulli wrote: [...] > Maybe I could include it only when really needed, i.e. > * net/batman-adv/bat_algo.h > * net/batman-adv/bat_v_ogm.h > > (netlink.h does not seem to be requiring it) This is rather vague and hard to detect automatically. Potentia

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: B.A.T.M.A.N. V - implement hard-iface init function

2016-05-11 Thread Sven Eckelmann
On Wednesday 11 May 2016 18:29:17 Antonio Quartulli wrote: > diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c > index a8cda76..a757229 100644 > --- a/net/batman-adv/hard-interface.c > +++ b/net/batman-adv/hard-interface.c > @@ -15,6 +15,7 @@ > * along with this progr

Re: [B.A.T.M.A.N.] Problem with DHCP on batman-adv V

2016-05-11 Thread Sven Eckelmann
On Wednesday 11 May 2016 18:58:48 Alvaro Antelo wrote: > Hi everyone, > > I am testing batman-adv V5 from the development feed on Chaos Calmer > and so far everything is working except for DHCP IPv4, only static > addresses. > In the same setup wich involves bridges connected to bat0 interfaces, >

Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: remove forward declaration by including proper header

2016-05-12 Thread Sven Eckelmann
On Friday 13 May 2016 05:07:18 Antonio Quartulli wrote: [...] > ok, how about adding it to any header file than (which is probably what you > were suggesting in the first place)? Yes, this was my first suggestion. Just packet.h and main.h have to be left out. I can also add a check to the daily b

Re: [B.A.T.M.A.N.] [PATCH v4 1/6] batman-adv: prevent multiple ARP replies sent by gateways if dat enbled

2016-05-13 Thread Sven Eckelmann
> --- a/net/batman-adv/distributed-arp-table.c > +++ b/net/batman-adv/distributed-arp-table.c > @@ -48,6 +48,7 @@ > #include "originator.h" > #include "send.h" > #include "translation-table.h" > +#include "bridge_loop_avoidance.h" Please try to keep the includes in alphabetical order like this:

[B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Include main.h in all files

2016-05-13 Thread Sven Eckelmann
main.h includes statements which (re)define preprocessor variables which influence the compiled code. This makes it necessary to include it in all files. For example, it redefines pr_fmt used to the module as prefix for each pr_* message. Reported-by: Antonio Quartulli Signed-off-by: Sven

[B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Keep includes ordered

2016-05-13 Thread Sven Eckelmann
It is easier to detect if a include is already there for a used functionality when the includes are ordered. Using an alphabetic order together with the grouping in commit 7df620092727 ("batman-adv: Add required includes to all files") makes includes better manageable. Signed-of

Re: [B.A.T.M.A.N.] [PATCH 1/7] batman-adv: remove useless inline attribute for sysfs helper function

2016-05-15 Thread Sven Eckelmann
On Sunday 08 May 2016 18:59:56 Sven Eckelmann wrote: [] > Now you can for example run the build tests and receive the mail: > > REMOTE=/home/sven/tmp/qemu-batman/batman-adv TO=sven ./checkstuff.sh The repo was updated to support the multicast patches. I've also introduce

[B.A.T.M.A.N.] [PATCH v3 2/6] batman-adv: Keep includes ordered by filename

2016-05-15 Thread Sven Eckelmann
It is easier to detect if a include is already there for a used functionality when the includes are ordered. Using an alphabetic order together with the grouping in commit 7df620092727 ("batman-adv: Add required includes to all files") makes includes better manageable. Signed-of

[B.A.T.M.A.N.] [PATCH v3 4/6] batman-adv: move bat_algo functions into a separate file

2016-05-15 Thread Sven Eckelmann
helper functions in main.c. Signed-off-by: Sven Eckelmann --- v3: - introduce this patch --- net/batman-adv/Makefile| 1 + net/batman-adv/bat_algo.c | 140 + net/batman-adv/bat_algo.h | 12 net/batman-adv/bat_v_ogm.c

[B.A.T.M.A.N.] [PATCH v3 1/6] batman-adv: Include main.h in all files

2016-05-15 Thread Sven Eckelmann
main.h includes statements which (re)define preprocessor variables which influence the compiled code. This makes it necessary to include it in all files. For example, it redefines pr_fmt used to the module as prefix for each pr_* message. Reported-by: Antonio Quartulli Signed-off-by: Sven

[B.A.T.M.A.N.] [PATCH v3 3/6] batman-adv: split tvlv into a separate file

2016-05-15 Thread Sven Eckelmann
less in the other helper functions in main.c Signed-off-by: Markus Pargmann [s...@narfation.org: fix conflicts with current version, fix includes, rewrote commit message] Signed-off-by: Sven Eckelmann --- v3: - Patch was resurrected from https://patchwork.open-mesh.org/patch/4244/ - rewrote

[B.A.T.M.A.N.] [PATCH v3 5/6] batman-adv: Consolidate logging related functions

2016-05-15 Thread Sven Eckelmann
There are several places in batman-adv which provide logging related functions. These should be grouped together in the log.* files to make them easier to find. Reported-by: Markus Pargmann Signed-off-by: Sven Eckelmann --- v3: - introduce this patch --- net/batman-adv/Makefile

[B.A.T.M.A.N.] [PATCH v3 6/6] batman-adv: Fix bat_(iv|v) function declaration header

2016-05-15 Thread Sven Eckelmann
The bat_algo.h had some functions declared which were not part of the bat_algo.c file. These are instead stored in bat_v.c and bat_iv_ogm.c. The declaration should therefore be also in bat_v.h and bat_iv_ogm,h to make them easier to find. Signed-off-by: Sven Eckelmann --- v3: - introduce this

[B.A.T.M.A.N.] [RFC] batman-adv: use kmem_cache for translation table

2016-05-15 Thread Sven Eckelmann
?, batadv_tt_req_node?, Signed-off-by: Sven Eckelmann --- net/batman-adv/main.c | 16 +- net/batman-adv/translation-table.c | 115 ++--- net/batman-adv/translation-table.h | 3 + 3 files changed, 125 insertions(+), 9 deletions(-) diff --git a

Re: [B.A.T.M.A.N.] kmalloc() vs. kmem_cache_alloc() for global TT?

2016-05-15 Thread Sven Eckelmann
On Saturday 14 May 2016 16:51:29 Linus Lüssing wrote: > Hi, > > Is anyone familiar with the implications of using kmalloc() vs. > kmem_cache_alloc()? Not just allocation speed, but also RAM > fragmentation is something I'm currently wondering about. Yes, it should reduce the effects of allocating

Re: [B.A.T.M.A.N.] kmalloc() vs. kmem_cache_alloc() for global TT?

2016-05-15 Thread Sven Eckelmann
On Sunday 15 May 2016 14:06:26 Linus Lüssing wrote: [...] > [0] > https://git.open-mesh.org/batman-adv.git/shortlog/refs/heads/linus/kmem-cac > he This patchset has a bad bug. It still uses kfree for tt_local objects allocated via kmem_cache_(z)alloc. Kind regards, Sven signature.asc De

Re: [B.A.T.M.A.N.] kmalloc() vs. kmem_cache_alloc() for global TT?

2016-05-15 Thread Sven Eckelmann
On Sunday 15 May 2016 14:15:01 Sven Eckelmann wrote: > On Sunday 15 May 2016 14:06:26 Linus Lüssing wrote: > [...] > > > [0] > > https://git.open-mesh.org/batman-adv.git/shortlog/refs/heads/linus/kmem-ca > > c > > he > > This patchset has a bad bug. I

Re: [B.A.T.M.A.N.] kmalloc() vs. kmem_cache_alloc() for global TT?

2016-05-15 Thread Sven Eckelmann
On Sunday 15 May 2016 14:37:33 Linus Lüssing wrote: > On Sun, May 15, 2016 at 02:15:01PM +0200, Sven Eckelmann wrote: > > On Sunday 15 May 2016 14:06:26 Linus Lüssing wrote: > > [...] > > > > > [0] > > > https://git.open-mesh.org/batman-adv.git/shortlog/re

Re: [B.A.T.M.A.N.] kmalloc() vs. kmem_cache_alloc() for global TT?

2016-05-15 Thread Sven Eckelmann
On Sunday 15 May 2016 14:41:38 Linus Lüssing wrote: > On Sun, May 15, 2016 at 02:06:26PM +0200, Linus Lüssing wrote: > > Ok, yes, that's what I had looked at yesterday, too. > > Btw., these were the results from slabinfo I got yesterday. The > first one before applying the patches, the second one

[B.A.T.M.A.N.] [PATCH next] batman-adv: Fix build against recent Debian Stretch kernels

2016-05-15 Thread Sven Eckelmann
avoided by making the top Makefile kbuild compatible and redefining the NOSTDINC_FLAGS when kbuild include this Makefile. The actual build of the batman-adv module is then done by adding the subdirectory to obj-y. Signed-off-by: Sven Eckelmann --- Makefile | 10 ++ 1 file changed, 6

[B.A.T.M.A.N.] [PATCH] batman-adv: Consolidate logging related functions

2016-05-15 Thread Sven Eckelmann
There are several places in batman-adv which provide logging related functions. These should be grouped together in the log.* files to make them easier to find. Reported-by: Markus Pargmann Signed-off-by: Sven Eckelmann --- v4: - remove linux/kernel.h v3: - introduce this patch --- net

Re: [B.A.T.M.A.N.] kmalloc() vs. kmem_cache_alloc() for global TT?

2016-05-15 Thread Sven Eckelmann
On Sunday 15 May 2016 23:26:32 Linus Lüssing wrote: [...] > Yes, it's not ar71xx like you have, it's x86-64/amd64 in a > VM. sizeof() actually tells me 144 bytes for a tg entry. And 56 > bytes for an orig-list entry (like I wrote before). Ah, sorry. I was doing something else when I received the m

Re: [B.A.T.M.A.N.] [PATCH v5 05/11] batman-adv: netlink: add translation table query

2016-05-16 Thread Sven Eckelmann
On Monday 16 May 2016 18:08:46 Andrew Lunn wrote: > @@ -69,6 +123,8 @@ enum batadv_nl_commands { > BATADV_CMD_GET_MESH_INFO, > BATADV_CMD_GET_ROUTING_ALGOS, > BATADV_CMD_GET_HARDIFS, > + BATADV_CMD_GET_TRANSTABLE_LOCAL, > + BATADV_CMD_GET_TRANSTABLE_GLOBAL, >

Re: [B.A.T.M.A.N.] [PATCH v5 10/11] batman-adv: add B.A.T.M.A.N. Dump BLA claims via netlink

2016-05-16 Thread Sven Eckelmann
On Monday 16 May 2016 18:08:51 Andrew Lunn wrote: > @@ -143,6 +153,7 @@ enum batadv_nl_commands { > BATADV_CMD_GET_ORIGINATORS, > BATADV_CMD_GET_NEIGHBORS, > BATADV_CMD_GET_GATEWAYS, > + BATADV_CMD_GET_BLA_CLAIM, > /* add new commands above here */ > __

Re: [B.A.T.M.A.N.] [PATCH v5 07/11] batman-adv: add B.A.T.M.A.N. IV bat_{orig, neigh}_dump implementations

2016-05-16 Thread Sven Eckelmann
On Monday 16 May 2016 18:08:48 Andrew Lunn wrote: > + if (batadv_iv_ogm_neigh_dump_hardif( > + msg, portid, cb->nlh->nlmsg_seq, > + bat_priv, hard_iface, &idx)) { > + i_hardif--;

Re: [B.A.T.M.A.N.] [PATCH v5 00/11] netns and netlink support

2016-05-16 Thread Sven Eckelmann
On Monday 16 May 2016 18:08:41 Andrew Lunn wrote: > * Complete all the kerneldoc cut/paste work requested by Sven. Hihi, thank you :) It would have been nice when you would also have added a comment about all the other changes. I've noticed: * added missing attribute BATADV_ATTR_THROUGHPUT to

Re: [B.A.T.M.A.N.] Node movement

2016-05-16 Thread Sven Eckelmann
On Monday 16 May 2016 19:05:26 Andrei Palade wrote: > I installed batman-adv on 4-Raspberry Pi Model 3, and I now want to > emulate an out of reach situation. Instead of physically moving the > PIs into another room, I want to use some mechanism that will do this > for me. I ran the following comma

Re: [B.A.T.M.A.N.] [PATCH v6 00/11] netns and netlink support

2016-05-16 Thread Sven Eckelmann
On Monday 16 May 2016 19:27:58 Andrew Lunn wrote: > * No change to code indentation. I consider it a false positive. The > code is more readable the way it is, checkpatch is happy, and it > does not violate anything in CodingStyle, as far as i can see. @Antonio, @Marek, @Simon: Do you want to

Re: [B.A.T.M.A.N.] [PATCH v6 01/11] batman-adv: Handle parent interfaces in a different netns

2016-05-16 Thread Sven Eckelmann
On Monday 16 May 2016 19:27:59 Andrew Lunn wrote: > +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0) > + > +/* WARNING for batadv_getlink_net */ > +#define get_link_net get_xstats_size || 0 || netdev->rtnl_link_ops- >get_xstats_size > + > +#endif /* < KERNEL_VERSION(4, 0, 0) */ This should be "||

Re: [B.A.T.M.A.N.] [PATCH v6 01/11] batman-adv: Handle parent interfaces in a different netns

2016-05-17 Thread Sven Eckelmann
On Tuesday 17 May 2016 14:18:35 Andrew Lunn wrote: > I'm actually getting close to the point where i'm going to give up. Ok, I will try to not review anything from you again. Sorry for trying to inform you about things which would make it harder to get these patches accepted and sent upstream.

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

2016-05-17 Thread Sven Eckelmann
Hi, Antonio was kind enough to provide some feedback about the patchset. I have taken his suggestion and integrated all of them in the patchset. batman-adv: * rebase on top of current master+"batman-adv: Include main.h in all files"+ "batman-adv: Keep includes ordered by filename" * adjust

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

2016-05-17 Thread Sven Eckelmann
-by: Sven Eckelmann --- v9: * rebase on top of current master+"batman-adv: Include main.h in all files"+ "batman-adv: Keep includes ordered by filename" * adjust BATADV_DBG_TP_METER to bit 7 to avoid conflicts with mcast * Renamed BATADV_TP_SIGINT to BATADV_TP_REAS

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

2016-05-17 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 Eckelmann --- v9: * rebase on top of current master+"batma

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

2016-05-17 Thread Sven Eckelmann
elapsed time are printed to stdout, otherwise occurred an error message is displayed (on stdout) accordingly. Based on a prototype from Edo Monticelli Signed-off-by: Antonio Quartulli Signed-off-by: Sven Eckelmann --- v9: - rebase on top of current master - added include guards to tp_meter.h

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

2016-05-17 Thread Sven Eckelmann
elapsed time are printed to stdout, otherwise occurred an error message is displayed (on stdout) accordingly. Based on a prototype from Edo Monticelli Signed-off-by: Antonio Quartulli Signed-off-by: Sven Eckelmann --- v10: - fix "a a" typo in batman_adv.h v9: - rebase on top of curr

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

2016-05-18 Thread Sven Eckelmann
On Wednesday 18 May 2016 10:16:11 Antonio Quartulli wrote: [...] > one very last question (sorry for not spotting this earlier): if we don't > handle > the TP meter with the icmp_socket anymore, why do we tight the TP > initialization > to the socket initialization ? > > Is there any reason to h

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

2016-05-18 Thread Sven Eckelmann
On Wednesday 18 May 2016 13:04:44 Antonio Quartulli wrote: > I also have a question: I have another bugfix that should only be > applied to 4.6 and not to 4.7/net-next - should I directly send it > to sta...@vger.kernel.org ? Allow me to give some background info: The bug was (accidentally) fixed

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

2016-05-18 Thread Sven Eckelmann
Hi, Antonio had some extra suggestions about the tpmeter. All are now included in the patchset. I have also noticed some problems with the patches (net.git/net-next.git) scheduled for 4.7 which required some adjustments to the netlink code. batman-adv: * moved batadv_tp_meter_init to batadv_ini

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

2016-05-18 Thread Sven Eckelmann
-by: Sven Eckelmann --- v11: * moved batadv_tp_meter_init to batadv_init (main.c) * fixed missing space in kerneldoc between "<" and "0" * port to nla_put_u64_64bit * add compat code for nla_put_u64_64bit * introduce attribute BATADV_ATTR_PAD which is used

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

2016-05-18 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 Eckelmann --- v11: * no changes v10: * no changes v9: * rebase on

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

2016-05-18 Thread Sven Eckelmann
elapsed time are printed to stdout, otherwise occurred an error message is displayed (on stdout) accordingly. Based on a prototype from Edo Monticelli Signed-off-by: Antonio Quartulli Signed-off-by: Sven Eckelmann --- v11: * introduce new attribute BATADV_ATTR_PAD used for u64 alignment v10

[B.A.T.M.A.N.] [PATCH] batman-adv: Ignore auto-generated files in compat-sources

2016-05-18 Thread Sven Eckelmann
Signed-off-by: Sven Eckelmann --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 59c6a30..4c03561 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ /compat-autoconf.h /compat-autoconf.h.tmp +/compat-sources/**/.* +/compat-sources/**/*.o

Re: [B.A.T.M.A.N.] mesh losing internal Ilayer3 connectivity

2016-05-20 Thread Sven Eckelmann
On Thursday 19 May 2016 14:22:58 Nick Schaf wrote: > I've run into what sounds like a similar problem, but dove in and found more > details. Here's the setup: > > -19 nodes running BATMAN-adv 2014.14.0 on OpenWrt Chaos Calmer; various > hardware (D-Link, BBB, Open-Mesh, WRTnode, TP-Link). Only s

[B.A.T.M.A.N.] [PATCH next v2] batman-adv: Fix build against recent Debian stretch kernels

2016-05-20 Thread Sven Eckelmann
by making the top Makefile kbuild compatible and redefining the NOSTDINC_FLAGS when kbuild includes this Makefile. The actual build of the batman-adv module is then done by adding the subdirectory to obj-y. Signed-off-by: Sven Eckelmann --- v2: - Fixed noise from other patches in context (should

[B.A.T.M.A.N.] [PATCH] batctl: Fix format string for raw tp_meter output

2016-05-20 Thread Sven Eckelmann
The tp_meter output for raw bytes is not casting the values to float. It must therefore use PRIu64 to print the results. Reported-by: Simon Wunderlich Signed-off-by: Sven Eckelmann --- tp_meter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tp_meter.c b/tp_meter.c

[B.A.T.M.A.N.] [PATCH] batman-adv: remove unused vid local variable in tt seq print

2016-05-20 Thread Sven Eckelmann
From: Simon Wunderlich Signed-off-by: Simon Wunderlich Signed-off-by: Sven Eckelmann --- net/batman-adv/translation-table.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index bfb90b6..fff1f38 100644 --- a/net

[B.A.T.M.A.N.] [PATCH] batman-adv: fix returned error in batadv_netlink_tp_meter_cancel

2016-05-20 Thread Sven Eckelmann
-by: Simon Wunderlich Signed-off-by: Sven Eckelmann --- net/batman-adv/netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/batman-adv/netlink.c b/net/batman-adv/netlink.c index 56e63ce..c25bbb8 100644 --- a/net/batman-adv/netlink.c +++ b/net/batman-adv/netlink.c

Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: remove useless forward declarations

2016-05-21 Thread Sven Eckelmann
On Saturday 21 May 2016 20:17:55 Antonio Quartulli wrote: > If main.h is included, the batman-adv private forward declarations are > not needed anymore. Remove them. No, these are defined in packet.h and not main.h/types.h Kind regards, Sven > net/batman-adv/gateway_client.h | 1 - > ne

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: move include line at the same place as other files

2016-05-21 Thread Sven Eckelmann
On Saturday 21 May 2016 20:17:56 Antonio Quartulli wrote: > main.h is always included after the #ifdef guard except for > bat_v_elp.h. Move it at the right place. > > Cc: Sven Eckelmann > Signed-off-by: Antonio Quartulli > --- Good find :) Reviewed-by: Sven Eckelm

Re: [B.A.T.M.A.N.] [PATCHv3] batman-adv: B.A.T.M.A.N. V - implement hard-iface init function

2016-05-21 Thread Sven Eckelmann
On Saturday 21 May 2016 20:16:14 Antonio Quartulli wrote: > Some fields in the hard-interface data structure are specific to the > B.A.T.M.A.N. V protocol and have to be initialized only when such > protocol is compiled in. > Instead of having a #ifdef block in the middle of the hard-interface.c >

Re: [B.A.T.M.A.N.] [PATCH v4] batman-adv: B.A.T.M.A.N. V - implement hard-iface init function

2016-05-21 Thread Sven Eckelmann
-interface.c > code it is better to have an algorithm private function that hides the > precompiler logic in its own header file (like other functions). > > Fixes: ffd2f27908e5 ("batman-adv: Only init ELP tweaking options when > BATMAN_V is enabled") Signed-off-by: Antoni

Re: [B.A.T.M.A.N.] [PATCH v8 05/14] batman-adv: netlink: add translation table query

2016-05-26 Thread Sven Eckelmann
Hi, thanks a lot for your feedback. On Thursday 26 May 2016 06:39:14 Linus Lüssing wrote: > On Mon, May 23, 2016 at 05:59:36PM +0200, Simon Wunderlich wrote: > > +static int > > +batadv_tt_local_dump_entry(struct sk_buff *msg, u32 portid, u32 seq, > > + struct batadv_priv *b

Re: [B.A.T.M.A.N.] [PATCH v4 5/6] batman-adv: B.A.T.M.A.N. V - implement GW selection logic

2016-05-27 Thread Sven Eckelmann
On Wednesday 25 May 2016 23:27:35 Antonio Quartulli wrote: > +#ifdef CONFIG_BATMAN_ADV_BATMAN_V > +struct batadv_gw_node *batadv_gw_node_get(struct batadv_priv *bat_priv, > + struct batadv_orig_node *orig_node); > +#endif /* CONFIG_BATMAN_ADV_BATMAN_V */ Thi

Re: [B.A.T.M.A.N.] [PATCH v4 5/6] batman-adv: B.A.T.M.A.N. V - implement GW selection logic

2016-05-27 Thread Sven Eckelmann
On Friday 27 May 2016 21:57:29 Antonio Quartulli wrote: [...] > Do you think it makes more sense to keep the declaration and whitelist the > function in your test ? Yes, this is the right thing(tm) to do. I've already whitelisted it for the unused-symbol check :) Otherwise sparse and smatch will

[B.A.T.M.A.N.] [PATCH v3] batman-adv: Fix build against recent Debian Stretch kernels

2016-05-28 Thread Sven Eckelmann
avoided by making the top Makefile kbuild compatible and redefining the NOSTDINC_FLAGS when kbuild include this Makefile. The actual build of the batman-adv module is then done by adding the subdirectory to obj-y. Signed-off-by: Sven Eckelmann --- v3: - append NOSTDINC_FLAGS with our own flags

[B.A.T.M.A.N.] [PATCH 2/5] batman-adv: Define module rtnl link name

2016-05-28 Thread Sven Eckelmann
The batman-adv module can automatically be loaded when operations over the rtnl link are triggered. This requires only the correct rtnl link name in the module header. Signed-off-by: Sven Eckelmann --- net/batman-adv/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/batman-adv

[B.A.T.M.A.N.] [PATCH 1/5] batman-adv: Clean up untagged vlan when destroying via rtnl-link

2016-05-28 Thread Sven Eckelmann
The untagged vlan object is only destroyed when the interface is removed via the legacy sysfs interface. But it also has to be destroyed when the standard rtnl-link interface is used. Fixes: 952cebb57518 ("batman-adv: add per VLAN interface attribute framework") Signed-off-by: Sven Eck

[B.A.T.M.A.N.] [PATCH 5/5] batman-adv: Revert "postpone sysfs removal when unregistering"

2016-05-28 Thread Sven Eckelmann
Postponing the removal of the interface breaks the expected behavior of NETDEV_UNREGISTER and NETDEV_PRE_TYPE_CHANGE. This is especially problematic when an interface is removed and added in quick succession. This reverts commit a33c882c10692b99ce647c929cb90c62e87fa083. Signed-off-by: Sven

[B.A.T.M.A.N.] [PATCH 3/5] batman-adv: Use rtnl link in device creation example

2016-05-28 Thread Sven Eckelmann
The standard kernel API to add new virtual interfaces and attach other interfaces to it is rtnl-link. batman-adv supports it since v3.10. This functionality should be used instead of the legacy batman-adv-only sysfs interface. Signed-off-by: Sven Eckelmann --- Documentation/networking/batman

[B.A.T.M.A.N.] [PATCH 4/5] batman-adv: Modify mesh_iface outside sysfs context

2016-05-28 Thread Sven Eckelmann
then free to get the required locks and the deadlock is avoided. Signed-off-by: Sven Eckelmann --- net/batman-adv/sysfs.c | 107 + net/batman-adv/types.h | 13 ++ 2 files changed, 94 insertions(+), 26 deletions(-) diff --git a/net/batman-adv

[B.A.T.M.A.N.] [PATCH 6/6] batman-adv: Avoid sysfs name collision for netns moves

2016-05-29 Thread Sven Eckelmann
e the sysfs entry before it does the kobject_put. This removal is done even when the reference counter is not yet zero and thus avoids the problem. Signed-off-by: Sven Eckelmann --- Minor addition while testing the patchset with namespaces + CONFIG_DEBUG_KOBJECT_RELEASE=y Idea was taken from b

[B.A.T.M.A.N.] [PATCH-maint] batman-adv: Fix ICMP RR ethernet access after skb_linearize

2016-05-29 Thread Sven Eckelmann
. Fixes: bb69cb678d37 ("batman-adv: generalize batman-adv icmp packet handling") Signed-off-by: Sven Eckelmann --- net/batman-adv/routing.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index 0c0c30e..27e07dd 100644 --- a/net/

[B.A.T.M.A.N.] [PATCH maint] batman-adv: Fix use-after-free of tt_req_node

2016-05-29 Thread Sven Eckelmann
last context frees the list. Fixes: cea194d90b11 ("batman-adv: improved client announcement mechanism") Signed-off-by: Sven Eckelmann --- Cc: Matthias Schiffer : this can also be interesting for batman-adv-legacy installations on servers with more than one core net/batman-adv/translati

Re: [B.A.T.M.A.N.] [PATCH maint] batman-adv: Fix use-after-free of tt_req_node

2016-05-29 Thread Sven Eckelmann
On Sunday 29 May 2016 22:33:39 Sven Eckelmann wrote: > The tt_req_node is added and removed from a list inside a spinlock. But the > locking is sometimes removed even when the object is still referenced and > will be used later via this reference. For example batadv_send_tt_request >

[B.A.T.M.A.N.] [PATCH v2] batman-adv: Fix use-after-free/double-free of tt_req_node

2016-05-29 Thread Sven Eckelmann
94d90b11 ("batman-adv: improved client announcement mechanism") Signed-off-by: Sven Eckelmann --- v2: - fixed list->object in commit message - add example what could have gone wrong in commit message --- net/batman-adv/translation-table.c | 27 +++ net/batman-adv/t

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Remove unused primary_if variable

2016-05-31 Thread Sven Eckelmann
Hi, On Tuesday 24 May 2016 17:18:06 Linus Lüssing wrote: [...] > diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c > index 5a7923c..2076048 100644 > --- a/net/batman-adv/bat_iv_ogm.c > +++ b/net/batman-adv/bat_iv_ogm.c > @@ -529,35 +529,26 @@ static void batadv_iv_ogm_emit(str

Re: [B.A.T.M.A.N.] [PATCH v4 3/6] batman-adv: statically print gateway table header

2016-05-31 Thread Sven Eckelmann
was not updated accordingly. > > Signed-off-by: Antonio Quartulli > --- Reviewed-by: Sven Eckelmann Kind regards, Sven signature.asc Description: This is a digitally signed message part.

Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Less function calls in batadv_is_ap_isolated() after error detection

2016-05-31 Thread Sven Eckelmann
. > > * Avoid this double check by reordering a function call sequence > and the better selection of jump targets. > > * Omit the initialisation for these variables at the beginning then. > > Signed-off-by: Markus Elfring > --- Reviewed-by: Sven Eckelmann See *

Re: [B.A.T.M.A.N.] [PATCH v4 1/6] batman-adv: split routing API data structure in subobjects

2016-05-31 Thread Sven Eckelmann
o Quartulli > --- My eyes don't want to read diffs anymore which only removes bat_ and replaces a "_" with a ".". I want more interesting stuff happening in my movies^Wpatches :) Reviewed-by: Sven Eckelmann Btw. this is rather unrelated to your patch. But the ker

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