1. 17 12月, 2010 1 次提交
  2. 30 11月, 2010 4 次提交
    • M
      Staging: batman-adv: adding gateway functionality · dfaf9dd3
      Marek Lindner 提交于
      Via the /sys filesystem you can change the gateway mode of a node using
      gw_mode. Adjustments to it can be done using gw_bandwidth for server
      mode and gw_sel_class for client mode.
      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>
      dfaf9dd3
    • S
      Staging: batman-adv: Limit spin_locks to spin_lock_bh · 7a18deb7
      Sven Eckelmann 提交于
      spin_lock_irqsave disables the IRQs and stores them inside the flags
      provided by the caller. This is needed to protect a bottom half handler
      or a user context critical section from being interrupted by an
      interrupt handler which also tries to acquire the spinlock and locks
      forever.
      
      The linux device drivers will receive the packets inside an interrupt
      handler and the network infrastructure will process them inside bottom
      half. Thus batman-adv will only run in user context and bottom half
      handlers. We can conclude that batman-adv doesn't share its own
      spinlocks with real interrupt handlers.
      
      This makes it possible to exchange the quite complex spin_lock_irqsave
      with spin_lock_bh which only stops bottom halves from running on the
      current cpu, but allows interrupt handlers to take over to keep the
      interrupt latency low.
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7a18deb7
    • S
      Staging: batman-adv: Remove hashdata_compare_cb from hash · 51f3d8a2
      Sven Eckelmann 提交于
      Function pointers cannot be inlined by a compiler and thus always has
      the overhead of an call. hashdata_compare_cb's are one of the most often
      called function pointers and its overhead must kept relative low.
      
      As first step, every function which uses this function pointer takes it
      as parameter instead of storing it inside the hash abstraction
      structure.
      
      This not generate any performance gain right now. The called functions
      must also be able to be inlined by the calling functions to enable
      inlining of the function pointer.
      Reported-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      51f3d8a2
    • L
      Staging: batman-adv: Make hop_penalty configurable via sysfs · 1341a00a
      Linus Lüssing 提交于
      When having a mixed topology of both very mobile and rather static
      nodes, you are usually best advised to set the originator interval on
      all nodes to a level best suited for the most mobile node.
      
      However, if most of the nodes are rather static, this can create a lot
      of undesired overhead as a trade-off then. If setting the interval too
      low on the static nodes, a mobile node might be chosen as a router for
      too long, not switching away from it fast enough because of its
      mobility and the low frequency of ogms of static nodes.
      
      Exposing the hop_penalty is especially useful for the stated scenario: A
      static node can keep the default originator interval, a mobile node can
      select a quicker one resulting in faster route updates towards this
      mobile node. Additionally, such a mobile node could select a higher hop
      penalty (or even set it to 255 to disable acting as a router for other
      nodes) to make it less desirable, letting other nodes avoid selecting
      this mobile node as a router.
      Signed-off-by: NLinus Lüssing <linus.luessing@ascom.ch>
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1341a00a
  3. 21 10月, 2010 1 次提交
  4. 20 10月, 2010 1 次提交
  5. 21 9月, 2010 1 次提交
  6. 05 9月, 2010 9 次提交
  7. 09 7月, 2010 4 次提交
  8. 23 6月, 2010 3 次提交
    • 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
    • S
      Staging: batman-adv: 32bit sequence number and TTL for broadcasts · cf2d72ec
      Simon Wunderlich 提交于
      This patch changes the sequence number range from 8 or 16 bit to 32 bit.
      This should avoid problems with the sequence number sliding window algorithm
      which we had seen in the past for broadcast floods or malicious packet
      injections. We can not assure 100% security with this patch, but it is quite
      an improvement over the old 16 bit sequence numbers:
      
       * expected window size can be increased (4096 -> 65536)
       * 64k packets in the right order would now be needed to cause a loop,
         which seems practically impossible.
      
      Furthermore, a TTL field has been added to the broadcast packet type, just to
      make sure.
      
      These changes required to increase the compatibility level once again.
      Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
      [sven.eckelmann@gmx.de: Change atomic64_* back to atomic_*, Rework on
      top of current version]
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cf2d72ec
    • S
      Staging: batman-adv: Mark locally used symbols as static · 42fa1b92
      Sven Eckelmann 提交于
      Functions and variables which are used only inside one object file can
      be declared as static. This helped to find unused functions/variables
      
       * mainIfAddr_default
       * main_if_was_up
      
      and functions with declarations but missing definitions
      
       * hash_debug
       * orig_find
       * send_own_packet_work
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      42fa1b92
  9. 19 6月, 2010 1 次提交
  10. 05 6月, 2010 1 次提交
  11. 12 5月, 2010 10 次提交
  12. 04 3月, 2010 4 次提交