1. 05 6月, 2014 1 次提交
    • V
      bonding: Support macvlans on top of tlb/rlb mode bonds · 14af9963
      Vlad Yasevich 提交于
      To make TLB mode work, the patch allows learning packets
      to be sent using mac addresses assigned to macvlan devices,
      also taking into an account vlans that may be between the
      bond and macvlan device.
      
      To make RLB work, all we have to do is accept ARP packets
      for addresses added to the bond dev->uc list.  Since RLB
      mode will take care to update the peers directly with
      correct mac addresses, learning packets for these addresses
      do not have be send to switch.
      Signed-off-by: NVlad Yasevich <vyasevic@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      14af9963
  2. 23 5月, 2014 2 次提交
    • V
      bonding: Send ALB learning packets using the right source · d0c21d43
      Vlad Yasevich 提交于
      ALB learning packets are currentlyalways sent using the slave mac
      address for all vlans configured on top of bond.   This is not always
      correct, as vlans may change their mac address.
      This patch introduced a concept of strict matching where the
      source of learning packets can either strictly match the address
      passed in, or it can determine a more correct address to use.
      
      There are 3 casese to consider:
        1) Switchover.  In this case, we have a new active slave and we need
           tell the switch about all addresses available on the slave.
        2) Monitor.  We'll periodically refresh learning info for all slaves.
           In this case, we refresh all addresses for current active, and just
           the slave address for other slaves.
        3) Teaching of disabled adddress.  This happens as part of the
           failover and in this case, we alwyas to use just the address
           provided.
      
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Veaceslav Falico <vfalico@gmail.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NVlad Yasevich <vyasevic@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d0c21d43
    • V
      bonding: Don't assume 802.1Q when sending alb learning packets. · d6b694c0
      Vlad Yasevich 提交于
      TLB/ALB learning packets always assume 802.1Q vlan protocol, but
      that is no longer the case since we now have support for Q-in-Q
      on top of bonding.  Pass the vlan protocol to alb_send_lp_vid()
      so that the packets are properly tagged.
      
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Veaceslav Falico <vfalico@gmail.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NVlad Yasevich <vyasevic@redhat.com>
      Acked-by: NVeaceslav Falico <vfalico@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d6b694c0
  3. 17 5月, 2014 3 次提交
  4. 25 4月, 2014 3 次提交
    • M
      bonding: Add tlb_dynamic_lb parameter for tlb mode · e9f0fb88
      Mahesh Bandewar 提交于
      The aggresive load balancing causes packet re-ordering as active
      flows are moved from a slave to another within the group. Sometime
      this aggresive lb is not necessary if the preference is for less
      re-ordering. This parameter if used with value "0" disables
      this dynamic flow shuffling minimizing packet re-ordering. Of course
      the side effect is that it has to live with the static load balancing
      that the hashing distribution provides. This impact is less severe if
      the correct xmit-hashing-policy is used for the tlb setup.
      
      The default value of the parameter is set to "1" mimicing the earlier
      behavior.
      
      Ran the netperf test with 200 stream for 1 min between two hosts with
      4x1G trunk (xmit-lb mode with xmit-policy L3+4) before and after these
      changes. Following was the command used for those 200 instances -
      
          netperf -t TCP_RR -l 60 -s 5 -H <host> -- -r81920,81920
      
      Transactions per second:
          Before change: 1,367.11
          After  change: 1,470.65
      
      Change-Id: Ie3f75c77282cf602e83a6e833c6eb164e72a0990
      Signed-off-by: NMahesh Bandewar <maheshb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9f0fb88
    • M
      bonding: Added bond_tlb_xmit() for tlb mode. · f05b42ea
      Mahesh Bandewar 提交于
      Re-organized the xmit function for the lb mode separating tlb xmit
      from the alb mode. This will enable use of the hashing policies
      like 802.3ad mode. Also extended use of xmit-hash-policy to tlb mode.
      
      Now the tlb-mode defaults to BOND_XMIT_POLICY_LAYER2 if the xmit policy
      module parameter is not set (just like 802.3ad, or Xor mode).
      
      Change-Id: I140257403d272df75f477b380207338d0f04963e
      Signed-off-by: NMahesh Bandewar <maheshb@google.com>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f05b42ea
    • M
      bonding: Reorg bond_alb_xmit code · 9a49aba1
      Mahesh Bandewar 提交于
      Separating the actual xmit part from the function in a separate
      function that can be used in the tlb_xmit in the next patch. Also
      there is no reason do_tx_balance to be an int so changing it to
      bool type.
      
      Change-Id: I9c48ff30487810f68587e621a191db616f49bd3b
      Signed-off-by: NMahesh Bandewar <maheshb@google.com>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9a49aba1
  5. 15 3月, 2014 1 次提交
  6. 14 3月, 2014 1 次提交
  7. 13 3月, 2014 1 次提交
  8. 20 2月, 2014 2 次提交
  9. 17 2月, 2014 2 次提交
  10. 15 2月, 2014 6 次提交
  11. 02 1月, 2014 1 次提交
  12. 14 12月, 2013 2 次提交
  13. 07 12月, 2013 1 次提交
  14. 28 10月, 2013 2 次提交
    • D
      Revert "Merge branch 'bonding_monitor_locking'" · 1f2cd845
      David S. Miller 提交于
      This reverts commit 4d961a10, reversing
      changes made to a00f6fcc.
      
      Revert bond locking changes, they cause regressions and Veaceslav Falico
      doesn't like how the commit messages were done at all.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f2cd845
    • D
      bonding: remove bond read lock for bond_alb_monitor() · 2d0dafb0
      dingtianhong 提交于
      The bond slave list may change when the monitor is running, the slave list is no longer
      protected by bond->lock, only protected by rtnl lock(), so we have 3 ways to modify it:
      1.add bond_master_upper_dev_link() and bond_upper_dev_unlink() in bond->lock, but it is unsafe
      to call call_netdevice_notifiers() in write lock.
      2.remove unused bond->lock for monitor function, only use the existing rtnl lock().
      3.use rcu_read_lock() to protect it, of course, it will transform bond_for_each_slave to
      bond_for_each_slave_rcu() and performance is better, but in slow path, it is ignored.
      so I remove the bond->lock and move the rtnl lock to protect the whole monitor function.
      Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d0dafb0
  15. 18 10月, 2013 1 次提交
  16. 09 10月, 2013 1 次提交
  17. 27 9月, 2013 5 次提交
    • V
      bonding: add bond_has_slaves() and use it · 0965a1f3
      Veaceslav Falico 提交于
      Currently we verify if we have slaves by checking if bond->slave_list is
      empty. Create a define bond_has_slaves() and use it, a bit more readable
      and easier to change in the future.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0965a1f3
    • V
      bonding: rework rlb_next_rx_slave() to use bond_for_each_slave() · 6475ae4c
      Veaceslav Falico 提交于
      Currently, we're using bond_for_each_slave_from(), which is really hard to
      implement under RCU and/or neighbour list.
      
      Remove it and use bond_for_each_slave() instead, taking care of the last
      used slave.
      
      Also, rename next_rx_slave to rx_slave and store the current (last)
      rx_slave.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6475ae4c
    • V
      bonding: make bond_for_each_slave() use lower neighbour's private · 9caff1e7
      Veaceslav Falico 提交于
      It needs a list_head *iter, so add it wherever needed. Use both non-rcu and
      rcu variants.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: Dimitris Michailidis <dm@chelsio.com>
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9caff1e7
    • V
      bonding: remove bond_for_each_slave_continue_reverse() · 81f23b13
      Veaceslav Falico 提交于
      We only use it in rollback scenarios and can easily use the standart
      bond_for_each_dev() instead.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      81f23b13
    • V
      net: add adj_list to save only neighbours · 2f268f12
      Veaceslav Falico 提交于
      Currently, we distinguish neighbours (first-level linked devices) from
      non-neighbours by the neighbour bool in the netdev_adjacent. This could be
      quite time-consuming in case we would like to traverse *only* through
      neighbours - cause we'd have to traverse through all devices and check for
      this flag, and in a (quite common) scenario where we have lots of vlans on
      top of bridge, which is on top of a bond - the bonding would have to go
      through all those vlans to get its upper neighbour linked devices.
      
      This situation is really unpleasant, cause there are already a lot of cases
      when a device with slaves needs to go through them in hot path.
      
      To fix this, introduce a new upper/lower device lists structure -
      adj_list, which contains only the neighbours. It works always in
      pair with the all_adj_list structure (renamed from upper/lower_dev_list),
      i.e. both of them contain the same links, only that all_adj_list contains
      also non-neighbour device links. It's really a small change visible,
      currently, only for __netdev_adjacent_dev_insert/remove(), and doesn't
      change the main linked logic at all.
      
      Also, add some comments a fix a name collision in
      netdev_for_each_upper_dev_rcu() and rework the naming by the following
      rules:
      
      netdev_(all_)(upper|lower)_*
      
      If "all_" is present, then we work with the whole list of upper/lower
      devices, otherwise - only with direct neighbours. Uninline functions - to
      get better stack traces.
      
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Eric Dumazet <edumazet@google.com>
      CC: Jiri Pirko <jiri@resnulli.us>
      CC: Alexander Duyck <alexander.h.duyck@intel.com>
      CC: Cong Wang <amwang@redhat.com>
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2f268f12
  18. 16 9月, 2013 1 次提交
  19. 04 9月, 2013 2 次提交
  20. 30 8月, 2013 2 次提交
    • V
      bonding: remove vlan_list/current_alb_vlan · e868b0c9
      Veaceslav Falico 提交于
      Currently there are no real users of vlan_list/current_alb_vlan, only the
      helpers which maintain them, so remove them.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e868b0c9
    • V
      bonding: make alb_send_learning_packets() use upper dev list · 5bf94b83
      Veaceslav Falico 提交于
      Currently, if there are vlans on top of bond, alb_send_learning_packets()
      will never send LPs from the bond itself (i.e. untagged), which might leave
      untagged clients unupdated.
      
      Also, the 'circular vlan' logic (i.e. update only MAX_LP_BURST vlans at a
      time, and save the last vlan for the next update) is really suboptimal - in
      case of lots of vlans it will take a lot of time to update every vlan. It
      is also never called in any hot path and sends only a few small packets -
      thus the optimization by itself is useless.
      
      So remove the whole current_alb_vlan/MAX_LP_BURST logic from
      alb_send_learning_packets(). Instead, we'll first send a packet untagged
      and then traverse the upper dev list, sending a tagged packet for each vlan
      found. Also, remove the MAX_LP_BURST define - we already don't need it.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5bf94b83