1. 23 10月, 2013 2 次提交
  2. 10 10月, 2013 4 次提交
  3. 28 8月, 2013 2 次提交
  4. 10 6月, 2013 1 次提交
    • S
      batman-adv: forward late OGMs from best next hop · 7c24bbbe
      Simon Wunderlich 提交于
      When a packet is received from another node first and later from the
      best next hop, this packet is dropped. However the first OGM was sent
      with the BATADV_NOT_BEST_NEXT_HOP flag and thus dropped by neighbors.
      The late OGM from the best neighbor is then dropped because it is a
      duplicate.
      
      If this situation happens constantly, a node might end up not forwarding
      the "valid" OGMs anymore, and nodes behind will starve from not getting
      valid OGMs.
      
      Fix this by refining the duplicate checking behaviour: The actions
      should depend on whether it was a duplicate for a neighbor only or for
      the originator. OGMs which are not duplicates for a specific neighbor
      will now be considered in batadv_iv_ogm_forward(), but only actually
      forwarded for the best next hop. Therefore, late OGMs from the best
      next hop are forwarded now and not dropped as duplicates anymore.
      Signed-off-by: NSimon Wunderlich <simon@open-mesh.com>
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NAntonio Quartulli <ordex@autistici.org>
      7c24bbbe
  5. 29 5月, 2013 9 次提交
  6. 14 3月, 2013 1 次提交
    • M
      batman-adv: network coding - detect coding nodes and remove these after timeout · d56b1705
      Martin Hundebøll 提交于
      To use network coding efficiently, a relay must know when neighbor nodes
      are likely to have enough information to be able to decode a network
      coded packet. This is detected by using OGMs from batman-adv to discover
      when one neighbor is in range of another neighbor. The relay check the
      TLL to detect when an OGM is forwarded from one neighbor by another
      neighbor, and thereby knows that the two neighbors are in range and thus
      overhear packets sent by each other.
      
      This information is saved in the orig_node struct to be used when
      searching for coding opportunities. Two lists are added to the
      orig_node struct: One for neighbors that can hear the orig_node
      (outgoing nc_nodes) and one for neighbors that the orig_node can hear
      (incoming nc_nodes).
      
      Information about nc_nodes is kept for 10 seconds and is available
      through debugfs in batman_adv/nc_nodes to use when debugging network
      coding.
      Signed-off-by: NMartin Hundebøll <martin@hundeboll.net>
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NAntonio Quartulli <ordex@autistici.org>
      d56b1705
  7. 12 3月, 2013 1 次提交
  8. 28 2月, 2013 1 次提交
    • S
      hlist: drop the node parameter from iterators · b67bfe0d
      Sasha Levin 提交于
      I'm not sure why, but the hlist for each entry iterators were conceived
      
              list_for_each_entry(pos, head, member)
      
      The hlist ones were greedy and wanted an extra parameter:
      
              hlist_for_each_entry(tpos, pos, head, member)
      
      Why did they need an extra pos parameter? I'm not quite sure. Not only
      they don't really need it, it also prevents the iterator from looking
      exactly like the list iterator, which is unfortunate.
      
      Besides the semantic patch, there was some manual work required:
      
       - Fix up the actual hlist iterators in linux/list.h
       - Fix up the declaration of other iterators based on the hlist ones.
       - A very small amount of places were using the 'node' parameter, this
       was modified to use 'obj->member' instead.
       - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
       properly, so those had to be fixed up manually.
      
      The semantic patch which is mostly the work of Peter Senna Tschudin is here:
      
      @@
      iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;
      
      type T;
      expression a,c,d,e;
      identifier b;
      statement S;
      @@
      
      -T b;
          <+... when != b
      (
      hlist_for_each_entry(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue(a,
      - b,
      c) S
      |
      hlist_for_each_entry_from(a,
      - b,
      c) S
      |
      hlist_for_each_entry_rcu(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_rcu_bh(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue_rcu_bh(a,
      - b,
      c) S
      |
      for_each_busy_worker(a, c,
      - b,
      d) S
      |
      ax25_uid_for_each(a,
      - b,
      c) S
      |
      ax25_for_each(a,
      - b,
      c) S
      |
      inet_bind_bucket_for_each(a,
      - b,
      c) S
      |
      sctp_for_each_hentry(a,
      - b,
      c) S
      |
      sk_for_each(a,
      - b,
      c) S
      |
      sk_for_each_rcu(a,
      - b,
      c) S
      |
      sk_for_each_from
      -(a, b)
      +(a)
      S
      + sk_for_each_from(a) S
      |
      sk_for_each_safe(a,
      - b,
      c, d) S
      |
      sk_for_each_bound(a,
      - b,
      c) S
      |
      hlist_for_each_entry_safe(a,
      - b,
      c, d, e) S
      |
      hlist_for_each_entry_continue_rcu(a,
      - b,
      c) S
      |
      nr_neigh_for_each(a,
      - b,
      c) S
      |
      nr_neigh_for_each_safe(a,
      - b,
      c, d) S
      |
      nr_node_for_each(a,
      - b,
      c) S
      |
      nr_node_for_each_safe(a,
      - b,
      c, d) S
      |
      - for_each_gfn_sp(a, c, d, b) S
      + for_each_gfn_sp(a, c, d) S
      |
      - for_each_gfn_indirect_valid_sp(a, c, d, b) S
      + for_each_gfn_indirect_valid_sp(a, c, d) S
      |
      for_each_host(a,
      - b,
      c) S
      |
      for_each_host_safe(a,
      - b,
      c, d) S
      |
      for_each_mesh_entry(a,
      - b,
      c, d) S
      )
          ...+>
      
      [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
      [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
      [akpm@linux-foundation.org: checkpatch fixes]
      [akpm@linux-foundation.org: fix warnings]
      [akpm@linux-foudnation.org: redo intrusive kvm changes]
      Tested-by: NPeter Senna Tschudin <peter.senna@gmail.com>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NSasha Levin <sasha.levin@oracle.com>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b67bfe0d
  9. 19 1月, 2013 2 次提交
  10. 12 1月, 2013 3 次提交
  11. 27 12月, 2012 1 次提交
    • A
      batman-adv: fix random jitter calculation · 143cdd8f
      Akinobu Mita 提交于
      batadv_iv_ogm_emit_send_time() attempts to calculates a random integer
      in the range of 'orig_interval +- BATADV_JITTER' by the below lines.
      
              msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER;
              msecs += (random32() % 2 * BATADV_JITTER);
      
      But it actually gets 'orig_interval' or 'orig_interval - BATADV_JITTER'
      because '%' and '*' have same precedence and associativity is
      left-to-right.
      
      This adds the parentheses at the appropriate position so that it matches
      original intension.
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Acked-by: NAntonio Quartulli <ordex@autistici.org>
      Cc: Marek Lindner <lindner_marek@yahoo.de>
      Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
      Cc: Antonio Quartulli <ordex@autistici.org>
      Cc: b.a.t.m.a.n@lists.open-mesh.org
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      143cdd8f
  12. 08 11月, 2012 1 次提交
  13. 29 10月, 2012 1 次提交
  14. 24 9月, 2012 1 次提交
    • L
      batman-adv: Fix symmetry check / route flapping in multi interface setups · 7caf69fb
      Linus Lüssing 提交于
      If receiving an OGM from a neighbor other than the currently selected
      and if it has the same TQ then we are supposed to switch if this
      neighbor provides a more symmetric link than the currently selected one.
      
      However this symmetry check currently is broken if the interface of the
      neighbor we received the OGM from and the one of the currently selected
      neighbor differ: We are currently trying to determine the symmetry of the
      link towards the selected router via the link we received the OGM from
      instead of just checking via the link towards the currently selected
      router.
      
      This leads to way more route switches than necessary and can lead to
      permanent route flapping in many common multi interface setups.
      
      This patch fixes this issue by using the right interface for this
      symmetry check.
      Signed-off-by: NLinus Lüssing <linus.luessing@web.de>
      7caf69fb
  15. 23 8月, 2012 4 次提交
  16. 02 7月, 2012 6 次提交