1. 18 6月, 2008 4 次提交
    • J
      bonding: Allow setting max_bonds to zero · b8a9787e
      Jay Vosburgh 提交于
      	Permit bonding to function rationally if max_bonds is set to
      zero.  This will load the module, but create no master devices (which can
      be created via sysfs).
      
      	Requires some change to bond_create_sysfs; currently, the
      netdev sysfs directory is determined from the first bonding device created,
      but this is no longer possible.  Instead, an interface from net/core is
      created to create and destroy files in net_class.
      
      	Based on a patch submitted by Phil Oester <kernel@linuxaces.com>.
      Modified by Jay Vosburgh to fix the sysfs issue mentioned above and to
      update the documentation.
      Signed-off-by: NPhil Oester <kernel@linuxace.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      b8a9787e
    • J
      bonding: Rework / fix multiple gratuitous ARP support · b59f9f74
      Jay Vosburgh 提交于
      	Support for sending multiple gratuitous ARPs during failovers
      was added by commit:
      
      commit 7893b249
      Author: Moni Shoua <monis@voltaire.com>
      Date:   Sat May 17 21:10:12 2008 -0700
      
          bonding: Send more than one gratuitous ARP when slave takes over
      
      	This change modifies that support to remove duplicated code,
      add support for ARP monitor (the original only supported miimon), clear
      the grat ARP counter in bond_close (lest a later "ifconfig up" immediately
      start spewing ARPs), and add documentation for the module parameter.
      
      	Also updated driver version to 3.3.0.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      b59f9f74
    • O
      bonding: deliver netdev event for fail-over under the active-backup mode · 01f3109d
      Or Gerlitz 提交于
      under active-backup mode and when there's actual new_active slave,
      have bond_change_active_slave() call the networking core to deliver
      NETDEV_BONDING_FAILOVER event such that the fail-over can be notable
      by code outside of the bonding driver such as the RDMA stack and
      monitoring tools.
      
      As the correct context of locking appropriate for notifier calls is RTNL
      and nothing else, bond->curr_slave_lock and bond->lock are unlocked and
      later locked again. This is ensured by the rest of the code to be safe
      under backup-mode AND when new_active is not NULL.
      
      Jay Vosburgh modified the original patch for formatting and fixed a
      compiler error.
      Signed-off-by: NOr Gerlitz <ogerlitz@voltaire.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      01f3109d
    • O
      bonding: bond_change_active_slave() cleanup under active-backup · 709f8a45
      Or Gerlitz 提交于
      simplified the code of bond_change_active_slave() such that under
      active-backup mode there's one "if (new_active)" test and the rest
      of the code only does extra checks on top of it. This removed an
      unneeded "if (bond->send_grat_arp > 0)" check and avoid calling
      bond_send_gratuitous_arp when there's no active slave.
      
      Jay Vosburgh made minor coding style changes to the orignal patch.
      Signed-off-by: NOr Gerlitz <ogerlitz@voltaire.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      709f8a45
  2. 22 5月, 2008 8 次提交
  3. 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
  4. 29 4月, 2008 1 次提交
  5. 17 4月, 2008 1 次提交
  6. 26 3月, 2008 3 次提交
  7. 04 3月, 2008 1 次提交
  8. 29 2月, 2008 1 次提交
  9. 03 2月, 2008 5 次提交
  10. 29 1月, 2008 1 次提交
  11. 19 1月, 2008 5 次提交
  12. 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
  13. 14 11月, 2007 1 次提交
  14. 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
  15. 25 10月, 2007 2 次提交