29 Jul, 2017

1 commit


23 May, 2017

2 commits

  • With this patch the maximum fragment size is reduced from 1400 to 1280
    bytes.

    Fragmentation v2 correctly uses the smaller of 1400 and the interface
    MTU, thus generally supporting interfaces with an MTU < 1400 bytes, too.

    However, currently "Fragmentation v2" does not support re-fragmentation.
    Which means that once a packet is split into two packets of 1400 + x
    bytes for instance and the next hop provides an interface with an even
    smaller MTU of 1280 bytes, then the larger fragment is lost.

    A maximum fragment size of 1280 bytes is a safer option as this is the
    minimum MTU required by IPv6, making interfaces with an MTU < 1280
    rather exotic.

    Regarding performance, this should have no negative impact on unicast
    traffic: Having some more bytes in the smaller and some less in the
    larger does not change the sum of both fragments.

    Concerning TT, choosing 1280 bytes fragments might result in more TT
    messages than necessary when a large network is bridged into batman-adv.
    However, the TT overhead in general is marginal due to its reactive
    nature, therefore such a performance impact on TT should not be
    noticeable for a user.

    Cc: Matthias Schiffer
    [linus.luessing@c0d3.blue: Added commit message]
    Signed-off-by: Linus Lüssing
    Signed-off-by: Sven Eckelmann
    Signed-off-by: Simon Wunderlich

    Matthias Schiffer
     
  • Signed-off-by: Simon Wunderlich

    Simon Wunderlich
     

17 Mar, 2017

2 commits


26 Jan, 2017

1 commit


01 Jan, 2017

1 commit


30 Oct, 2016

1 commit

  • Instead of latching onto the OGM period, this patch introduces a worker
    dedicated to multicast TT and TVLV updates.

    The reasoning is, that upon roaming especially the translation table
    should be updated timely to minimize connectivity issues.

    With BATMAN V, the idea is to greatly increase the OGM interval to
    reduce overhead. Unfortunately, right now this could lead to
    a bad user experience if multicast traffic is involved.

    Therefore this patch introduces a fixed 500ms update interval for
    multicast TT entries and the multicast TVLV.

    Signed-off-by: Linus Lüssing
    Signed-off-by: Sven Eckelmann
    Signed-off-by: Simon Wunderlich

    Linus Lüssing
     

19 Oct, 2016

1 commit


17 Oct, 2016

2 commits


09 Aug, 2016

1 commit


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

    Antonio Quartulli
     

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

    Sven Eckelmann
     
  • 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

    Sven Eckelmann
     
  • 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.c

    Signed-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

    Markus Pargmann
     
  • 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

    Sven Eckelmann
     
  • 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

    Linus Lüssing
     
  • Signed-off-by: Simon Wunderlich
    Signed-off-by: Sven Eckelmann

    Simon Wunderlich
     

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

    Sven Eckelmann
     
  • 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)...D

    Since 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

    Simon Wunderlich
     

04 May, 2016

2 commits


29 Feb, 2016

6 commits

  • Signed-off-by: Simon Wunderlich
    Signed-off-by: Antonio Quartulli

    Simon Wunderlich
     
  • 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 possible

    Signed-off-by: Antonio Quartulli
    Signed-off-by: Marek Lindner

    Antonio Quartulli
     
  • 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

    Antonio Quartulli
     
  • Add the support for recognising new originators in the
    network and rebroadcast their OGMs.

    Signed-off-by: Antonio Quartulli
    Signed-off-by: Marek Lindner

    Antonio Quartulli
     
  • 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

    Antonio Quartulli
     
  • 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

    Linus Luessing
     

23 Feb, 2016

1 commit


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

    Simon Wunderlich
     

02 Feb, 2016

3 commits


09 Jan, 2016

2 commits


28 Aug, 2015

1 commit


25 Aug, 2015

1 commit


07 Jun, 2015

2 commits

  • Signed-off-by: Sven Eckelmann
    Signed-off-by: Marek Lindner

    Sven Eckelmann
     
  • 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 declarations

    The 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

    Sven Eckelmann