[B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Add wrapper for ARP reply creation

2016-07-01 Thread Linus Lüssing
Removing duplicate code. Signed-off-by: Linus Lüssing --- Changes in RFC -> non-RFC: * Added kerneldoc * Added Signed-off-by net/batman-adv/distributed-arp-table.c | 61 ++ 1 file changed, 40 insertions(+), 21 deletions(-) diff --git

[B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Snoop DHCPACKs for DAT

2016-07-01 Thread Linus Lüssing
In a typical mesh network, when a new client connects then it will usually first try to grab an IPv4 address via DHCP. Afterwards in public mesh networks a client will try to contact the internet over the server. While the IPv4 address of the DHCP-Server is usually well propagated in the DHT, the

Re: [B.A.T.M.A.N.] pull request for net-next: batman-adv 2016-07-01

2016-07-01 Thread David Miller
From: Simon Wunderlich Date: Fri, 1 Jul 2016 15:08:52 +0200 > we are a bit late to submit our feature patches, but I hope we make it in > time. > Antonio is taking a pause in his upstream work, so I'll be submitting our > batman-adv patches for now. It is my first

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

2016-07-01 Thread Joe Perches
On Fri, 2016-07-01 at 15:08 +0200, Simon Wunderlich wrote: > To make it easier to search through the code it is better to print static > strings directly instead of using format strings printing constants. It's also generally smaller object code and faster at runtime. $ size

Re: [B.A.T.M.A.N.] [PATCH v5 0/6] Optimizations for setups running dat and bla

2016-07-01 Thread Simon Wunderlich
On Monday 13 June 2016 11:01:54 Sven Eckelmann wrote: > On Monday 13 June 2016 10:06:55 Andreas Pape wrote: > > > Btw. there seems to be an "a" missing in "enabled" of the Subject > > > of the first patch :) > > > > Will be corrected as there's another version obviously necessary ...;-) > >

Re: [B.A.T.M.A.N.] [PATCH v5 3/6] batman-adv: prevent duplication of ARP replies when DAT is used

2016-07-01 Thread Simon Wunderlich
On Friday 10 June 2016 13:11:01 Andreas Pape wrote: > If none of the backbone gateways in a bla setup has already knowledge of > the mac address searched for in an incoming ARP request from the backbone > an address resolution via the DHT of DAT is started. The gateway can send > several ARP

Re: [B.A.T.M.A.N.] [PATCH v3 2/4] batman-adv: Fix non-atomic bla_claim::backbone_gw access

2016-07-01 Thread Simon Wunderlich
On Friday 01 July 2016 15:49:43 Sven Eckelmann wrote: > The pointer batadv_bla_claim::backbone_gw can be changed at any time. > Therefore, access to it must be protected to ensure that two function > accessing the same backbone_gw are actually accessing the same. This is > especially important

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

2016-07-01 Thread Simon Wunderlich
On Friday 10 June 2016 13:10:59 Andreas Pape wrote: > If dat is enabled it must be made sure that only the backbone gw which has > claimed the remote destination for the ARP request answers the ARP request > directly if the MAC address is known due to the local dat table. This > prevents multiple

[B.A.T.M.A.N.] [PATCH v3 2/4] batman-adv: Fix non-atomic bla_claim::backbone_gw access

2016-07-01 Thread Sven Eckelmann
The pointer batadv_bla_claim::backbone_gw can be changed at any time. Therefore, access to it must be protected to ensure that two function accessing the same backbone_gw are actually accessing the same. This is especially important when the crc_lock is used or when the backbone_gw of a claim is

Re: [B.A.T.M.A.N.] [PATCH v5 2/6] batman-adv: speed up dat by snooping received ip traffic

2016-07-01 Thread Simon Wunderlich
Hi Andreas, as suggested by yourself and according to the discussion, please drop this patch from the patchset on the next resend. It may be better to resend it separately when the concerns are cleared. Thanks! Simon On Friday 10 June 2016 13:11:00 Andreas Pape wrote: > Speeding up dat

Re: [B.A.T.M.A.N.] [PATCH v5 4/6] batman-adv: drop unicast packets from other backbone gw

2016-07-01 Thread Simon Wunderlich
On Friday 10 June 2016 13:11:02 Andreas Pape wrote: > Additional dropping of unicast packets received from another backbone gw of > the same backbone network before being forwarded to the same backbone again > is necessary. It was observed in a test setup that in rare cases these > frames lead to

Re: [B.A.T.M.A.N.] [PATCH v2 2/3] batman-adv: Fix non-atomic bla_claim::backbone_gw access

2016-07-01 Thread Simon Wunderlich
On Thursday 30 June 2016 20:11:33 Sven Eckelmann wrote: > The pointer batadv_bla_claim::backbone_gw can be changed at any time. > Therefore, access to it must be protected to ensure that two function > accessing the same backbone_gw are actually accessing the same. This is > especially important

[B.A.T.M.A.N.] [PATCH 08/17] batman-adv: remove ogm_emit and ogm_schedule API calls

2016-07-01 Thread Simon Wunderlich
From: Antonio Quartulli The ogm_emit and ogm_schedule API calls were rather tight to the B.A.T.M.A.N. IV logic and therefore rather difficult to use with other algorithm implementations. Remove such calls and move the surrounding logic into the B.A.T.M.A.N. IV specific code.

[B.A.T.M.A.N.] [PATCH 16/17] batman-adv: Adding logging of mcast flag changes

2016-07-01 Thread Simon Wunderlich
From: Linus Lüssing With this patch changes relevant to a node's own multicast flags are printed to the 'mcast' log level. Tested-by: Simon Wunderlich Signed-off-by: Linus Lüssing Signed-off-by: Marek Lindner

[B.A.T.M.A.N.] [PATCH 15/17] batman-adv: Add multicast optimization support for bridged setups

2016-07-01 Thread Simon Wunderlich
From: Linus Lüssing With this patch we are finally able to support multicast optimizations in bridged setups, too. So far, if a bridge was added on top of a soft-interface (e.g. bat0) the batman-adv multicast optimizations needed to be disabled to avoid packetloss.

[B.A.T.M.A.N.] [PATCH 14/17] batman-adv: Always flood IGMP/MLD reports

2016-07-01 Thread Simon Wunderlich
From: Linus Lüssing With this patch IGMP or MLD reports are always flooded. This is necessary for the upcoming bridge integration to function without multicast packet loss. With the report handling so far bridges might miss interested multicast listeners, leading to

[B.A.T.M.A.N.] [PATCH 13/17] batman-adv: Include frame priority in fragment header

2016-07-01 Thread Simon Wunderlich
From: Andrew Lunn Unfragmented frames which traverse a node have their skb->priority set by looking at the IP ToS byte, or the 802.1p header. However for fragments this is not possible, only one of the fragments will contain the headers. Instead, place the priority into the

[B.A.T.M.A.N.] [PATCH 12/17] batman-adv: Set skb priority in fragments

2016-07-01 Thread Simon Wunderlich
From: Andrew Lunn 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 frame. Fix this.

[B.A.T.M.A.N.] [PATCH 11/17] batman-adv: init ELP tweaking options only once

2016-07-01 Thread Simon Wunderlich
From: Marek Lindner 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 routine

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

2016-07-01 Thread Simon Wunderlich
From: Antonio Quartulli the compiler can optimize functions within the same C file and therefore there is no need to make it explicit. Remove the useless inline attribute for __batadv_store_uint_attr() Signed-off-by: Antonio Quartulli Signed-off-by: Marek

[B.A.T.M.A.N.] [PATCH 10/17] batman-adv: move GW mode and selection class to private data structure

2016-07-01 Thread Simon Wunderlich
From: Antonio Quartulli To reduce the field pollution in our main batadv_priv data structure we've already created some substructures so that we could group fields in a convenient manner. However gw_mode and gw_sel_class are still part of the main object. More both fields to

[B.A.T.M.A.N.] [PATCH 07/17] batman-adv: remove unused callback from batadv_algo_ops struct

2016-07-01 Thread Simon Wunderlich
From: Marek Lindner Signed-off-by: Marek Lindner Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/originator.c | 5 - net/batman-adv/types.h | 3 ---

[B.A.T.M.A.N.] [PATCH 06/17] batman-adv: refactor batadv_neigh_node_* functions to follow common style

2016-07-01 Thread Simon Wunderlich
From: Marek Lindner Signed-off-by: Marek Lindner Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/bat_iv_ogm.c | 3 ++- net/batman-adv/bat_v_elp.c | 3 ++-

[B.A.T.M.A.N.] [PATCH 04/17] batman-adv: document sysfs files in alphabetical order

2016-07-01 Thread Simon Wunderlich
From: Marek Lindner Also update obsolete email address. Signed-off-by: Marek Lindner Acked-by: Antonio Quartulli Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich

[B.A.T.M.A.N.] [PATCH 05/17] batman-adv: update elp interval documentation

2016-07-01 Thread Simon Wunderlich
From: Marek Lindner Signed-off-by: Marek Lindner Acked-by: Antonio Quartulli Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich ---

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

2016-07-01 Thread Simon Wunderlich
Signed-off-by: Simon Wunderlich Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner --- net/batman-adv/translation-table.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/batman-adv/translation-table.c

[B.A.T.M.A.N.] [PATCH 02/17] batman-adv: statically print gateway table header

2016-07-01 Thread Simon Wunderlich
From: Antonio Quartulli To make it easier to search through the code it is better to print static strings directly instead of using format strings printing constants. This was addressed in a previous patch, but the Gateway table header was not updated accordingly.

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

2016-07-01 Thread Simon Wunderlich
Signed-off-by: Simon Wunderlich Signed-off-by: Sven Eckelmann --- net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index 76925266..c356d91 100644 ---

[B.A.T.M.A.N.] pull request for net-next: batman-adv 2016-07-01

2016-07-01 Thread Simon Wunderlich
, Simon The following changes since commit 99860208bc62d8ebd5c57495b84856506fe075bc: sched: remove NET_XMIT_POLICED (2016-06-12 22:02:11 -0400) are available in the git repository at: git://git.open-mesh.org/linux-merge.git tags/batadv-next-for-davem-20160701 for you to fetch changes up

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Use broadcast as fallback for gateway replies

2016-07-01 Thread Sven Eckelmann
[] > Hm, I'm wondering what kind of overhead implications this could > have in larger mesh networks. > > Didn't TT support temporary entries? Could the gateway server > inject them into its global translation table after parsing an > incoming DHCP packet? Right now we have the problem that

Re: [B.A.T.M.A.N.] [RFC 2/2] batman-adv: Use broadcast as fallback for gateway replies

2016-07-01 Thread Linus Lüssing
On Sat, Jun 11, 2016 at 10:27:53PM +0200, Sven Eckelmann wrote: > The replies from gateway server to gateway client are usually sent via > unicast packets. This only works when the destination address for the reply > is already known to the translation table. But usually the gateway replies > are

[B.A.T.M.A.N.] [RFC PATCH 2/2] batman-adv: Snoop DHCPACKs for DAT

2016-07-01 Thread Linus Lüssing
In a typical mesh network, when a new client connects then it will usually first try to grab an IPv4 address via DHCP. Afterwards in public mesh networks a client will try to contact the internet over the server. While the IPv4 address of the DHCP-Server is usually well propagated in the DHT, the

[B.A.T.M.A.N.] [RFC PATCH 0/2] Snooping DHCP to update DAT

2016-07-01 Thread Linus Lüssing
Hi, Just a little RFC patchset. Still some work to do, but works as a proof-of-concept for now. With two VMs, I was able to see the DAT Cache filling up with sane entries even when ARP was disabled on the bat0 interfaces. Will need to check in a larger setup though, whether it has the desired

[B.A.T.M.A.N.] [RFC PATCH 1/2] batman-adv: Add wrapper for ARP reply creation

2016-07-01 Thread Linus Lüssing
--- net/batman-adv/distributed-arp-table.c | 47 +++--- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c index fa76465..fa36196 100644 ---