1. 02 7月, 2012 1 次提交
  2. 25 6月, 2012 1 次提交
  3. 21 6月, 2012 2 次提交
  4. 17 2月, 2012 1 次提交
  5. 22 8月, 2011 1 次提交
  6. 10 6月, 2011 1 次提交
    • S
      batman-adv: Use enums for related constants · e8958dbf
      Sven Eckelmann 提交于
      CodingStyle "Chapter 12: Macros, Enums and RTL" recommends to use enums
      for several related constants. Internal states can be used without
      defining the actual value, but all values which are visible to the
      outside must be defined as before. Normal values are assigned as usual
      and flags are defined by shifts of a bit.
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      e8958dbf
  7. 30 5月, 2011 1 次提交
  8. 02 5月, 2011 1 次提交
  9. 05 3月, 2011 2 次提交
  10. 31 1月, 2011 2 次提交
  11. 17 12月, 2010 1 次提交
  12. 30 11月, 2010 2 次提交
  13. 21 9月, 2010 1 次提交
    • 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
  14. 05 9月, 2010 1 次提交
  15. 09 7月, 2010 1 次提交
  16. 12 5月, 2010 2 次提交
  17. 04 3月, 2010 1 次提交
    • S
      Staging: batman-adv: receive packets directly using skbs · e7017195
      Simon Wunderlich 提交于
      This patch removes the (ugly and racy) packet receiving thread and the
      kernel socket usage. Instead, packets are received directly by registering
      the ethernet type and handling skbs instead of self-allocated buffers.
      
      Some consequences and comments:
      
       * we don't copy the payload data when forwarding/sending/receiving data
         anymore. This should boost performance.
       * packets from/to different interfaces can be (theoretically) processed
         simultaneously. Only the big originator hash lock might be in the way.
       * no more polling or sleeping/wakeup/scheduling issues when receiving
         packets
       * this might introduce new race conditions.
       * aggregation and vis code still use packet buffers and are not (yet)
         converted.
       * all spinlocks were converted to irqsave/restore versions to solve
         some lifelock issues when preempted. This might be overkill, some
         of these locks might be reverted later.
       * skb copies are only done if neccesary to avoid overhead
      
      performance differences:
      
       * we made some "benchmarks" with intel laptops.
       * bandwidth on Gigabit Ethernet increased from ~500 MBit/s to ~920 MBit/s
       * ping latency decresed from ~2ms to ~0.2 ms
      
      I did some tests on my 9 node qemu environment and could confirm that
      usual sending/receiving, forwarding, vis, batctl ping etc works.
      Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
      Acked-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Acked-by: NMarek Lindner <lindner_marek@yahoo.de>
      Acked-by: NLinus Lüssing <linus.luessing@web.de>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e7017195
  18. 12 12月, 2009 1 次提交