1. 14 6月, 2012 1 次提交
  2. 13 6月, 2012 1 次提交
  3. 14 5月, 2012 1 次提交
  4. 11 5月, 2012 1 次提交
    • J
      net, drivers/net: Convert compare_ether_addr_64bits to ether_addr_equal_64bits · a6700db1
      Joe Perches 提交于
      Use the new bool function ether_addr_equal_64bits to add
      some clarity and reduce the likelihood for misuse of
      compare_ether_addr_64bits for sorting.
      
      Done via cocci script:
      
      $ cat compare_ether_addr_64bits.cocci
      @@
      expression a,b;
      @@
      -	!compare_ether_addr_64bits(a, b)
      +	ether_addr_equal_64bits(a, b)
      
      @@
      expression a,b;
      @@
      -	compare_ether_addr_64bits(a, b)
      +	!ether_addr_equal_64bits(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal_64bits(a, b) == 0
      +	ether_addr_equal_64bits(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal_64bits(a, b) != 0
      +	!ether_addr_equal_64bits(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal_64bits(a, b) == 0
      +	!ether_addr_equal_64bits(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal_64bits(a, b) != 0
      +	ether_addr_equal_64bits(a, b)
      
      @@
      expression a,b;
      @@
      -	!!ether_addr_equal_64bits(a, b)
      +	ether_addr_equal_64bits(a, b)
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a6700db1
  5. 01 2月, 2012 1 次提交
  6. 19 1月, 2012 1 次提交
    • J
      bonding: fix enslaving in alb mode when link down · b924551b
      Jiri Bohac 提交于
      bond_alb_init_slave() is called from bond_enslave() and sets the slave's MAC
      address. This is done differently for TLB and ALB modes.
      bond->alb_info.rlb_enabled is used to discriminate between the two modes but
      this flag may be uninitialized if the slave is being enslaved prior to calling
      bond_open() -> bond_alb_initialize() on the master.
      
      It turns out all the callers of alb_set_slave_mac_addr() pass
      bond->alb_info.rlb_enabled as the hw parameter.
      
      This patch cleans up the unnecessary parameter of alb_set_slave_mac_addr() and
      makes the function decide based on the bonding mode instead, which fixes the
      above problem.
      Reported-by: NNarendra K <Narendra_K@Dell.com>
      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>
      b924551b
  7. 12 1月, 2012 1 次提交
  8. 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
  9. 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
  10. 22 7月, 2011 1 次提交
  11. 26 5月, 2011 1 次提交
    • 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. 10 5月, 2011 1 次提交
  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. 12 4月, 2011 2 次提交
  15. 01 3月, 2011 1 次提交
  16. 21 1月, 2011 1 次提交
    • N
      bonding: Ensure that we unshare skbs prior to calling pskb_may_pull · b3053251
      Neil Horman 提交于
      Recently reported oops:
      
      kernel BUG at net/core/skbuff.c:813!
      invalid opcode: 0000 [#1] SMP
      last sysfs file: /sys/devices/virtual/net/bond0/broadcast
      CPU 8
      Modules linked in: sit tunnel4 cpufreq_ondemand acpi_cpufreq freq_table bonding
      ipv6 dm_mirror dm_region_hash dm_log cdc_ether usbnet mii serio_raw i2c_i801
      i2c_core iTCO_wdt iTCO_vendor_support shpchp ioatdma i7core_edac edac_core bnx2
      ixgbe dca mdio sg ext4 mbcache jbd2 sd_mod crc_t10dif mptsas mptscsih mptbase
      scsi_transport_sas dm_mod [last unloaded: microcode]
      
      Modules linked in: sit tunnel4 cpufreq_ondemand acpi_cpufreq freq_table bonding
      ipv6 dm_mirror dm_region_hash dm_log cdc_ether usbnet mii serio_raw i2c_i801
      i2c_core iTCO_wdt iTCO_vendor_support shpchp ioatdma i7core_edac edac_core bnx2
      ixgbe dca mdio sg ext4 mbcache jbd2 sd_mod crc_t10dif mptsas mptscsih mptbase
      scsi_transport_sas dm_mod [last unloaded: microcode]
      Pid: 0, comm: swapper Not tainted 2.6.32-71.el6.x86_64 #1 BladeCenter HS22
      -[7870AC1]-
      RIP: 0010:[<ffffffff81405b16>]  [<ffffffff81405b16>]
      pskb_expand_head+0x36/0x1e0
      RSP: 0018:ffff880028303b70  EFLAGS: 00010202
      RAX: 0000000000000002 RBX: ffff880c6458ec80 RCX: 0000000000000020
      RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff880c6458ec80
      RBP: ffff880028303bc0 R08: ffffffff818a6180 R09: ffff880c6458ed64
      R10: ffff880c622b36c0 R11: 0000000000000400 R12: 0000000000000000
      R13: 0000000000000180 R14: ffff880c622b3000 R15: 0000000000000000
      FS:  0000000000000000(0000) GS:ffff880028300000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
      CR2: 00000038653452a4 CR3: 0000000001001000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process swapper (pid: 0, threadinfo ffff8806649c2000, task ffff880c64f16ab0)
      Stack:
       ffff880028303bc0 ffffffff8104fff9 000000000000001c 0000000100000000
      <0> ffff880000047d80 ffff880c6458ec80 000000000000001c ffff880c6223da00
      <0> ffff880c622b3000 0000000000000000 ffff880028303c10 ffffffff81407f7a
      Call Trace:
      <IRQ>
       [<ffffffff8104fff9>] ? __wake_up_common+0x59/0x90
       [<ffffffff81407f7a>] __pskb_pull_tail+0x2aa/0x360
       [<ffffffffa0244530>] bond_arp_rcv+0x2c0/0x2e0 [bonding]
       [<ffffffff814a0857>] ? packet_rcv+0x377/0x440
       [<ffffffff8140f21b>] netif_receive_skb+0x2db/0x670
       [<ffffffff8140f788>] napi_skb_finish+0x58/0x70
       [<ffffffff8140fc89>] napi_gro_receive+0x39/0x50
       [<ffffffffa01286eb>] ixgbe_clean_rx_irq+0x35b/0x900 [ixgbe]
       [<ffffffffa01290f6>] ixgbe_clean_rxtx_many+0x136/0x240 [ixgbe]
       [<ffffffff8140fe53>] net_rx_action+0x103/0x210
       [<ffffffff81073bd7>] __do_softirq+0xb7/0x1e0
       [<ffffffff810d8740>] ? handle_IRQ_event+0x60/0x170
       [<ffffffff810142cc>] call_softirq+0x1c/0x30
       [<ffffffff81015f35>] do_softirq+0x65/0xa0
       [<ffffffff810739d5>] irq_exit+0x85/0x90
       [<ffffffff814cf915>] do_IRQ+0x75/0xf0
       [<ffffffff81013ad3>] ret_from_intr+0x0/0x11
       <EOI>
       [<ffffffff8101bc01>] ? mwait_idle+0x71/0xd0
       [<ffffffff814cd80a>] ? atomic_notifier_call_chain+0x1a/0x20
       [<ffffffff81011e96>] cpu_idle+0xb6/0x110
       [<ffffffff814c17c8>] start_secondary+0x1fc/0x23f
      
      Resulted from bonding driver registering packet handlers via dev_add_pack and
      then trying to call pskb_may_pull. If another packet handler (like for AF_PACKET
      sockets) gets called first, the delivered skb will have a user count > 1, which
      causes pskb_may_pull to BUG halt when it does its skb_shared check.  Fix this by
      calling skb_share_check prior to the may_pull call sites in the bonding driver
      to clone the skb when needed.  Tested by myself and the reported successfully.
      
      Signed-off-by: Neil Horman
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b3053251
  17. 17 12月, 2010 1 次提交
  18. 15 9月, 2010 1 次提交
    • A
      bonding: correctly process non-linear skbs · ab12811c
      Andy Gospodarek 提交于
      It was recently brought to my attention that 802.3ad mode bonds would no
      longer form when using some network hardware after a driver update.
      After snooping around I realized that the particular hardware was using
      page-based skbs and found that skb->data did not contain a valid LACPDU
      as it was not stored there.  That explained the inability to form an
      802.3ad-based bond.  For balance-alb mode bonds this was also an issue
      as ARPs would not be properly processed.
      
      This patch fixes the issue in my tests and should be applied to 2.6.36
      and as far back as anyone cares to add it to stable.
      
      Thanks to Alexander Duyck <alexander.h.duyck@intel.com> and Jesse
      Brandeburg <jesse.brandeburg@intel.com> for the suggestions on this one.
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      CC: Alexander Duyck <alexander.h.duyck@intel.com>
      CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
      CC: stable@kerne.org
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab12811c
  19. 25 7月, 2010 1 次提交
    • G
      bonding: set device in RLB ARP packet handler · d8190dff
      Greg Edwards 提交于
      After:
      
      commit 6146b1a4
      Author: Jay Vosburgh <fubar@us.ibm.com>
      Date:   Tue Nov 4 17:51:15 2008 -0800
      
          bonding: Fix ALB mode to balance traffic on VLANs
      
      the dev field in the RLB ARP packet handler was set to NULL to wildcard
      and accommodate balancing VLANs on top of bonds.
      
      This has the side-effect of the packet handler being called against
      other, non RLB-enabled bonds, and a kernel oops results when it tries to
      dereference rx_hashtbl in rlb_update_entry_from_arp(), which won't be
      set for those bonds, e.g. active-backup.
      
      With the __netif_receive_skb() changes from:
      
      commit 1f3c8804
      Author: Andy Gospodarek <andy@greyhouse.net>
      Date:   Mon Dec 14 10:48:58 2009 +0000
      
          bonding: allow arp_ip_targets on separate vlans to use arp validation
      
      frames received on VLANs correctly make their way to the bond's handler,
      so we no longer need to wildcard the device.
      
      The oops can be reproduced by:
      
      modprobe bonding
      
      echo active-backup > /sys/class/net/bond0/bonding/mode
      echo 100 > /sys/class/net/bond0/bonding/miimon
      ifconfig bond0 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx
      echo +eth0 > /sys/class/net/bond0/bonding/slaves
      echo +eth1 > /sys/class/net/bond0/bonding/slaves
      
      echo +bond1 > /sys/class/net/bonding_masters
      echo balance-alb > /sys/class/net/bond1/bonding/mode
      echo 100 > /sys/class/net/bond1/bonding/miimon
      ifconfig bond1 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx
      echo +eth2 > /sys/class/net/bond1/bonding/slaves
      echo +eth3 > /sys/class/net/bond1/bonding/slaves
      
      Pass some traffic on bond0.  Boom.
      
      [ Tested, behaves as advertised.  I do not believe a test of the bonding
      mode is necessary, as there is no race between the packet handler and
      the bonding mode changing (the mode can only change when the device is
      closed).  Also updated the log message to include the reproduction and
      full commit ids.  -J ]
      Signed-off-by: NGreg Edwards <greg.edwards@hp.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Acked-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d8190dff
  20. 23 7月, 2010 1 次提交
    • J
      bonding: change test for presence of VLANs · f35188fa
      Jay Vosburgh 提交于
      After commit ad1afb00
      ("vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)")
      it is now regular practice for a VLAN "add vid" for VLAN 0 to
      arrive prior to any VLAN registration or creation of a vlan_group.
      
      	This patch updates the bonding code that tests for the presence
      of VLANs configured above bonding.  The new logic tests for bond->vlgrp
      to determine if a registration has occured, instead of testing that
      bonding's internal vlan_list is empty.
      
      	The old code would panic when vlan_list was not empty, but
      vlgrp was still NULL (because only an "add vid" for VLAN 0 had occured).
      
      	Bonding still adds VLAN 0 to its internal list so that 802.1p
      frames are handled correctly on transmit when non-VLAN accelerated
      slaves are members of the bond.  The test against bond->vlan_list
      remains in bond_dev_queue_xmit for this reason.
      
      	Modification to the bond->vlgrp now occurs under lock (in
      addition to RTNL), because not all inspections of it occur under RTNL.
      
      	Additionally, because 8021q will never issue a "kill vid" for
      VLAN 0, there is now logic in bond_uninit to release any remaining
      entries from vlan_list.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Cc: Pedro Garcia <pedro.netdev@dondevamos.com>
      Cc: Patrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f35188fa
  21. 01 7月, 2010 1 次提交
    • F
      bonding: check if clients MAC addr has changed · 42d782ac
      Flavio Leitner 提交于
      When two systems using bonding devices in adaptive load
      balancing (ALB) communicates with each other, an endless
      ping-pong of ARP replies starts between these two systems.
      
      What happens? In the ALB mode, bonding driver keeps track
      of each client connected in a hash table, so it can do the
      receive load balancing (RLB). This hash table is updated
      when an ARP reply is received, then it scans for the client
      entry, updates its MAC address and flag it to be announced
      later. Therefore, two seconds later, the alb monitor runs
      and send for each updated client entry two ARP replies
      updating this specific client. The same process happens on
      the receiving system, causing the endless ping-pong of arp
      replies.
      
      See more information including the relevant functions below:
      
         System 1                          System 2
          bond0                             bond0
      
         ping <system2>
          ARP request  --------->
                                 <--------- ARP reply
      
      +->rlb_arp_recv  <---------------------+   <--- loop begins
      |  rlb_update_entry_from_arp           |
      |  client_info->ntt = 1;               |
      |  bond_info->rx_ntt = 1;              |
      |                                      |
      |         <communication succeed>      |
      |                                      |
      |  bond_alb_monitor                    |
      |  rlb_update_rx_clients               |
      |  rlb_update_client                   |
      |  arp_create(ARPOP_REPLY)             |
      |   send ARP reply -------------->     V
      |   send ARP reply -------------->
      |                               rlb_arp_recv
      |                               rlb_update_entry_from_arp
      |                               client_info->ntt = 1;
      |                               bond_info->rx_ntt = 1;
      |                           < snipped, same as in system 1>
      +-------           <-------------- send ARP reply
                         <-------------- send ARP reply
      
      Besides the unneeded networking traffic, this loop breaks
      a cluster because a backup system can't take over the IP
      address. There is always one system sending an ARP reply
      poisoning the network.
      
      This patch fixes the problem adding a check for the MAC
      address before updating it. Thus, if the MAC address didn't
      change, there is no need to update neither to announce it later.
      Signed-off-by: NFlavio Leitner <fleitner@redhat.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      42d782ac
  22. 02 6月, 2010 1 次提交
  23. 14 12月, 2009 1 次提交
  24. 04 12月, 2009 1 次提交
  25. 31 10月, 2009 1 次提交
  26. 02 9月, 2009 1 次提交
  27. 14 8月, 2009 1 次提交
  28. 06 7月, 2009 1 次提交
  29. 05 5月, 2009 1 次提交
  30. 15 4月, 2009 1 次提交
  31. 18 2月, 2009 1 次提交
    • H
      drivers/net/bonding: fix sparse warnings: context imbalance · 1f78d9f9
      Hannes Eder 提交于
      Impact: Attribute functions with __acquires(...) and/or __releases(...).
      
      Fix this sparse warnings:
        drivers/net/bonding/bond_alb.c:1675:9: warning: context imbalance in 'bond_alb_handle_active_change' - unexpected unlock
        drivers/net/bonding/bond_alb.c:1742:9: warning: context imbalance in 'bond_alb_set_mac_address' - unexpected unlock
        drivers/net/bonding/bond_main.c:1025:17: warning: context imbalance in 'bond_do_fail_over_mac' - unexpected unlock
        drivers/net/bonding/bond_main.c:3195:13: warning: context imbalance in 'bond_info_seq_start' - wrong count at exit
        drivers/net/bonding/bond_main.c:3234:13: warning: context imbalance in 'bond_info_seq_stop' - unexpected unlock
      Signed-off-by: NHannes Eder <hannes@hanneseder.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f78d9f9
  32. 01 2月, 2009 1 次提交
  33. 10 12月, 2008 1 次提交
  34. 20 11月, 2008 1 次提交
  35. 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
  36. 06 11月, 2008 1 次提交
    • J
      bonding: Fix ALB mode to balance traffic on VLANs · 6146b1a4
      Jay Vosburgh 提交于
      	The current ALB function that processes incoming ARPs
      does not handle traffic for VLANs configured above bonding.  This causes
      traffic on those VLANs to all be assigned the same slave.  This patch
      corrects that misbehavior by locating the bonding interface nested below
      the VLAN interface.
      
      	Bug reported by Sven Anders <anders@anduras.de>, who also
      tested an earlier version of this patch and confirmed that it resolved
      the problem.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6146b1a4
  37. 31 10月, 2008 1 次提交
    • A
      bonding: fix panic when taking bond interface down before removing module · ce39a800
      Andy Gospodarek 提交于
      A panic was discovered with bonding when using mode 5 or 6 and trying to
      remove the slaves from the bond after the interface was taken down.
      When calling 'ifconfig bond0 down' the following happens:
      
          bond_close()
              bond_alb_deinitialize()
                  tlb_deinitialize()
      		kfree(bond_info->tx_hashtbl)
                      bond_info->tx_hashtbl = NULL
      
      Unfortunately if there are still slaves in the bond, when removing the
      module the following happens:
      
          bonding_exit()
              bond_free_all()
                  bond_release_all()
                      bond_alb_deinit_slave()
                          tlb_clear_slave()
                              tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl
      			u32 next_index = tx_hash_table[index].next
      
      As you might guess we panic when trying to access a few entries into the
      table that no longer exists.
      
      I experimented with several options (like moving the calls to
      tlb_deinitialize somewhere else), but it really makes the most sense to
      be part of the bond_close routine.  It also didn't seem logical move
      tlb_clear_slave around too much, so the simplest option seems to add a
      check in tlb_clear_slave to make sure we haven't already wiped the
      tx_hashtbl away before searching for all the non-existent hash-table
      entries that used to point to the slave as the output interface.
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      ce39a800
  38. 25 9月, 2008 1 次提交
  39. 03 9月, 2008 1 次提交