1. 05 3月, 2011 16 次提交
  2. 31 1月, 2011 2 次提交
  3. 17 12月, 2010 1 次提交
  4. 30 11月, 2010 6 次提交
    • 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: Rewrite hash using hlist_* · bd204952
      Sven Eckelmann 提交于
      The hash implementation is a complete implementation of a hash using
      buckets as hash entries and overflow buckets attached to them.
      
      The kernel already provides datastructures hlist_head and hlist_node
      which can be used to implement an hash using lists as hash buckets. So
      it is better to implement heavily used functionality on top of those
      instead of providing a full hash implementation.
      
      The rewrite changes the behavior of some functions slightly:
       * hash_add add elements to the front instead of the tail
       * hash_iterate doesn't provide pointer to access bucket->data directly,
         but it can be accessed using hlist_entry
      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>
      bd204952
    • S
      Staging: batman-adv: Remove hashdata_choose_cb from hash · 6d5e6542
      Sven Eckelmann 提交于
      Function pointers cannot be inlined by a compiler and thus always has
      the overhead of an call. hashdata_choose_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>
      6d5e6542
    • 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
    • M
      Staging: batman-adv: softif bridge loop avoidance · 42019357
      Marek Lindner 提交于
      By connecting multiple batman-adv mesh nodes to the same ethernet
      segment a loop can be created when the soft-interface is bridged
      into that ethernet segment. A simple visualization of the loop
      involving the most common case - a LAN as ethernet segment:
      
      node1  <-- LAN  -->  node2
         |                   |
       wifi  <-- mesh -->  wifi
      
      Packets from the LAN (e.g. ARP broadcasts) will circle forever from
      node1 or node2 over the mesh back into the LAN.
      
      This patch adds the functionality to detect other batman-adv nodes
      connected to the LAN and select a 'gateway' to talk to the
      non-batman-adv devices on this LAN. All traffic from and to the mesh
      will be handled by this gateway to avoid the loop. OGMs received via
      the soft-interface are interpreted as 'port announcements' to locate
      potential batman-adv nodes. The patch can also deal with vlans on
      top of batX and offers a list of LAN neighbors via debugfs.
      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>
      42019357
  5. 21 10月, 2010 1 次提交
  6. 20 10月, 2010 1 次提交
  7. 21 9月, 2010 1 次提交
  8. 05 9月, 2010 4 次提交
    • S
      Staging: batman-adv: Remove duplicate of attached device name · 57b7117a
      Sven Eckelmann 提交于
      batman_if has the name of the net_dev as extra string in its own
      structure, but also holds a reference to the actual net_device structure
      which always has the current name of the device. This makes it
      unneccessary and also more complex because we must update the name in
      situations when we receive a NETDEV_CHANGENAME event.
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      57b7117a
    • M
      Staging: batman-adv: multiple mesh clouds · 8c70f138
      Marek Lindner 提交于
      This patch removes all remaining global variables and includes the
      necessary bits into the bat_priv structure. It is the last
      remaining piece to allow multiple concurrent mesh clouds on the
      same device.
      A few global variables have been rendered obsolete during the process
      and have been removed entirely.
      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>
      8c70f138
    • M
      Staging: batman-adv: attach each hard-interface to a soft-interface · 6a0e9fa8
      Marek Lindner 提交于
      This patch replaces the static bat0 interface with a dynamic/abstracted
      approach. It is now possible to create multiple batX interfaces by
      assigning hard interfaces to them. Each batX interface acts as an
      independent mesh network. A soft interface is removed once no hard
      interface references it any longer.
      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>
      6a0e9fa8
    • A
      Staging: batman-adv: layer2 unicast packet fragmentation · e63760e5
      Andreas Langer 提交于
      This patch implements a simple layer2 fragmentation to allow traffic
      exchange over network interfaces with a MTU smaller than 1500 bytes. The
      fragmentation splits the big packets into two parts and marks the frames
      accordingly. The receiving end buffers the packets to reassemble the
      orignal packet before passing it to the higher layers. This feature
      makes it necessary to modify the batman-adv encapsulation for unicast
      packets by adding a sequence number, flags and the originator address.
      This modifcation is part of a seperate packet type for fragemented
      packets to keep the original overhead as low as possible. This patch
      enables the feature by default to ensure the data traffic can travel
      through the network. But it also prints a warning to notify the user
      about the performance implications.
      
      Note: Fragmentation should be avoided at all costs since it has a
      dramatic impact on the performance, especially when it comes wifi
      networks. Instead of a single packet, 2 packets have to be sent! Not
      only valuable airtime is wasted but also packetloss decreases the
      throughput. A link with 50% packetloss and fragmentation enabled is
      pretty much unusable.
      Signed-off-by: NAndreas Langer <an.langer@gmx.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>
      e63760e5
  9. 24 8月, 2010 1 次提交
  10. 09 7月, 2010 4 次提交
  11. 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: 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
    • S
      Staging: batman-adv: Move tables from sysfs to debugfs · 4caecbc0
      Sven Eckelmann 提交于
      Files which represent more than a single attribute aren't allowed in
      sysfs. As we have some files which aren't essential and are lists or
      tables aggregated from data from different places inside batman-adv, we
      must place them in a filesystem without such a restriction.
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4caecbc0