1. 31 10月, 2008 2 次提交
    • J
      bonding: Clean up resource leaks · a434e43f
      Jay Vosburgh 提交于
      This patch reworks the resource free logic performed at the time
      a bonding device is released.  This (a) closes two resource leaks, one
      for workqueues and one for multicast lists, and (b) improves commonality
      of code between the "destroy one" and "destroy all" paths by performing
      final free activity via destructor instead of explicitly (and differently)
      in each path.
      
      "Sean E. Millichamp" <sean@bruenor.org> reported the workqueue
      leak, and included a different patch.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      a434e43f
    • J
      bonding: fix miimon failure counter · fba4acda
      Jay Vosburgh 提交于
      During the rework of the mii monitor for:
      
        commit f0c76d61
        Author: Jay Vosburgh <fubar@us.ibm.com>
        Date:   Wed Jul 2 18:21:58 2008 -0700
      
          bonding: refactor mii monitor
      
      I left out the increment of the link failure counter.  This
      patch corrects that omission.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      fba4acda
  2. 23 10月, 2008 1 次提交
    • H
      net: Fix disjunct computation of netdev features · b63365a2
      Herbert Xu 提交于
      My change
      
          commit e2a6b852
          net: Enable TSO if supported by at least one device
      
      didn't do what was intended because the netdev_compute_features
      function was designed for conjunctions.  So what happened was that
      it would simply take the TSO status of the last constituent device.
      
      This patch extends it to support both conjunctions and disjunctions
      under the new name of netdev_increment_features.
      
      It also adds a new function netdev_fix_features which does the
      sanity checking that usually occurs upon registration.  This ensures
      that the computation doesn't result in an illegal combination
      since this checking is absent when the change is initiated via
      ethtool.
      
      The two users of netdev_compute_features have been converted.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b63365a2
  3. 25 9月, 2008 1 次提交
  4. 03 9月, 2008 1 次提交
  5. 07 8月, 2008 1 次提交
    • J
      bonding: refactor mii monitor · f0c76d61
      Jay Vosburgh 提交于
      	Refactor mii monitor.  As with the previous ARP monitor refactor,
      the motivation for this is to handle locking rationally (in this case,
      removing conditional locking) and generally clean up the code.
      
      	This patch breaks up the monolithic mii monitor into two phases:
      an inspection phase, followed by an optional commit phase.  The commit phase
      is the only portion that requires RTNL or makes changes to state, and is
      only called when inspection finds something to change.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      f0c76d61
  6. 23 7月, 2008 1 次提交
  7. 18 7月, 2008 1 次提交
    • D
      netdev: Allocate multiple queues for TX. · e8a0464c
      David S. Miller 提交于
      alloc_netdev_mq() now allocates an array of netdev_queue
      structures for TX, based upon the queue_count argument.
      
      Furthermore, all accesses to the TX queues are now vectored
      through the netdev_get_tx_queue() and netdev_for_each_tx_queue()
      interfaces.  This makes it easy to grep the tree for all
      things that want to get to a TX queue of a net device.
      
      Problem spots which are not really multiqueue aware yet, and
      only work with one queue, can easily be spotted by grepping
      for all netdev_get_tx_queue() calls that pass in a zero index.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e8a0464c
  8. 15 7月, 2008 3 次提交
  9. 09 7月, 2008 1 次提交
  10. 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
  11. 22 5月, 2008 8 次提交
  12. 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
  13. 29 4月, 2008 1 次提交
  14. 17 4月, 2008 1 次提交
  15. 26 3月, 2008 3 次提交
  16. 04 3月, 2008 1 次提交
  17. 29 2月, 2008 1 次提交
  18. 03 2月, 2008 5 次提交
  19. 29 1月, 2008 1 次提交