1. 14 9月, 2014 1 次提交
    • N
      bonding: alb: remove curr_slave_lock · 62c5f518
      Nikolay Aleksandrov 提交于
      First in rlb_teach_disabled_mac_on_primary() it's okay to remove
      curr_slave_lock as all callers except bond_alb_monitor() already hold
      RTNL, and in case bond_alb_monitor() is executing we can at most have a
      period with bad throughput (very unlikely though).
      In bond_alb_monitor() it's okay to remove the read_lock as the slave
      list is walked with RCU and the worst that could happen is another
      transmitter at the same time and thus for a period which currently is 10
      seconds (bond_alb.h: BOND_ALB_LP_TICKS).
      And bond_alb_handle_active_change() is okay because it's always called
      with RTNL. Removed the ASSERT_RTNL() because it'll be inserted in the
      parent function in a following patch.
      Signed-off-by: NNikolay Aleksandrov <nikolay@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      62c5f518
  2. 10 9月, 2014 1 次提交
  3. 23 8月, 2014 1 次提交
  4. 21 7月, 2014 1 次提交
  5. 17 7月, 2014 1 次提交
    • M
      bonding: Do not try to send packets over dead link in TLB mode. · 6b794c1c
      Mahesh Bandewar 提交于
      In TLB mode if tlb_dynamic_lb is NOT set, slaves from the bond
      group are selected based on the hash distribution. This does not
      exclude dead links which are part of the bond. Also if there is a
      temporary link event which brings down the interface, packets
      hashed on that interface would be dropped too.
      
      This patch fixes these issues and distributes flows across the
      UP links only. Also the array construction of links which are
      capable of sending packets happen in the control path leaving
      only link-selection during the data-path.
      
      One possible side effect of this is - at a link event; all
      flows will be shuffled to get good distribution. But impact of
      this should be minimum with the assumption that a member or
      members of the bond group are not available is a very temporary
      situation.
      Signed-off-by: NMahesh Bandewar <maheshb@google.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b794c1c
  6. 16 7月, 2014 3 次提交
  7. 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
  8. 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
  9. 17 5月, 2014 3 次提交
  10. 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
  11. 15 3月, 2014 1 次提交
  12. 14 3月, 2014 1 次提交
  13. 13 3月, 2014 1 次提交
  14. 20 2月, 2014 2 次提交
  15. 17 2月, 2014 2 次提交
  16. 15 2月, 2014 6 次提交
  17. 02 1月, 2014 1 次提交
  18. 14 12月, 2013 2 次提交
  19. 07 12月, 2013 1 次提交
  20. 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
  21. 18 10月, 2013 1 次提交
  22. 09 10月, 2013 1 次提交
  23. 27 9月, 2013 2 次提交