1. 10 3月, 2011 1 次提交
  2. 01 3月, 2011 1 次提交
  3. 28 2月, 2011 2 次提交
  4. 11 1月, 2011 1 次提交
  5. 17 12月, 2010 1 次提交
  6. 11 12月, 2010 1 次提交
  7. 10 12月, 2010 1 次提交
    • N
      net: Convert netpoll blocking api in bonding driver to be a counter · fb4fa76a
      Neil Horman 提交于
      A while back I made some changes to enable netpoll in the bonding driver.  Among
      them was a per-cpu flag that indicated we were in a path that held locks which
      could cause the netpoll path to block in during tx, and as such the tx path
      should queue the frame for later use.  This appears to have given rise to a
      regression.  If one of those paths on which we hold the per-cpu flag yields the
      cpu, its possible for us to come back on a different cpu, leading to us clearing
      a different flag than we set.  This results in odd netpoll drops, and BUG
      backtraces appearing in the log, as we check to make sure that we only clear set
      bits, and only set clear bits.  I had though briefly about changing the
      offending paths so that they wouldn't sleep, but looking at my origional work
      more closely, it doesn't appear that a per-cpu flag is warranted.  We alrady
      gate the checking of this flag on IFF_IN_NETPOLL, so we don't hit this in the
      normal tx case anyway.  And practically speaking, the normal use case for
      netpoll is to only have one client anyway, so we're not going to erroneously
      queue netpoll frames when its actually safe to do so.  As such, lets just
      convert that per-cpu flag to an atomic counter.  It fixes the rescheduling bugs,
      is equivalent from a performance perspective and actually eliminates some code
      in the process.
      
      Tested by the reporter and myself, successfully
      Reported-by: NLiang Zheng <lzheng@redhat.com>
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: David S. Miller <davem@davemloft.net>
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fb4fa76a
  8. 18 11月, 2010 1 次提交
  9. 21 10月, 2010 1 次提交
  10. 18 10月, 2010 1 次提交
    • N
      bonding: Fix deadlock in bonding driver resulting from internal locking when using netpoll · e843fa50
      Neil Horman 提交于
      The monitoring paths in the bonding driver take write locks that are shared by
      the tx path.  If netconsole is in use, these paths can call printk which puts us
      in the netpoll tx path, which, if netconsole is attached to the bonding driver,
      result in deadlock (the xmit_lock guards are useless in netpoll_send_skb, as the
      monitor paths in the bonding driver don't claim the xmit_lock, nor should they).
      The solution is to use a per cpu flag internal to the driver to indicate when a
      cpu is holding the lock in a path that might recusrse into the tx path for the
      driver via netconsole.  By checking this flag on transmit, we can defer the
      sending of the netconsole frames until a later time using the retransmit feature
      of netpoll_send_skb that is triggered on the return code NETDEV_TX_BUSY.  I've
      tested this and am able to transmit via netconsole while causing failover
      conditions on the bond slave links.
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e843fa50
  11. 06 10月, 2010 2 次提交
  12. 05 6月, 2010 2 次提交
    • A
      bonding: allow user-controlled output slave selection · bb1d9123
      Andy Gospodarek 提交于
      v2: changed bonding module version, modified to apply on top of changes
      from previous patch in series, and updated documentation to elaborate on
      multiqueue awareness that now exists in bonding driver.
      
      This patch give the user the ability to control the output slave for
      round-robin and active-backup bonding.  Similar functionality was
      discussed in the past, but Jay Vosburgh indicated he would rather see a
      feature like this added to existing modes rather than creating a
      completely new mode.  Jay's thoughts as well as Neil's input surrounding
      some of the issues with the first implementation pushed us toward a
      design that relied on the queue_mapping rather than skb marks.
      Round-robin and active-backup modes were chosen as the first users of
      this slave selection as they seemed like the most logical choices when
      considering a multi-switch environment.
      
      Round-robin mode works without any modification, but active-backup does
      require inclusion of the first patch in this series and setting
      the 'all_slaves_active' flag.  This will allow reception of unicast traffic on
      any of the backup interfaces.
      
      This was tested with IPv4-based filters as well as VLAN-based filters
      with good results.
      
      More information as well as a configuration example is available in the
      patch to Documentation/networking/bonding.txt.
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bb1d9123
    • A
      bonding: add all_slaves_active parameter · ebd8e497
      Andy Gospodarek 提交于
      v2: changed parameter name from 'keep_all' to 'all_slaves_active' and
      skipped setting slaves to inactive rather than creating a new flag at
      Jay's suggestion.
      
      In an effort to suppress duplicate frames on certain bonding modes
      (specifically the modes that do not require additional configuration on
      the switch or switches connected to the host), code was added in the
      generic receive patch in 2.6.16.  The current behavior works quite well
      for most users, but there are some times it would be nice to restore old
      functionality and allow all frames to make their way up the stack.
      
      This patch adds support for a new module option and sysfs file called
      'all_slaves_active' that will restore pre-2.6.16 functionality if the
      user desires.  The default value is '0' and retains existing behavior,
      but the user can set it to '1' and allow all frames up if desired.
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ebd8e497
  13. 02 6月, 2010 1 次提交
  14. 04 4月, 2010 1 次提交
    • J
      net: convert multicast list to list_head · 22bedad3
      Jiri Pirko 提交于
      Converts the list and the core manipulating with it to be the same as uc_list.
      
      +uses two functions for adding/removing mc address (normal and "global"
       variant) instead of a function parameter.
      +removes dev_mcast.c completely.
      +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
       manipulation with lists on a sandbox (used in bonding and 80211 drivers)
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      22bedad3
  15. 04 2月, 2010 1 次提交
  16. 04 12月, 2009 1 次提交
  17. 31 10月, 2009 2 次提交
  18. 27 10月, 2009 1 次提交
  19. 07 10月, 2009 1 次提交
    • J
      bonding: introduce primary_reselect option · a549952a
      Jiri Pirko 提交于
      In some cases there is not desirable to switch back to primary interface when
      it's link recovers and rather stay with currently active one. We need to avoid
      packetloss as much as we can in some cases. This is solved by introducing
      primary_reselect option. Note that enslaved primary slave is set as current
      active no matter what.
      
      Patch modified by Jay Vosburgh as follows: fixed bug in action
      after change of option setting via sysfs, revised the documentation
      update, and bumped the bonding version number.
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a549952a
  20. 02 9月, 2009 1 次提交
  21. 14 6月, 2009 3 次提交
  22. 30 5月, 2009 1 次提交
  23. 26 12月, 2008 1 次提交
  24. 10 12月, 2008 4 次提交
  25. 13 11月, 2008 1 次提交
    • W
      netdevice: safe convert to netdev_priv() #part-1 · 454d7c9b
      Wang Chen 提交于
      We have some reasons to kill netdev->priv:
      1. netdev->priv is equal to netdev_priv().
      2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
         netdev_priv() is more flexible than netdev->priv.
      But we cann't kill netdev->priv, because so many drivers reference to it
      directly.
      
      This patch is a safe convert for netdev->priv to netdev_priv(netdev).
      Since all of the netdev->priv is only for read.
      But it is too big to be sent in one mail.
      I split it to 4 parts and make every part smaller than 100,000 bytes,
      which is max size allowed by vger.
      Signed-off-by: NWang Chen <wangchen@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      454d7c9b
  26. 06 11月, 2008 2 次提交
    • J
      bonding: alternate agg selection policies for 802.3ad · fd989c83
      Jay Vosburgh 提交于
      	This patch implements alternative aggregator selection policies
      for 802.3ad.  The existing policy, now termed "stable," selects the active
      aggregator by greatest bandwidth, and only reselects a new aggregator
      if the active aggregator is entirely disabled (no more ports or all ports
      down).
      
      	This patch adds two new policies: bandwidth and count, selecting
      the active aggregator by total bandwidth (like the stable policy) or by
      the number of ports in the aggregator, respectively.  These two policies
      also differ from the stable policy in that they will reselect the active
      aggregator when availability-related changes occur in the bond (e.g.,
      link state change).
      
      	This permits "gang failover" within 802.3ad, allowing redundant
      aggregators along parallel paths to always maintain the "best" aggregator
      as the active aggregator (rather than having to wait for the active to
      entirely fail).
      
      	This patch also updates the driver version to 3.5.0.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      fd989c83
    • B
      bonding: send IPv6 neighbor advertisement on failover · 305d552a
      Brian Haley 提交于
      This patch adds better IPv6 failover support for bonding devices,
      especially when in active-backup mode and there are only IPv6 addresses
      configured, as reported by Alex Sidorenko.
      
      - Creates a new file, net/drivers/bonding/bond_ipv6.c, for the
         IPv6-specific routines.  Both regular bonds and VLANs over bonds
         are supported.
      
      - Adds a new tunable, num_unsol_na, to limit the number of unsolicited
         IPv6 Neighbor Advertisements that are sent on a failover event.
         Default is 1.
      
      - Creates two new IPv6 neighbor discovery functions:
      
         ndisc_build_skb()
         ndisc_send_skb()
      
         These were required to support VLANs since we have to be able to
         add the VLAN id to the skb since ndisc_send_na() and friends
         shouldn't be asked to do this.  These two routines are basically
         __ndisc_send() split into two pieces, in a slightly different order.
      
      - Updates Documentation/networking/bonding.txt and bumps the rev of bond
         support to 3.4.0.
      
      On failover, this new code will generate one packet:
      
      - An unsolicited IPv6 Neighbor Advertisement, which helps the switch
         learn that the address has moved to the new slave.
      
      Testing has shown that sending just the NA results in pretty good
      behavior when in active-back mode, I saw no lost ping packets for example.
      Signed-off-by: NBrian Haley <brian.haley@hp.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      305d552a
  27. 25 9月, 2008 2 次提交
  28. 18 6月, 2008 1 次提交
    • 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
  29. 22 5月, 2008 1 次提交
    • J
      bonding: Add "follow" option to fail_over_mac · 3915c1e8
      Jay Vosburgh 提交于
      	Add a "follow" selection for fail_over_mac.  This option
      causes the MAC address to move from slave to slave as the active
      slave changes.  This is in addition to the existing fail_over_mac option
      that causes the bond's MAC address to change during failover.
      
      	This new option is useful for devices that cannot tolerate
      multiple ports using the same MAC address simultaneously, either
      because it confuses them or incurs a performance penalty (as is the
      case with some LPAR-aware multiport devices).  Because the MAC of the
      bond itself does not change, the "follow" option is slightly more
      reliable during failover and doesn't change the MAC of the bond during
      operation.
      
      	This patch requires a previous ARP monitor change to properly
      handle RTNL during failovers.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      3915c1e8