26 Mar, 2017

1 commit

  • This patch refactors the num_packets counter of a forw_packet in the
    following three ways:

    1) Removed dual-use of forw_packet::num_packets:
    -> now for aggregation purposes only
    2) Using forw_packet::skb::cb::num_bcasts instead:
    -> for easier access in aggregation code later
    3) make access to num_bcasts private to batadv_forw_packet_*()

    Signed-off-by: Linus Lüssing
    [sven@narfation.org: Change num_bcasts to unsigned]
    Signed-off-by: Sven Eckelmann
    Signed-off-by: Simon Wunderlich

    Linus Lüssing
     

26 Jan, 2017

1 commit


09 Nov, 2016

2 commits


19 Oct, 2016

1 commit


09 Aug, 2016

3 commits

  • The files provided by batman-adv via debugfs are currently converted to
    netlink. Tools which are not yet converted to use the netlink interface may
    still rely on the old debugfs files. But systems which already upgraded
    their tools can save some space by disabling this feature. The default
    configuration of batman-adv on amd64 can reduce the size of the module by
    around 11% when this feature is disabled.

    $ size net/batman-adv/batman-adv.ko*
    text data bss dec hex filename
    150507 10395 4160 165062 284c6 net/batman-adv/batman-adv.ko.y
    137106 7099 2112 146317 23b8d net/batman-adv/batman-adv.ko.n

    Signed-off-by: Sven Eckelmann
    Signed-off-by: Marek Lindner
    Signed-off-by: Simon Wunderlich

    Sven Eckelmann
     
  • The translation table (global, local) is usually the part of batman-adv
    which has the most dynamical allocated objects. Most of them
    (tt_local_entry, tt_global_entry, tt_orig_list_entry, tt_change_node,
    tt_req_node, tt_roam_node) are equally sized. So it makes sense to have
    them allocated from a kmem_cache for each type.

    This approach allowed a small wireless router (TP-Link TL-841NDv8; SLUB
    allocator) to store 34% more translation table entries compared to the
    current implementation.

    [1] https://open-mesh.org/projects/batman-adv/wiki/Kmalloc-kmem-cache-tests

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

    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
    Signed-off-by: Marek Lindner
    Signed-off-by: Simon Wunderlich

    Sven Eckelmann
     

04 Jul, 2016

2 commits

  • 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
     
  • debugfs is currently severely broken virtually everywhere in the kernel
    where files are dynamically added and removed (see
    http://lkml.iu.edu/hypermail/linux/kernel/1506.1/02196.html for some
    details). In addition to that, debugfs is not namespace-aware.

    Instead of adding new debugfs entries, the whole infrastructure should be
    moved to netlink. This will fix the long standing problem of large buffers
    for debug tables and hard to parse text files.

    Signed-off-by: Matthias Schiffer
    Signed-off-by: Andrew Lunn
    [sven.eckelmann@open-mesh.com: Strip down patch to only add genl family,
    add missing kerneldoc]
    Signed-off-by: Sven Eckelmann
    Signed-off-by: Marek Lindner
    Signed-off-by: Simon Wunderlich

    Matthias Schiffer
     

30 Jun, 2016

5 commits

  • 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
    Signed-off-by: Marek Lindner
    Signed-off-by: Simon Wunderlich

    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
    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
     
  • 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.

    Signed-off-by: Antonio Quartulli
    Signed-off-by: Marek Lindner
    Signed-off-by: Sven Eckelmann
    Signed-off-by: Simon Wunderlich

    Antonio Quartulli
     

10 May, 2016

2 commits

  • batadv_tvlv_container_get requires that tvlv.container_list_lock is held by
    the caller. It is therefore not possible that an item in
    tvlv.container_list has an reference counter of 0 and is still in the list

    The kref_get function instead WARNs (with debug information) when the
    reference counter would still be 0. This makes a bug in batman-adv better
    visible because kref_get_unless_zero would have ignored this problem.

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

    Sven Eckelmann
     
  • The receive function may start processing an incoming packet while the
    hard_iface is shut down in a different context. All called functions called
    with the batadv_hard_iface object belonging to the incoming interface would
    have to check whether the reference counter is still > 0.

    This is rather error-prone because this check can be forgotten easily.
    Instead check the reference counter when receiving the object to make sure
    that all called functions have a valid reference.

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

    Sven Eckelmann
     

04 May, 2016

1 commit

  • 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.

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

    Sven Eckelmann
     

29 Feb, 2016

2 commits

  • 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
     
  • The B.A.T.M.A.N. protocol originally only used a single
    message type (called OGM) to determine the link qualities to
    the direct neighbors and spreading these link quality
    information through the whole mesh. This procedure is
    summarized on the BATMAN concept page and explained in
    details in the RFC draft published in 2008.

    This approach was chosen for its simplicity during the
    protocol design phase and the implementation. However, it
    also bears some drawbacks:

    * Wireless interfaces usually come with some packet loss,
    therefore a higher broadcast rate is desirable to allow
    a fast reaction on flaky connections.
    Other interfaces of the same host might be connected to
    Ethernet LANs / VPNs / etc which rarely exhibit packet
    loss would benefit from a lower broadcast rate to reduce
    overhead.
    * It generally is more desirable to detect local link
    quality changes at a faster rate than propagating all
    these changes through the entire mesh (the far end of
    the mesh does not need to care about local link quality
    changes that much). Other optimizations strategies, like
    reducing overhead, might be possible if OGMs weren't
    used for all tasks in the mesh at the same time.

    As a result detecting local link qualities shall be handled
    by an independent message type, ELP, whereas the OGM message
    type remains responsible for flooding the mesh with these
    link quality information and determining the overall path
    transmit qualities.

    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

5 commits


10 Feb, 2016

3 commits

  • batman-adv uses a self-written reference implementation which is just based
    on atomic_t. This is less obvious when reading the code than kref and
    therefore increases the change that the reference counting will be missed.

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

    Sven Eckelmann
     
  • batman-adv uses a self-written reference implementation which is just based
    on atomic_t. This is less obvious when reading the code than kref and
    therefore increases the change that the reference counting will be missed.

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

    Sven Eckelmann
     
  • The batadv_tvlv_container* functions state in their kernel-doc that they
    require tvlv.container_list_lock. Add an assert to automatically detect
    when this might have been ignored by the caller.

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

    Sven Eckelmann
     

02 Feb, 2016

3 commits


09 Jan, 2016

3 commits


16 Dec, 2015

2 commits


28 Aug, 2015

1 commit


25 Aug, 2015

3 commits