1. 22 5月, 2008 2 次提交
    • J
      bonding: remove test for IP in ARP monitor · 4b8a9239
      Jay Vosburgh 提交于
      	Remove bond_has_ip and all references to it.  With this change,
      the ARP monitor will always send ARP probes if the master is up and has
      at least one slave.  If the bond has an IP address, it is used in the
      ARP probe; if not, the probes are sent with all zeros in the sender's
      IP address (which is consistent with an RFC 2131 4.4.1 duplicate address
      probe).
      
      	This is useful for cases when bonding itself is hidden underneath
      a layer of virtual devices, e.g., with Xen.
      
      	Change suggested by Tsutomu Fujii <t-fujii@nb.jp.nec.com>, who
      included a one-line patch that only affected active-backup mode.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      4b8a9239
    • J
      bonding: Use msecs_to_jiffies, eliminate panic · 5ce0da8f
      Jay Vosburgh 提交于
      	Convert bonding to use msecs_to_jiffies instead of doing the
      math.  For the ARP monitor, there was an underflow problem that could
      result in an infinite loop.  The miimon already had that worked around,
      but this is cleaner.
      
      	Originally by Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
      Jay Vosburgh corrected a math error in the original; Nicolas' original
      commit message is:
      
      When setting arp_interval parameter to a very low value, delta_in_ticks
      for next arp might become 0, causing an infinite loop.
      
      See http://bugzilla.kernel.org/show_bug.cgi?id=10680
      
      Same problem for miimon parameter already fixed, but fix might be
      enhanced, by using msecs_to_jiffies() function.
      Signed-off-by: NNicolas de Pesloüan <nicolas.2p.debian@free.fr>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      5ce0da8f
  2. 07 5月, 2008 3 次提交
    • J
      bonding: fix enslavement error unwinds · 569f0c4d
      Jay Vosburgh 提交于
      	As part of:
      
      commit c2edacf8
      Author: Jay Vosburgh <fubar@us.ibm.com>
      Date:   Mon Jul 9 10:42:47 2007 -0700
      
          bonding / ipv6: no addrconf for slaves separately from master
      
      two steps were rearranged in the enslavement process: netdev_set_master
      is now before the call to dev_open to open the slave.
      
      	This patch updates the error cases and unwind process at the
      end of bond_enslave to match the new order.  Without this patch, it is
      possible for the enslavement to fail, but leave the slave with IFF_SLAVE
      set in its flags.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      569f0c4d
    • P
      bonding: Deadlock between bonding_store_bonds and bond_destroy_sysfs. · ae68c398
      Pavel Emelyanov 提交于
      The sysfs layer has an internal protection, that ensures, that
      all the process sitting inside ->sore/->show callback exits
      before the appropriate entry is unregistered (the calltraces
      are rather big, but I can provide them if required).
      
      On the other hand, bonding takes rtnl_lock in
      a) the bonding_store_bonds, i.e. in ->store callback,
      b) module exit before calling the sysfs unregister routines.
      
      Thus, the classical AB-BA deadlock may occur. To reproduce run
      # while :; do modprobe bonding; rmmod bonding; done
      and
      # while :; do echo '+bond%d' > /sys/class/net/bonding_masters ; done
      in parallel.
      
      The fix is to move the bond_destroy_sysfs out of the rtnl_lock,
      but _before_ bond_free_all to make sure no bonding devices exist
      after module unload.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Acked-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      ae68c398
    • P
      bonding: Do not call free_netdev for already registered device. · 822973ba
      Pavel Emelyanov 提交于
      If the call to bond_create_sysfs_entry in bond_create fails, the
      proper rollback is to call unregister_netdevice, not free_netdev.
      Otherwise - kernel BUG at net/core/dev.c:4057!
      
      Checked with artificial failures injected into bond_create_sysfs_entry.
      
      Pavel's original patch modified by Jay Vosburgh to move code around
      for clarity (remove goto-hopping within the unwind block).
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      822973ba
  3. 29 4月, 2008 1 次提交
  4. 17 4月, 2008 1 次提交
  5. 26 3月, 2008 3 次提交
  6. 04 3月, 2008 1 次提交
  7. 29 2月, 2008 1 次提交
  8. 03 2月, 2008 5 次提交
  9. 29 1月, 2008 1 次提交
  10. 19 1月, 2008 5 次提交
  11. 08 12月, 2007 3 次提交
    • J
      bonding: Fix race at module unload · fdaea7a9
      Jay Vosburgh 提交于
      	Fixes a race condition in module unload.  Without this change,
      workqueue events may fire while bonding data structures are partially
      freed but before bond_close() is invoked by unregister_netdevice().
      
      	Update version to 3.2.3.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      fdaea7a9
    • J
      bonding: Add new layer2+3 hash for xor/802.3ad modes · 6f6652be
      Jay Vosburgh 提交于
       	Add new hash for balance-xor and 802.3ad modes.  Originally
       submitted by "Glenn Griffin" <ggriffin.kernel@gmail.com>; modified by
       Jay Vosburgh to move setting of hash policy out of line, tweak the
       documentation update and add version update to 3.2.2.
      
      	Glenn's original comment follows:
      
      Included is a patch for a new xmit_hash_policy for the bonding driver
      that selects slaves based on MAC and IP information.  This is a middle
      ground between what currently exists in the layer2 only policy and the
      layer3+4 policy.  This policy strives to be fully 802.3ad compliant by
      transmitting every packet of any particular flow over the same link.
      As documented the layer3+4 policy is not fully compliant for extreme
      cases such as ip fragmentation, so this policy is a nice compromise
      for environments that require full compliance but desire more than the
      layer2 only policy.
      Signed-off-by: N"Glenn Griffin" <ggriffin.kernel@gmail.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      6f6652be
    • D
      bonding: Fix time comparison · b63bb739
      David Sterba 提交于
      From: David Sterba <dsterba@suse.cz>
      
      Use macros for comparing jiffies. Jiffies' wrap caused missed events and hangs.
      Module reinsert was needed to make bonding work again.
      Signed-off-by: NDavid Sterba <dsterba@suse.cz>
      Acked-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b63bb739
  12. 14 11月, 2007 1 次提交
  13. 10 11月, 2007 1 次提交
    • J
      bonding: don't validate address at device open · 3a1521b7
      Jay Vosburgh 提交于
      The standard validate_addr handler refuses to accept the all zeroes address
      as valid.  However, it's common historical practice for the bonding
      master to be configured up prior to having any slaves, at which time the
      master will have a MAC address of all zeroes.
      
      Resolved by setting the dev->validate_addr to NULL.  The master still can't
      end up with an invalid address, as the set_mac_address function tests
      for validity.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      3a1521b7
  14. 25 10月, 2007 2 次提交
  15. 24 10月, 2007 5 次提交
  16. 17 10月, 2007 1 次提交
  17. 16 10月, 2007 4 次提交