09 Aug, 2016
1 commit
-
Signed-off-by: Simon Wunderlich
Signed-off-by: Sven Eckelmann
04 Jul, 2016
1 commit
-
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, with
cumulative acknowledgment and a dynamic-size sliding window.The test *can* be interrupted by batctl. A receiver side timeout avoids
unlimited waitings for sender packets: after one second of inactivity, the
receiver abort the ongoing test.Based on a prototype from Edo Monticelli
Signed-off-by: Antonio Quartulli
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
Signed-off-by: Simon Wunderlich
30 Jun, 2016
6 commits
-
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
Signed-off-by: Marek Lindner
Signed-off-by: Simon Wunderlich -
The bat_algo functionality in main.c is mostly unrelated to the rest of the
content. It still takes up a large portion of this source file (~15%, 103
lines). Moving it to a separate file makes it better visible as a main
component of the batman-adv implementation and hides it less in the other
helper functions in main.c.Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
Signed-off-by: Simon Wunderlich -
The tvlv functionality in main.c is mostly unrelated to the rest of the
content. It still takes up a large portion of this source file (~45%, 588
lines). Moving it to a separate file makes it better visible as a main
component of the batman-adv implementation and hides it less in the other
helper functions in main.cSigned-off-by: Markus Pargmann
[sven@narfation.org: fix conflicts with current version, fix includes,
rewrote commit message]
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
Signed-off-by: Simon Wunderlich -
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 1e2c2a4fe4a5 ("batman-adv: Add
required includes to all files") makes includes better manageable.Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
Signed-off-by: Simon Wunderlich -
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
Signed-off-by: Sven Eckelmann
Signed-off-by: Simon Wunderlich -
Signed-off-by: Simon Wunderlich
Signed-off-by: Sven Eckelmann
10 May, 2016
2 commits
-
It is easier to understand that the returned value of a specific function
doesn't have to be 0 when the functions was successful when the actual
return type is bool. This is especially true when all surrounding functions
with return type int use negative values to return the error code.Reported-by: Nicholas Krause
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
There are network setups where the current bridge loop avoidance can't
detect bridge loops. The minimal setup affected would consist of two
LANs and two separate meshes, connected in a ring like that:A...(mesh1)...B
| |
(LAN1) (LAN2)
| |
C...(mesh2)...DSince both the meshes and backbones are separate, the bridge loop
avoidance has not enough information to detect and avoid the loop
in this case. Even if these scenarios can't be fixed easily,
these kind of loops can be detected.This patch implements a periodic check (running every 60 seconds for
now) which sends a broadcast frame with a random MAC address on
each backbone VLAN. If a broadcast frame with the same MAC address
is received shortly after on the mesh, we know that there must be a
loop and report that incident as well as throw an uevent to let others
handle that problem.Signed-off-by: Simon Wunderlich
[sven@narfation.org: fix conflicts with current version]
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli
04 May, 2016
2 commits
-
Signed-off-by: Antonio Quartulli
[sven@narfation.org: Fix additional names]
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner -
Signed-off-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli
29 Feb, 2016
6 commits
-
Signed-off-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli -
In case of an unused wireless link, the mac80211 throughput estimation
won't get updated further. Consequently, the reported throughput metric
will become obsolete.With this patch unicast sampling is introduced by periodically sending
unicast ELP packets to each neighbor on idle WiFi links. These sampling
packets will fill an entire frame, so that the measurement is as
reliable as possibleSigned-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner -
In case of wireless interface retrieve the throughput by
querying cfg80211. To perform this call a separate work
must be scheduled because the function may sleep and this
is not allowed within an RCU protected context (RCU in this
case is used to iterate over all the neighbours).Use ethtool to retrieve information about an Ethernet link
like HALF/FULL_DUPLEX and advertised bandwidth (e.g.
100/10Mbps).The metric is updated each time a new ELP packet is sent,
this way it is possible to timely react to a metric
variation which can imply (for example) a neighbour
disconnection.Signed-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner -
Add the support for recognising new originators in the
network and rebroadcast their OGMs.Signed-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner -
This is the initial implementation of the new OGM protocol
(version 2). It has been designed to work on top of the
newly added ELP.In the previous version the OGM protocol was used to both
measure link qualities and flood the network with the metric
information. In this version the protocol is in charge of
the latter task only, leaving the former to ELP.This means being able to decouple the interval used by the
neighbor discovery from the OGM broadcasting, which revealed
to be costly in dense networks and needed to be relaxed so
leading to a less responsive routing protocol.Signed-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner -
Initially developed by Linus during a 6 months trainee study
period in Ascom (Switzerland) AG.Signed-off-by: Linus Luessing
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli
23 Feb, 2016
1 commit
-
BATADV_BONDING_TQ_THRESHOLD is not used anymore since the implementation
of the bat_neigh_is_similar_or_better() API function.
Such function uses the more generic BATADV_TQ_SIMILARITY_THRESHOLD
constant.Therefore, remove definition of the unused BATADV_BONDING_TQ_THRESHOLD
constant.Signed-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner
10 Feb, 2016
1 commit
-
To allow future use of the window protected function with different
maximum sequence numbers, add a parameter to set this value which
was previously hardcoded. Another parameter added for future use is a
flag to return whether the protection window has started.While at it, also fix the kerneldoc.
Signed-off-by: Simon Wunderlich
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli
02 Feb, 2016
3 commits
-
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli
09 Jan, 2016
2 commits
-
If networks take a long time to come up, e.g. due to lossy links, then
the bridge loop avoidance wait time to suppress broadcasts may not wait
long enough and detect a backbone before the mesh is brought up.
Increasing the wait period further to 60 seconds makes this scenario
less likely.Signed-off-by: Simon Wunderlich
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli -
Signed-off-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli
28 Aug, 2015
1 commit
-
Signed-off-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli
25 Aug, 2015
1 commit
-
(s|u)(8|16|32|64) are the preferred types in the kernel. The use of the
standard C99 types u?int(8|16|32|64)_t are objected by some people and even
checkpatch now warns about using them.Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli
07 Jun, 2015
3 commits
-
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner -
The header files could not be build indepdent from each other. This is
happened because headers didn't include the files for things they've used.
This was problematic because the success of a build depended on the
knowledge about the right order of local includes.Also source files were not including everything they've used explicitly.
Instead they required that transitive includes are always stable. This is
problematic because some transitive includes are not obvious, depend on
config settings and may not be stable in the future.The order for include blocks are:
* primary headers (main.h and the *.h file of a *.c file)
* global linux headers
* required local headers
* extra forward declarations for pointers in function/struct declarationsThe only exceptions are linux/bitops.h and linux/if_ether.h in packet.h.
This header file is shared with userspace applications like batctl and must
therefore build together with userspace applications. The header
linux/bitops.h is not part of the uapi headers and linux/if_ether.h
conflicts with the musl implementation of netinet/if_ether.h. The
maintainers rejected the use of __KERNEL__ preprocessor checks and thus
these two headers are only in main.h. All files using packet.h first have
to include main.h to work correctly.Reported-by: Markus Pargmann
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner -
An unoptimized version of the Jenkins one-at-a-time hash function is used
and partially copied all over the code wherever an hashtable is used.
Instead the optimized version shared between the whole kernel should be
used to reduce code duplication and use better optimized code.Only the DAT code must use the old implementation because it is used as
distributed hash function which has to be common for all nodes.Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
03 Jun, 2015
2 commits
-
Declare the returntype of batadv_compare_eth as bool.
The function called inside this helper function
(ether_addr_equal_unaligned) also uses bool as return value, so there is
no need to return int.Signed-off-by: Markus Pargmann
Signed-off-by: Marek Lindner -
It is much clearer to see a bool type as return value than 'int' for
functions that are supposed to return true or false.Signed-off-by: Markus Pargmann
Signed-off-by: Marek Lindner
29 May, 2015
3 commits
-
Signed-off-by: Marek Lindner
-
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner -
Signed-off-by: Simon Wunderlich
08 Jan, 2015
3 commits
-
Signed-off-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli -
Signed-off-by: Antonio Quartulli
Signed-off-by: Marek Lindner -
Signed-off-by: Martin Hundebøll
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli
05 Aug, 2014
2 commits
-
Signed-off-by: Simon Wunderlich
Signed-off-by: Antonio Quartulli -
This patch removes unnecessary logspam which resulted from superfluous
calls to net_ratelimit(). With the supplied patch, net_ratelimit() is
called after the loglevel has been checked.Signed-off-by: André Gaul
Signed-off-by: Marek Lindner
Signed-off-by: Antonio Quartulli