1. 05 3月, 2011 14 次提交
  2. 31 1月, 2011 1 次提交
  3. 16 1月, 2011 1 次提交
    • S
      batman-adv: Use "__attribute__" shortcut macros · aa0adb1a
      Sven Eckelmann 提交于
      Linux 2.6.21 defines different macros for __attribute__ which are also
      used inside batman-adv. The next version of checkpatch.pl warns about
      the usage of __attribute__((packed))).
      
      Linux 2.6.33 defines an extra macro __always_unused which is used to
      assist source code analyzers and can be used to removed the last
      existing __attribute__ inside the source code.
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      aa0adb1a
  4. 17 12月, 2010 1 次提交
  5. 30 11月, 2010 6 次提交
  6. 21 10月, 2010 1 次提交
  7. 21 9月, 2010 3 次提交
    • S
      Staging: batman-adv: Use refcnt to track usage count of batman_if · 47f621dd
      Sven Eckelmann 提交于
      get_batman_if_by_netdev and get_active_batman_if may leak data from the
      rcu protected list of interfaces. The rcu protected list of all gateway
      nodes leaks the actual data outside the read-side critical area. This is
      not valid as we may free the data using a call_rcu created callback
      after we unlock using rcu_read_unlock. A workaround is to provide a
      reference count to be sure that the memory isn't freed to early.
      
      It is currently only to implement the already existing functionality and
      doesn't provide the full tracking of all usage cases.
      
      Additionally, we must hardif_hold inside the
      rcu_read_lock()..rcu_read_unlock() before we attach to the structure
      which "leaks" it. When another function now removed it from its usage
      context (primary_if, usage on stack, ...) then we must hardif_put it. If
      it is decremented to zero then we can issue the call_rcu to the freeing
      function. So "put" is not allowed inside an rcu_read_lock.
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      47f621dd
    • S
      Staging: batman-adv: Use synchronize_rcu instead of call_rcu · 16f9530e
      Sven Eckelmann 提交于
      It is recommended [1] to use synchronize_rcu to simplify the code -
      especially when otherwise extra locking is needed to protect other code
      from picking stale elements. It also protects us for emitting to many
      callbacks which may results in OOM conditions.
      
      The only reason not to use it, would be in performance critical sections
      or when we are not allowed to block.
      
      [1] Documentation/RCU/checklist.txt
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      16f9530e
    • S
      Staging: batman-adv: checkpatch cleanup of comments · 1612ae99
      Sven Eckelmann 提交于
      checkpatch now detects the start of a comment and warns about usage of
      multiple spaces at the beginning of a line. We have to replace the '   '
      in multiple lines comments by ' * ' to fix it.
      
      Checkpatch also wants a comment after a definition of a spinlock_t which
      describes what it protects. It is currently not possible to add it
      before the actual struct which includes the spinlock.
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1612ae99
  8. 15 9月, 2010 1 次提交
  9. 05 9月, 2010 7 次提交
  10. 24 8月, 2010 1 次提交
  11. 09 7月, 2010 2 次提交
  12. 23 6月, 2010 2 次提交
    • D
      Staging: batman-adv: record route for ICMP messages · e4cb3720
      Daniel Seither 提交于
      The standard layer 3 ping utility can use the record route (RR) option
      of IP to collect route data for sent ping messages (ping -R). This
      patch introduces comparable functionality for batman-adv ICMP messages.
      
      The patch adds a second batman ICMP packet format (icmp_packet_rr) such
      that up to 17 MAC addresses can be recorded (sufficient for up to 8
      hops per direction). When no RR is wanted, the old icmp_packet without
      the RR overhead can be sent.
      Signed-off-by: NDaniel Seither <post@tiwoc.de>
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      [sven.eckelmann@gmx.de: Rework on top of current version]
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e4cb3720
    • S
      Staging: batman-adv: Add bonding functionality · e35fd5ec
      Simon Wunderlich 提交于
      This patch introduces bonding functionality to batman-advanced, targeted
      for the 0.3 release. As we are able to route the payload traffic as we
      want, we may use multiple interfaces on multihomed hosts to transfer data
      to achieve higher bandwidth. This can be considered as "light Multi Path
      Routing" for single hop connections.
      
      To detect which interfaces of a peer node belong to the same host, a
      new flag PRIMARIES_FIRST_HOP is introduced. This flag is set on the first hop
      of OGMs of the primary (first) interface, which is broadcasted on all
      interfaces. When receiving such an OGM, we can learn which interfaces
      belong to the same host (by assigning them to the primary originator).
      
      Bonding works by sending packets in a round-robin fashion to the available
      interfaces of a neighbor host, if multiple interfaces are available. The
      neighbor interfaces should be almost equally good to reach.
      
      To avoid interferences (i.e. sending on the same channel), only neighbor
      interfaces with different mac addresses and different outgoing interfaces
      are considered as candidates.
      
      Bonding is deactivated by default, and can be activated by
      
      echo 1 > /sys/class/net/bat0/mesh/bonding
      
      for each individual node.
      Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
      [sven.eckelmann@gmx.de: Rework on top of current version]
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e35fd5ec