1. 04 Dec, 2020 2 commits
  2. 31 Dec, 2019 2 commits
  3. 26 Sep, 2019 1 commit
  4. 25 Mar, 2019 2 commits
  5. 04 Jan, 2019 1 commit
  6. 12 Nov, 2018 4 commits
  7. 15 Sep, 2018 1 commit
    • Sven Eckelmann's avatar
      batman-adv: Provide debug messages as trace events · d331a739
      Sven Eckelmann authored
      
      A private debug logging infrastructure is currently provided via
      $debug_fs/batman_adv/*/log when CONFIG_BATMAN_ADV_DEBUG is enabled. This is
      not well integrated in the rest of the tracing infrastructure of the
      kernel.
      
      Other components (like mac80211 or ath10k) allow to gather the debug
      messages using generic trace events which are better integrated. This makes
      it possible to interact with them using the existing userspace tools.
      
      The tracepoint batadv:batadv_dbg will now be available when
      CONFIG_BATMAN_ADV_DEBUG and CONFIG_BATMAN_ADV_TRACING is activated. The log
      level mask is still used for filtering as usual.
      
      A full system trace for offline parsing can be created (and read) using:
      
        $ batctl ll all
        $ trace-cmd record -e batadv:batadv_dbg
        $ trace-cmd report
      
      The same can also be done without recording to a file
      
        $ batctl ll all
        $ trace-cmd stream -e batadv:batadv_dbg
      
      The trace infrastructure is especially helpful when tracing processes:
      
        $ batctl ll all
        $ ./tools/perf/perf trace --event "batadv:*" batctl p 10.204.32.1
           0.000 batadv:batadv_dbg:batman_adv bat0 Parsing outgoing ARP REQUEST
           0.045 batadv:batadv_dbg:batman_adv bat0 ARP MSG = [src: a2:64:14:53:f8:22-10.204.32.185 dst: 00:00:00:00:00:00-10.204.32.1]
           0.067 batadv:batadv_dbg:batman_adv bat0 Entry updated: 10.204.32.185 a2:64:14:53:f8:22 (vid: -1)
           0.099 batadv:batadv_dbg:batman_adv bat0 batadv_dat_select_candidates(): IP=10.204.32.1 hash(IP)=48902
           0.757 batadv:batadv_dbg:batman_adv bat0 dat_select_candidates() 0: selected fe:2c:91:68:29:2b addr=48977 dist=65460
           1.178 batadv:batadv_dbg:batman_adv bat0 dat_select_candidates() 1: selected fe:81:ab:c5:e3:03 addr=49181 dist=65256
           1.809 batadv:batadv_dbg:batman_adv bat0 dat_select_candidates() 2: selected 66:25:a7:48:37:fb addr=49328 dist=65109
           1.828 batadv:batadv_dbg:batman_adv bat0 DHT_SEND for 10.204.32.1
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      d331a739
  8. 23 Jun, 2018 3 commits
  9. 14 May, 2018 1 commit
  10. 22 Apr, 2018 1 commit
  11. 26 Feb, 2018 1 commit
  12. 15 Dec, 2017 1 commit
  13. 17 Oct, 2016 1 commit
  14. 09 Aug, 2016 1 commit
    • Sven Eckelmann's avatar
      batman-adv: Allow to disable debugfs support · dc1cbd14
      Sven Eckelmann authored
      
      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: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      dc1cbd14
  15. 30 Jun, 2016 2 commits
    • Linus Lüssing's avatar
      batman-adv: Add multicast optimization support for bridged setups · 687937ab
      Linus Lüssing authored
      
      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.
      
      Current Linux bridge implementations and API can now provide us
      with the so far missing information about interested but "remote"
      multicast receivers behind bridge ports.
      
      The Linux bridge performs the detection of remote participants
      interested in multicast packets with its own and mature so
      called IGMP and MLD snooping code and stores that in its
      database. With the new API provided by the bridge batman-adv can
      now simply hook into this database.
      
      We then reliably announce the gathered multicast listeners to
      other nodes through the batman-adv translation table.
      
      Additionally, the Linux bridge provides us with the information about
      whether an IGMP/MLD querier exists. If there is none then we need to
      disable multicast optimizations as we cannot learn about multicast
      listeners on external, bridged-in host then.
      Tested-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      Signed-off-by: default avatarLinus Lüssing <linus.luessing@c0d3.blue>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      687937ab
    • Linus Lüssing's avatar
      batman-adv: Always flood IGMP/MLD reports · bd2a979e
      Linus Lüssing authored
      
      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 wrongly excluding ports from multicast packet
      forwarding.
      
      Currently we are treating IGMP/MLD reports, the messages bridges use to
      learn about interested multicast listeners, just as any other multicast
      packet: We try to send them to nodes matching its multicast destination.
      
      Unfortunately, the destination address of reports of the older
      IGMPv2/MLDv1 protocol families do not strictly adhere to their own
      protocol: More precisely, the interested receiver, an IGMPv2 or MLDv1
      querier, itself usually does not listen to the multicast destination
      address of any reports.
      
      Therefore with this patch we are simply excluding IGMP/MLD reports from
      the multicast forwarding code path and keep flooding them. By that
      any bridge receives them and can properly learn about listeners.
      
      To avoid compatibility issues with older nodes not yet implementing this
      report handling, we need to force them to flood reports: We do this by
      bumping the multicast TVLV version to 2, effectively disabling their
      multicast optimization.
      Tested-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      Signed-off-by: default avatarLinus Lüssing <linus.luessing@c0d3.blue>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      bd2a979e
  16. 02 Mar, 2016 1 commit
  17. 29 Feb, 2016 2 commits
    • Antonio Quartulli's avatar
      batman-adv: ELP - compute the metric based on the estimated throughput · c833484e
      Antonio Quartulli authored
      
      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: default avatarAntonio Quartulli <antonio@open-mesh.com>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      c833484e
    • Linus Luessing's avatar
      batman-adv: ELP - adding basic infrastructure · d6f94d91
      Linus Luessing authored
      
      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: default avatarLinus Luessing <linus.luessing@web.de>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      Signed-off-by: default avatarAntonio Quartulli <antonio@open-mesh.com>
      d6f94d91
  18. 03 Feb, 2016 1 commit
  19. 07 Jan, 2015 1 commit
  20. 22 Mar, 2014 1 commit
  21. 16 Jan, 2014 1 commit
  22. 12 Jan, 2014 1 commit
  23. 13 Mar, 2013 1 commit
    • Martin Hundebøll's avatar
      batman-adv: network coding - add the initial infrastructure code · d353d8d4
      Martin Hundebøll authored
      Network coding exploits the 802.11 shared medium to allow multiple
      packets to be sent in a single transmission. In brief, a relay can XOR
      two packets, and send the coded packet to two destinations. The
      receivers can decode one of the original packets by XOR'ing the coded
      packet with the other original packet. This will lead to increased
      throughput in topologies where two packets cross one relay.
      
      In a simple topology with three nodes, it takes four transmissions
      without network coding to get one packet from Node A to Node B and one
      from Node B to Node A:
      
       1.  Node A  ---- p1 --->  Node R                Node B
       2.  Node A                Node R  <--- p2 ----  Node B
       3.  Node A  <--- p2 ----  Node R                Node B
       4.  Node A                Node R  ---- p1 --->  Node B
      
      With network coding, the relay only needs one transmission, which saves
      us one slot of valuable airtime:
      
       1.  Node A  ---- p1 --->  Node R                Node B
       2.  Node A                Node R  <--- p2 ----  Node B
       3.  Node A  <- p1 x p2 -  Node R  - p1 x p2 ->  Node B
      
      The same principle holds for a topology including five nodes. Here the
      packets from Node A and Node B are overheard by Node C and Node D,
      respectively. This allows Node R to send a network coded packet to save
      one transmission:
      
         Node A                  Node B
      
          |     \              /    |
          |      p1          p2     |
          |       \          /      |
          p1       > Node R <       p2
          |                         |
          |         /      \        |
          |    p1 x p2    p1 x p2   |
          v       /          \      v
                 /            \
         Node C <              > Node D
      
      More information is available on the open-mesh.org wiki[1].
      
      This patch adds the initial code to support network coding in
      batman-adv. It sets up a worker thread to do house keeping and adds a
      sysfs file to enable/disable network coding. The feature is disabled by
      default, as it requires a wifi-driver with working promiscuous mode, and
      also because it adds a small delay at each hop.
      
      [1] http://www.open-mesh.org/projects/batman-adv/wiki/Catwoman
      
      Signed-off-by: default avatarMartin Hundebøll <martin@hundeboll.net>
      Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: default avatarAntonio Quartulli <ordex@autistici.org>
      d353d8d4
  24. 21 Nov, 2012 1 commit
  25. 07 Nov, 2012 2 commits
  26. 11 Apr, 2012 3 commits
  27. 20 Jun, 2011 1 commit
    • Antonio Quartulli's avatar
      batman-adv: improved client announcement mechanism · a73105b8
      Antonio Quartulli authored
      
      The client announcement mechanism informs every mesh node in the network
      of any connected non-mesh client, in order to find the path towards that
      client from any given point in the mesh.
      
      The old implementation was based on the simple idea of appending a data
      buffer to each OGM containing all the client MAC addresses the node is
      serving. All other nodes can populate their global translation tables
      (table which links client MAC addresses to node addresses) using this
      MAC address buffer and linking it to the node's address contained in the
      OGM. A node that wants to contact a client has to lookup the node the
      client is connected to and its address in the global translation table.
      
      It is easy to understand that this implementation suffers from several
      issues:
       - big overhead (each and every OGM contains the entire list of
         connected clients)
       - high latencies for client route updates due to long OGM trip time and
         OGM losses
      
      The new implementation addresses these issues by appending client
      changes (new client joined or a client left) to the OGM instead of
      filling it with all the client addresses each time. In this way nodes
      can modify their global tables by means of "updates", thus reducing the
      overhead within the OGMs.
      
      To keep the entire network in sync each node maintains a translation
      table version number (ttvn) and a translation table checksum. These
      values are spread with the OGM to allow all the network participants to
      determine whether or not they need to update their translation table
      information.
      
      When a translation table lookup is performed in order to send a packet
      to a client attached to another node, the destination's ttvn is added to
      the payload packet. Forwarding nodes can compare the packet's ttvn with
      their destination's ttvn (this node could have a fresher information
      than the source) and re-route the packet if necessary. This greatly
      reduces the packet loss of clients roaming from one AP to the next.
      Signed-off-by: default avatarAntonio Quartulli <ordex@autistici.org>
      Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      a73105b8