1. 28 7月, 2011 3 次提交
    • A
      bonding: reduce noise during init · b2730f4f
      Andy Gospodarek 提交于
      On Tue, Jul 26, 2011 at 05:40:27PM -0700, Joe Perches wrote:
      > On Tue, 2011-07-26 at 17:37 -0700, Jay Vosburgh wrote:
      > > Joe Perches <joe@perches.com> wrote:
      > > >I'd prefer you don't separate the format string
      > > >into multiple pieces.
      > > Why not?  To me, it looks easier to read split into sections
      > > that don't wrap lines.
      >
      > Harder to grep for a dmesg and the
      > defect rate of these split formats is
      > typically higher than single strings
      > because of bad spacing between string
      > segments.
      >
      
      I noticed that you took some time back in late 2009 to 'consolidate' the
      split format-strings present in the bonding driver at the time and I've
      decided I'm fine to leave them the way they are.  The main point of my
      patch was to change the output and I would like to get that included.
      Here is my updated patch...
      
      Subject: [PATCH net-next-2.6 v2] bonding: reduce noise during init
      
      Many are using sysfs to configure bonding rather than module options, so
      there is no need for bonding to throw this warning in normal cases.
      
      Keep the message around when debugging is enabled as it might be useful
      for someone desperate enough to enable debugging, but eliminate it
      otherwise.
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b2730f4f
    • A
      bonding: fix string comparison errors · f4bb2e9c
      Andy Gospodarek 提交于
      When a bond contains a device where one name is the subset of another
      (eth1 and eth10, for example), one cannot properly set the primary
      device or the currently active device.
      
      This was reported and based on work by Takuma Umeya.  I also verified
      the problem and tested that this fix resolves it.
      
      V2: A few did not like the the current code or my changes, so I
      refactored bonding_store_primary and bonding_store_active_slave to be a
      bit cleaner, dropped the use of strnicmp since we did not really need
      the comparison to be case insensitive, and formatted the input string
      from sysfs so a comparison to IFNAMSIZ could be used.
      
      I also discovered an error in bonding_store_active_slave that would
      modify bond->primary_slave rather than bond->curr_active_slave before
      forcing the bonding driver to choose a new active slave.
      
      V3: Actually sending the proper patch....
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      Reported-by: NTakuma Umeya <tumeya@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4bb2e9c
    • N
      net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared · 550fd08c
      Neil Horman 提交于
      After the last patch, We are left in a state in which only drivers calling
      ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
      hardware call ether_setup for their net_devices and don't hold any state in
      their skbs.  There are a handful of drivers that violate this assumption of
      course, and need to be fixed up.  This patch identifies those drivers, and marks
      them as not being able to support the safe transmission of skbs by clearning the
      IFF_TX_SKB_SHARING flag in priv_flags
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      CC: Karsten Keil <isdn@linux-pingi.de>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: Patrick McHardy <kaber@trash.net>
      CC: Krzysztof Halasa <khc@pm.waw.pl>
      CC: "John W. Linville" <linville@tuxdriver.com>
      CC: Greg Kroah-Hartman <gregkh@suse.de>
      CC: Marcel Holtmann <marcel@holtmann.org>
      CC: Johannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      550fd08c
  2. 22 7月, 2011 1 次提交
  3. 15 7月, 2011 1 次提交
    • M
      net: remove NETIF_F_ALL_TX_OFFLOADS · 62f2a3a4
      Michał Mirosław 提交于
      There is no software fallback implemented for SCTP or FCoE checksumming,
      and so it should not be passed on by software devices like bridge or bonding.
      
      For VLAN devices, this is different. First, the driver for underlying device
      should be prepared to get offloaded packets even when the feature is disabled
      (especially if it advertises it in vlan_features). Second, devices under
      VLANs do not get replaced without tearing down the VLAN first.
      
      This fixes a mess I accidentally introduced while converting bonding to
      ndo_fix_features.
      
      NETIF_F_SOFT_FEATURES are removed from BOND_VLAN_FEATURES because they
      are unused as of commit 712ae51a.
      Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      62f2a3a4
  4. 23 6月, 2011 1 次提交
  5. 22 6月, 2011 1 次提交
  6. 20 6月, 2011 1 次提交
  7. 14 6月, 2011 1 次提交
  8. 12 6月, 2011 1 次提交
  9. 10 6月, 2011 5 次提交
  10. 06 6月, 2011 1 次提交
    • N
      bonding: reset queue mapping prior to transmission to physical device (v5) · 374eeb5a
      Neil Horman 提交于
      The bonding driver is multiqueue enabled, in which each queue represents a slave
      to enable optional steering of output frames to given slaves against the default
      output policy.  However, it needs to reset the skb->queue_mapping prior to
      queuing to the physical device or the physical slave (if it is multiqueue) could
      wind up transmitting on an unintended tx queue
      
      Change Notes:
      v2) Based on first pass review, updated the patch to restore the origional queue
      mapping that was found in bond_select_queue, rather than simply resetting to
      zero.  This preserves the value of queue_mapping when it was set on receive in
      the forwarding case which is desireable.
      
      v3) Fixed spelling an casting error in skb->cb
      
      v4) fixed to store raw queue_mapping to avoid double decrement
      
      v5) Eric D requested that ->cb access be wrapped in a macro.
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      374eeb5a
  11. 03 6月, 2011 1 次提交
  12. 27 5月, 2011 1 次提交
  13. 26 5月, 2011 2 次提交
    • F
      bonding: documentation and code cleanup for resend_igmp · 94265cf5
      Flavio Leitner 提交于
      Improves the documentation about how IGMP resend parameter
      works, fix two missing checks and coding style issues.
      Signed-off-by: NFlavio Leitner <fbl@redhat.com>
      Acked-by: NRick Jones <rick.jones2@hp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      94265cf5
    • N
      bonding: prevent deadlock on slave store with alb mode (v3) · 9fe0617d
      Neil Horman 提交于
      This soft lockup was recently reported:
      
      [root@dell-per715-01 ~]# echo +bond5 > /sys/class/net/bonding_masters
      [root@dell-per715-01 ~]# echo +eth1 > /sys/class/net/bond5/bonding/slaves
      bonding: bond5: doing slave updates when interface is down.
      bonding bond5: master_dev is not up in bond_enslave
      [root@dell-per715-01 ~]# echo -eth1 > /sys/class/net/bond5/bonding/slaves
      bonding: bond5: doing slave updates when interface is down.
      
      BUG: soft lockup - CPU#12 stuck for 60s! [bash:6444]
      CPU 12:
      Modules linked in: bonding autofs4 hidp rfcomm l2cap bluetooth lockd sunrpc
      be2d
      Pid: 6444, comm: bash Not tainted 2.6.18-262.el5 #1
      RIP: 0010:[<ffffffff80064bf0>]  [<ffffffff80064bf0>]
      .text.lock.spinlock+0x26/00
      RSP: 0018:ffff810113167da8  EFLAGS: 00000286
      RAX: ffff810113167fd8 RBX: ffff810123a47800 RCX: 0000000000ff1025
      RDX: 0000000000000000 RSI: ffff810123a47800 RDI: ffff81021b57f6f8
      RBP: ffff81021b57f500 R08: 0000000000000000 R09: 000000000000000c
      R10: 00000000ffffffff R11: ffff81011d41c000 R12: ffff81021b57f000
      R13: 0000000000000000 R14: 0000000000000282 R15: 0000000000000282
      FS:  00002b3b41ef3f50(0000) GS:ffff810123b27940(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 00002b3b456dd000 CR3: 000000031fc60000 CR4: 00000000000006e0
      
      Call Trace:
       [<ffffffff80064af9>] _spin_lock_bh+0x9/0x14
       [<ffffffff886937d7>] :bonding:tlb_clear_slave+0x22/0xa1
       [<ffffffff8869423c>] :bonding:bond_alb_deinit_slave+0xba/0xf0
       [<ffffffff8868dda6>] :bonding:bond_release+0x1b4/0x450
       [<ffffffff8006457b>] __down_write_nested+0x12/0x92
       [<ffffffff88696ae4>] :bonding:bonding_store_slaves+0x25c/0x2f7
       [<ffffffff801106f7>] sysfs_write_file+0xb9/0xe8
       [<ffffffff80016b87>] vfs_write+0xce/0x174
       [<ffffffff80017450>] sys_write+0x45/0x6e
       [<ffffffff8005d28d>] tracesys+0xd5/0xe0
      
      It occurs because we are able to change the slave configuarion of a bond while
      the bond interface is down.  The bonding driver initializes some data structures
      only after its ndo_open routine is called.  Among them is the initalization of
      the alb tx and rx hash locks.  So if we add or remove a slave without first
      opening the bond master device, we run the risk of trying to lock/unlock a
      spinlock that has garbage for data in it, which results in our above softlock.
      
      Note that sometimes this works, because in many cases an unlocked spinlock has
      the raw_lock parameter initialized to zero (meaning that the kzalloc of the
      net_device private data is equivalent to calling spin_lock_init), but thats not
      true in all cases, and we aren't guaranteed that condition, so we need to pass
      the relevant spinlocks through the spin_lock_init function.
      
      Fix it by moving the spin_lock_init calls for the tx and rx hashtable locks to
      the ndo_init path, so they are ready for use by the bond_store_slaves path.
      
      Change notes:
      v2) Based on conversation with Jay and Nicolas it seems that the ability to
      enslave devices while the bond master is down should be safe to do.  As such
      this is an outlier bug, and so instead we'll just initalize the errant spinlocks
      in the init path rather than the open path, solving the problem.  We'll also
      remove the warnings about the bond being down during enslave operations, since
      it should be safe
      
      v3) Fix spelling error
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Reported-by: jtluka@redhat.com
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: nicolas.2p.debian@gmail.com
      CC: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9fe0617d
  14. 23 5月, 2011 2 次提交
  15. 16 5月, 2011 1 次提交
  16. 14 5月, 2011 1 次提交
  17. 13 5月, 2011 1 次提交
  18. 10 5月, 2011 1 次提交
  19. 06 5月, 2011 1 次提交
  20. 30 4月, 2011 1 次提交
    • B
      ipv4, ipv6, bonding: Restore control over number of peer notifications · ad246c99
      Ben Hutchings 提交于
      For backward compatibility, we should retain the module parameters and
      sysfs attributes to control the number of peer notifications
      (gratuitous ARPs and unsolicited NAs) sent after bonding failover.
      Also, it is possible for failover to take place even though the new
      active slave does not have link up, and in that case the peer
      notification should be deferred until it does.
      
      Change ipv4 and ipv6 so they do not automatically send peer
      notifications on bonding failover.
      
      Change the bonding driver to send separate NETDEV_NOTIFY_PEERS
      notifications when the link is up, as many times as requested.  Since
      it does not directly control which protocols send notifications, make
      num_grat_arp and num_unsol_na aliases for a single parameter.  Bump
      the bonding version number and update its documentation.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Acked-by: NBrian Haley <brian.haley@hp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ad246c99
  21. 26 4月, 2011 1 次提交
    • J
      bonding: move processing of recv handlers into handle_frame() · 3aba891d
      Jiri Pirko 提交于
      Since now when bonding uses rx_handler, all traffic going into bond
      device goes thru bond_handle_frame. So there's no need to go back into
      bonding code later via ptype handlers. This patch converts
      original ptype handlers into "bonding receive probes". These functions
      are called from bond_handle_frame and they are registered per-mode.
      
      Note that vlan packets are also handled because they are always untagged
      thanks to vlan_untag()
      
      Note that this also allows arpmon for eth-bond-bridge-vlan topology.
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3aba891d
  22. 20 4月, 2011 1 次提交
    • J
      bonding: 802.3ad - fix agg_device_up · 2430af8b
      Jiri Bohac 提交于
      The slave member of struct aggregator does not necessarily point
      to a slave which is part of the aggregator. It points to the
      slave structure containing the aggregator structure, while
      completely different slaves (or no slaves at all) may be part of
      the aggregator.
      
      The agg_device_up() function wrongly uses agg->slave to find the state
      of the aggregator.  Use agg->lag_ports->slave instead. The bug has
      been introduced by commit 4cd6fe1c
      ("bonding: fix link down handling in 802.3ad mode").
      Signed-off-by: NJiri Bohac <jbohac@suse.cz>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2430af8b
  23. 18 4月, 2011 1 次提交
  24. 17 4月, 2011 1 次提交
  25. 15 4月, 2011 3 次提交
  26. 12 4月, 2011 5 次提交