1. 01 12月, 2011 1 次提交
  2. 27 11月, 2011 1 次提交
  3. 23 11月, 2011 1 次提交
  4. 18 11月, 2011 1 次提交
  5. 17 11月, 2011 2 次提交
  6. 05 11月, 2011 1 次提交
  7. 02 11月, 2011 1 次提交
    • W
      bonding:update speed/duplex for NETDEV_CHANGE · 98f41f69
      Weiping Pan 提交于
      Zheng Liang(lzheng@redhat.com) found a bug that if we config bonding with
      arp monitor, sometimes bonding driver cannot get the speed and duplex from
      its slaves, it will assume them to be 100Mb/sec and Full, please see
      /proc/net/bonding/bond0.
      But there is no such problem when uses miimon.
      
      (Take igb for example)
      I find that the reason is that after dev_open() in bond_enslave(),
      bond_update_speed_duplex() will call igb_get_settings()
      , but in that function,
      it runs ethtool_cmd_speed_set(ecmd, -1); ecmd->duplex = -1;
      because igb get an error value of status.
      So even dev_open() is called, but the device is not really ready to get its
      settings.
      
      Maybe it is safe for us to call igb_get_settings() only after
      this message shows up, that is "igb: p4p1 NIC Link is Up 1000 Mbps Full Duplex,
      Flow Control: RX".
      
      So I prefer to update the speed and duplex for a slave when reseices
      NETDEV_CHANGE/NETDEV_UP event.
      
      Changelog
      V2:
      1 remove the "fake 100/Full" logic in bond_update_speed_duplex(),
        set speed and duplex to -1 when it gets error value of speed and duplex.
      2 delete the warning in bond_enslave() if bond_update_speed_duplex() returns
        error.
      3 make bond_info_show_slave() handle bad values of speed and duplex.
      Signed-off-by: NWeiping Pan <wpan@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      98f41f69
  8. 01 11月, 2011 1 次提交
  9. 30 10月, 2011 1 次提交
    • J
      bonding: eliminate bond_close race conditions · e6d265e8
      Jay Vosburgh 提交于
      This patch resolves two sets of race conditions.
      
      	Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com> reported the
      first, as follows:
      
      The bond_close() calls cancel_delayed_work() to cancel delayed works.
      It, however, cannot cancel works that were already queued in workqueue.
      The bond_open() initializes work->data, and proccess_one_work() refers
      get_work_cwq(work)->wq->flags. The get_work_cwq() returns NULL when
      work->data has been initialized. Thus, a panic occurs.
      
      	He included a patch that converted the cancel_delayed_work calls
      in bond_close to flush_delayed_work_sync, which eliminated the above
      problem.
      
      	His patch is incorporated, at least in principle, into this
      patch.  In this patch, we use cancel_delayed_work_sync in place of
      flush_delayed_work_sync, and also convert bond_uninit in addition to
      bond_close.
      
      	This conversion to _sync, however, opens new races between
      bond_close and three periodically executing workqueue functions:
      bond_mii_monitor, bond_alb_monitor and bond_activebackup_arp_mon.
      
      	The race occurs because bond_close and bond_uninit are always
      called with RTNL held, and these workqueue functions may acquire RTNL to
      perform failover-related activities.  If bond_close or bond_uninit is
      waiting in cancel_delayed_work_sync, deadlock occurs.
      
      	These deadlocks are resolved by having the workqueue functions
      acquire RTNL conditionally.  If the rtnl_trylock() fails, the functions
      reschedule and return immediately.  For the cases that are attempting to
      perform link failover, a delay of 1 is used; for the other cases, the
      normal interval is used (as those activities are not as time critical).
      
      	Additionally, the bond_mii_monitor function now stores the delay
      in a variable (mimicing the structure of activebackup_arp_mon).
      
      	Lastly, all of the above renders the kill_timers sentinel moot,
      and therefore it has been removed.
      Tested-by: NMitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e6d265e8
  10. 26 10月, 2011 1 次提交
  11. 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
  12. 20 10月, 2011 2 次提交
  13. 19 10月, 2011 1 次提交
  14. 04 10月, 2011 1 次提交
    • A
      bonding: properly stop queuing work when requested · a0db2dad
      Andy Gospodarek 提交于
      During a test where a pair of bonding interfaces using ARP monitoring
      were both brought up and torn down (with an rmmod) repeatedly, a panic
      in the timer code was noticed.  I tracked this down and determined that
      any of the bonding functions that ran as workqueue handlers and requeued
      more work might not properly exit when the module was removed.
      
      There was a flag protected by the bond lock called kill_timers that is
      set when the interface goes down or the module is removed, but many of
      the functions that monitor link status now unlock the bond lock to take
      rtnl first.  There is a chance that another CPU running the rmmod could
      get the lock and set kill_timers after the first check has passed.
      
      This patch does not allow any function to queue work that will make
      itself run unless kill_timers is not set.  I also noticed while doing
      this work that bond_resend_igmp_join_requests did not have a check for
      kill_timers, so I added the needed call there as well.
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      Reported-by: NLiang Zheng <lzheng@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a0db2dad
  15. 16 9月, 2011 1 次提交
    • J
      net: consolidate and fix ethtool_ops->get_settings calling · 4bc71cb9
      Jiri Pirko 提交于
      This patch does several things:
      - introduces __ethtool_get_settings which is called from ethtool code and
        from drivers as well. Put ASSERT_RTNL there.
      - dev_ethtool_get_settings() is replaced by __ethtool_get_settings()
      - changes calling in drivers so rtnl locking is respected. In
        iboe_get_rate was previously ->get_settings() called unlocked. This
        fixes it. Also prb_calc_retire_blk_tmo() in af_packet.c had the same
        problem. Also fixed by calling __dev_get_by_index() instead of
        dev_get_by_index() and holding rtnl_lock for both calls.
      - introduces rtnl_lock in bnx2fc_vport_create() and fcoe_vport_create()
        so bnx2fc_if_create() and fcoe_if_create() are called locked as they
        are from other places.
      - use __ethtool_get_settings() in bonding code
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      
      v2->v3:
      	-removed dev_ethtool_get_settings()
      	-added ASSERT_RTNL into __ethtool_get_settings()
      	-prb_calc_retire_blk_tmo - use __dev_get_by_index() and lock
      	 around it and __ethtool_get_settings() call
      v1->v2:
              add missing export_symbol
      Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> [except FCoE bits]
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4bc71cb9
  16. 18 8月, 2011 3 次提交
  17. 11 8月, 2011 1 次提交
  18. 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
  19. 22 7月, 2011 1 次提交
  20. 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
  21. 23 6月, 2011 1 次提交
  22. 22 6月, 2011 1 次提交
  23. 20 6月, 2011 1 次提交
  24. 14 6月, 2011 1 次提交
  25. 12 6月, 2011 1 次提交
  26. 10 6月, 2011 5 次提交
  27. 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
  28. 03 6月, 2011 1 次提交
  29. 27 5月, 2011 1 次提交
  30. 26 5月, 2011 1 次提交