1. 01 11月, 2012 2 次提交
  2. 21 7月, 2012 1 次提交
  3. 13 6月, 2012 1 次提交
  4. 22 12月, 2011 1 次提交
    • K
      driver-core: remove sysdev.h usage. · edbaa603
      Kay Sievers 提交于
      The sysdev.h file should not be needed by any in-kernel code, so remove
      the .h file from these random files that seem to still want to include
      it.
      
      The sysdev code will be going away soon, so this include needs to be
      removed no matter what.
      
      Cc: Jiandong Zheng <jdzheng@broadcom.com>
      Cc: Scott Branden <sbranden@broadcom.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: David Brown <davidb@codeaurora.org>
      Cc: Daniel Walker <dwalker@fifo99.com>
      Cc: Bryan Huntsman <bryanh@codeaurora.org>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Wan ZongShun <mcuos.com@gmail.com>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: "Venkatesh Pallipadi
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Matthew Garrett <mjg@redhat.com>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      edbaa603
  5. 18 11月, 2011 1 次提交
  6. 22 10月, 2011 1 次提交
    • E
      bonding: Add a forgetten sysfs_attr_init on class_attr_bonding_masters · 01718e36
      Eric W. Biederman 提交于
      When I made class_attr_bonding_matters per network namespace and dynamically
      allocated I overlooked the need for calling sysfs_attr_init.  Oops.
      
      This fixes the following lockdep splat:
      
      [    5.749651] bonding: Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
      [    5.749655] bonding: MII link monitoring set to 100 ms
      [    5.749676] BUG: key f49a831c not in .data!
      [    5.749677] ------------[ cut here ]------------
      [    5.749752] WARNING: at kernel/lockdep.c:2897 lockdep_init_map+0x1c3/0x460()
      [    5.749809] Hardware name: ProLiant BL460c G1
      [    5.749862] Modules linked in: bonding(+)
      [    5.749978] Pid: 3177, comm: modprobe Not tainted 3.1.0-rc9-02177-gf2d1a4e-dirty #1157
      [    5.750066] Call Trace:
      [    5.750120]  [<c1352c2f>] ? printk+0x18/0x21
      [    5.750176]  [<c103112d>] warn_slowpath_common+0x6d/0xa0
      [    5.750231]  [<c1060133>] ? lockdep_init_map+0x1c3/0x460
      [    5.750287]  [<c1060133>] ? lockdep_init_map+0x1c3/0x460
      [    5.750342]  [<c103117d>] warn_slowpath_null+0x1d/0x20
      [    5.750398]  [<c1060133>] lockdep_init_map+0x1c3/0x460
      [    5.750453]  [<c1355ddd>] ? _raw_spin_unlock+0x1d/0x20
      [    5.750510]  [<c11255c8>] ? sysfs_new_dirent+0x68/0x110
      [    5.750565]  [<c1124d4b>] sysfs_add_file_mode+0x8b/0xe0
      [    5.750621]  [<c1124db3>] sysfs_add_file+0x13/0x20
      [    5.750675]  [<c1124e7c>] sysfs_create_file+0x1c/0x20
      [    5.750737]  [<c1208f09>] class_create_file+0x19/0x20
      [    5.750794]  [<c12c186f>] netdev_class_create_file+0xf/0x20
      [    5.750853]  [<f85deaf4>] bond_create_sysfs+0x44/0x90 [bonding]
      [    5.750911]  [<f8410947>] ? bond_create_proc_dir+0x1e/0x3e [bonding]
      [    5.750970]  [<f841007e>] bond_net_init+0x7e/0x87 [bonding]
      [    5.751026]  [<f8410000>] ? 0xf840ffff
      [    5.751080]  [<c12abc7a>] ops_init.clone.4+0xba/0x100
      [    5.751135]  [<c12abdb2>] ? register_pernet_subsys+0x12/0x30
      [    5.751191]  [<c12abd03>] register_pernet_operations.clone.3+0x43/0x80
      [    5.751249]  [<c12abdb9>] register_pernet_subsys+0x19/0x30
      [    5.751306]  [<f84108b9>] bonding_init+0x832/0x8a2 [bonding]
      [    5.751363]  [<c10011f0>] do_one_initcall+0x30/0x160
      [    5.751420]  [<f8410087>] ? bond_net_init+0x87/0x87 [bonding]
      [    5.751477]  [<c106d5cf>] sys_init_module+0xef/0x1890
      [    5.751533]  [<c1356490>] sysenter_do_call+0x12/0x36
      [    5.751588] ---[ end trace 89f492d83a7f5006 ]---
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Reported-by: NEric Dumazet <eric.dumazet@gmail.com>
      Tested-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      01718e36
  7. 20 10月, 2011 1 次提交
  8. 28 7月, 2011 1 次提交
    • 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
  9. 23 6月, 2011 1 次提交
  10. 10 6月, 2011 1 次提交
  11. 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
  12. 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
  13. 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
  14. 18 4月, 2011 1 次提交
  15. 17 3月, 2011 3 次提交
  16. 16 3月, 2011 1 次提交
  17. 26 1月, 2011 1 次提交
  18. 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
  19. 06 10月, 2010 1 次提交
  20. 31 7月, 2010 1 次提交
    • A
      bonding: prevent sysfs from allowing arp monitoring with alb/tlb · c5cb002f
      Andy Gospodarek 提交于
      When using module options arp monitoring and balance-alb/balance-tlb
      are mutually exclusive options.  Anytime balance-alb/balance-tlb are
      enabled mii monitoring is forced to 100ms if not set.  When configuring
      via sysfs no checking is currently done.
      
      Handling these cases with sysfs has to be done a bit differently because
      we do not have all configuration information available at once.  This
      patch will not allow a mode change to balance-alb/balance-tlb if
      arp_interval is already non-zero.  It will also not allow the user to
      set a non-zero arp_interval value if the mode is already set to
      balance-alb/balance-tlb.  They are still mutually exclusive on a
      first-come, first serve basis.
      
      Tested with initscripts on Fedora and manual setting via sysfs.
      Signed-off-by: NAndy Gospodarek <gospo@redhat.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c5cb002f
  21. 15 7月, 2010 1 次提交
  22. 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
  23. 02 6月, 2010 5 次提交
  24. 08 3月, 2010 1 次提交
  25. 14 12月, 2009 1 次提交
  26. 31 10月, 2009 2 次提交
  27. 12 10月, 2009 1 次提交
  28. 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
  29. 02 10月, 2009 1 次提交
  30. 14 8月, 2009 1 次提交