1. 30 5月, 2011 3 次提交
  2. 08 5月, 2011 2 次提交
  3. 02 5月, 2011 1 次提交
  4. 05 3月, 2011 2 次提交
  5. 31 1月, 2011 2 次提交
  6. 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
  7. 17 12月, 2010 1 次提交
  8. 30 11月, 2010 5 次提交
    • S
      Staging: batman-adv: Use kernel functions to identify broadcasts · 951c44e0
      Sven Eckelmann 提交于
      linux/etherdevice.h already provides functions to classify different
      ethernet addresses. These inlineable functions should be used instead of
      custom functions.
      
      The check for multicast together with multicast can also be replaced
      with a single test for multicast because for every ethernet address x
      following is always true:
      
      is_broadcast_ether_addr(x) => is_multicast_ether_addr(x)
      
      or when looking more at the implementation:
      
      (FF:FF:FF:FF:FF:FF == x) => [(01:00:00:00:00:00 & x) != 00:00:00:00:00:00]
      Reported-by: NTobias Klauser <tklauser@distanz.ch>
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      951c44e0
    • 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
    • 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
    • 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
  9. 11 11月, 2010 1 次提交
  10. 10 11月, 2010 1 次提交
  11. 21 10月, 2010 1 次提交
  12. 05 9月, 2010 4 次提交
  13. 09 7月, 2010 6 次提交
  14. 23 6月, 2010 4 次提交
  15. 19 6月, 2010 1 次提交
  16. 12 5月, 2010 5 次提交
    • S
      Staging: batman-adv: Reduce max characters on a line to 80 · 6d45d8df
      Sven Eckelmann 提交于
      Documentation/CodingStyle sets a strongly prefered limit of 80
      characters per line in "Chapter 2: Breaking long lines and strings".
      
      Strings must be broken into smaller parts and long statements must be
      rewritten.
      Reported-by: NMikal Sande <mikal.sande@gmail.com>
      Reported-by: NMark Rankilor <reodge@gmail.com>
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6d45d8df
    • S
      Staging: batman-adv: Fix whitespace problems criticized by checkpatch.pl · f9ab70e7
      Sven Eckelmann 提交于
      Trailing spaces at the end of a line or before a tab are against
      Documentation/CodingStyle "3.1: Spaces" and should be avoided. It is
      also common style to add a single space after commas unless it is
      followed either by a newline or a tab.
      Reported-by: NMikal Sande <mikal.sande@gmail.com>
      Reported-by: NLuis de Bethencourt <luisbg@ubuntu.com>
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f9ab70e7
    • S
      Staging: batman-adv: Limit queue lengths for batman and broadcast packets · 19dae340
      Simon Wunderlich 提交于
      This patch limits the queue lengths of batman and broadcast packets. BATMAN
      packets are held back for aggregation and jittered to avoid interferences.
      Broadcast packets are stored to be sent out multiple times to increase
      the probability to be received by other nodes in lossy environments.
      
      Especially in extreme cases like broadcast storms, the queues have been seen
      to run full, eating up all the memory and triggering the infamous OOM killer.
      With the queue length limits introduced in this patch, this problem is
      avoided.
      
      Each queue is limited to 256 entries for now, resulting in 1 MB of maximum
      space available in total for typical setups (assuming one packet including
      overhead does not require more than 2000 byte). This should also be reasonable
      for smaller routers, otherwise the defines can be tweaked later.
      
      This third version of the patch does not increase the local broadcast
      sequence number when the queue is already full.
      Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      19dae340
    • S
      Staging: batman-adv: Reorganize sequence number handling · f94cee24
      Simon Wunderlich 提交于
      BATMAN and broadcast packets are tracked with a sequence number window of
      currently 64 entries to measure and avoid duplicates. Packets which have a
      sequence number smaller than the newest received packet minus 64 are not
      within this sequence number window anymore and are called "old packets"
      from now on.
      
      When old packets are received, the routing code assumes that the host of the
      originator has been restarted. This assumption however might be wrong as
      packets can also be delayed by NIC drivers, e.g. because of long queues or
      collision detection in dense WiFi? environments. This behaviour can be
      reproduced by doing a broadcast ping flood in a dense node environment.
      
      The effect is that the sequence number window is jumping forth and back,
      accepting and forwarding any packet (because packets are assumed to be "new")
      and causing loops.
      
      To overcome this problem, the sequence number handling has been reorganized.
      When an old packet is received, the window is reset back only once. Other old
      packets are dropped for (currently) 30 seconds to "protect" the new sequence
      number and avoid the hopping as described above.
      
      The reorganization brings some code cleanups (at least i hope you feel the
      same) and also fixes a bug in count_real_packets() which falsely updated
      the last_real_seqno for slightly older packets within the seqno window
      if they are no duplicates.
      
      This second version of the patch also fixes a problem where for seq_diff==64
      bit_shift() reads from outside of the seqno window, and removes the loop
      for seq_diff == -64 which was present in the first patch.
      
      The third iteration also adds a window for the next expected sequence numbers.
      This minimizes sequence number flapping for packets with very big differences
      (e.g. 3 packets with seqno 0, 25000 and 50000 might still cause problems
      without this window).
      Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f94cee24
    • M
      Staging: batman-adv: move /proc interface handling to /sys · 208e13e4
      Marek Lindner 提交于
      Instead of having a single /proc file "interfaces" in which you have
      to echo the wanted interface batman-adv will create a subfolder in each
      suitable /sys/class/net folder. This subfolder contains files for the
      interface specific settings. For example, mesh_iface to add/remove an
      interface from a virtual mesh network (at the moment only bat0 is
      supported).
      
      Example:
      echo bat0 > /sys/class/net/eth0/batman-adv/mesh_iface
      
      to deactivate:
      echo none > /sys/class/net/eth0/batman-adv/mesh_iface
      
      Interfaces which are not compatible with batman-adv won't contain the
      batman-adv folder, therefore can't be activated. Not supported are:
      loopback, non-ethernet, non-ARP and virtual mesh network interfaces
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      208e13e4