<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/bonding, branch linux-2.6.35.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.35.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.35.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2011-08-01T20:54:46+00:00</updated>
<entry>
<title>bonding: Ensure that we unshare skbs prior to calling pskb_may_pull</title>
<updated>2011-08-01T20:54:46+00:00</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2011-01-20T09:02:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d6864e9351e5031d5d98a47983f8846ade515082'/>
<id>urn:sha1:d6864e9351e5031d5d98a47983f8846ade515082</id>
<content type='text'>
commit b30532515f0a62bfe17207ab00883dd262497006 upstream.

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:[&lt;ffffffff81405b16&gt;]  [&lt;ffffffff81405b16&gt;]
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
&lt;0&gt; ffff880000047d80 ffff880c6458ec80 000000000000001c ffff880c6223da00
&lt;0&gt; ffff880c622b3000 0000000000000000 ffff880028303c10 ffffffff81407f7a
Call Trace:
&lt;IRQ&gt;
 [&lt;ffffffff8104fff9&gt;] ? __wake_up_common+0x59/0x90
 [&lt;ffffffff81407f7a&gt;] __pskb_pull_tail+0x2aa/0x360
 [&lt;ffffffffa0244530&gt;] bond_arp_rcv+0x2c0/0x2e0 [bonding]
 [&lt;ffffffff814a0857&gt;] ? packet_rcv+0x377/0x440
 [&lt;ffffffff8140f21b&gt;] netif_receive_skb+0x2db/0x670
 [&lt;ffffffff8140f788&gt;] napi_skb_finish+0x58/0x70
 [&lt;ffffffff8140fc89&gt;] napi_gro_receive+0x39/0x50
 [&lt;ffffffffa01286eb&gt;] ixgbe_clean_rx_irq+0x35b/0x900 [ixgbe]
 [&lt;ffffffffa01290f6&gt;] ixgbe_clean_rxtx_many+0x136/0x240 [ixgbe]
 [&lt;ffffffff8140fe53&gt;] net_rx_action+0x103/0x210
 [&lt;ffffffff81073bd7&gt;] __do_softirq+0xb7/0x1e0
 [&lt;ffffffff810d8740&gt;] ? handle_IRQ_event+0x60/0x170
 [&lt;ffffffff810142cc&gt;] call_softirq+0x1c/0x30
 [&lt;ffffffff81015f35&gt;] do_softirq+0x65/0xa0
 [&lt;ffffffff810739d5&gt;] irq_exit+0x85/0x90
 [&lt;ffffffff814cf915&gt;] do_IRQ+0x75/0xf0
 [&lt;ffffffff81013ad3&gt;] ret_from_intr+0x0/0x11
 &lt;EOI&gt;
 [&lt;ffffffff8101bc01&gt;] ? mwait_idle+0x71/0xd0
 [&lt;ffffffff814cd80a&gt;] ? atomic_notifier_call_chain+0x1a/0x20
 [&lt;ffffffff81011e96&gt;] cpu_idle+0xb6/0x110
 [&lt;ffffffff814c17c8&gt;] 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 &gt; 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 &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>bonding/vlan: Avoid mangled NAs on slaves without VLAN tag insertion</title>
<updated>2011-03-31T18:58:04+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2011-02-07T19:20:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ed887b2eed606d4267e950161d40b9d36154ff30'/>
<id>urn:sha1:ed887b2eed606d4267e950161d40b9d36154ff30</id>
<content type='text'>
This is related to commit f88a4a9b65a6f3422b81be995535d0e69df11bb8
upstream, but the bug cannot be properly fixed without the other
changes to VLAN tagging in 2.6.37.

bond_na_send() attempts to insert a VLAN tag in between building and
sending packets of the respective formats.  If the slave does not
implement hardware VLAN tag insertion then vlan_put_tag() will mangle
the network-layer header because the Ethernet header is not present at
this point (unlike in bond_arp_send()).

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;

</content>
</entry>
<entry>
<title>bonding: Fix slave selection bug.</title>
<updated>2011-02-06T19:03:37+00:00</updated>
<author>
<name>Hillf Danton</name>
<email>dhillf@gmail.com</email>
</author>
<published>2010-12-10T18:54:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f69a92aa29a6c15ccad53832a55c1418568f5977'/>
<id>urn:sha1:f69a92aa29a6c15ccad53832a55c1418568f5977</id>
<content type='text'>
[ Upstream commit af3e5bd5f650163c2e12297f572910a1af1b8236 ]

The returned slave is incorrect, if the net device under check is not
charged yet by the master.

Signed-off-by: Hillf Danton &lt;dhillf@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;

</content>
</entry>
<entry>
<title>bonding: correctly process non-linear skbs</title>
<updated>2010-09-27T00:18:18+00:00</updated>
<author>
<name>Andy Gospodarek</name>
<email>andy@greyhouse.net</email>
</author>
<published>2010-09-10T11:43:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b38ac5ef17532d9d73dc08859fd256a647e969db'/>
<id>urn:sha1:b38ac5ef17532d9d73dc08859fd256a647e969db</id>
<content type='text'>
commit ab12811c89e88f2e66746790b1fe4469ccb7bdd9 upstream.

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-&gt;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 &lt;alexander.h.duyck@intel.com&gt; and Jesse
Brandeburg &lt;jesse.brandeburg@intel.com&gt; for the suggestions on this one.

Signed-off-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Alexander Duyck &lt;alexander.h.duyck@intel.com&gt;
CC: Jesse Brandeburg &lt;jesse.brandeburg@intel.com&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>bonding: set device in RLB ARP packet handler</title>
<updated>2010-07-25T03:37:48+00:00</updated>
<author>
<name>Greg Edwards</name>
<email>greg.edwards@hp.com</email>
</author>
<published>2010-07-23T10:02:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d8190dff018ffe932d17cae047c6b3d1c5fc7574'/>
<id>urn:sha1:d8190dff018ffe932d17cae047c6b3d1c5fc7574</id>
<content type='text'>
After:

commit 6146b1a4da98377e4abddc91ba5856bef8f23f1e
Author: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
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 1f3c8804acba841b5573b953f5560d2683d2db0d
Author: Andy Gospodarek &lt;andy@greyhouse.net&gt;
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 &gt; /sys/class/net/bond0/bonding/mode
echo 100 &gt; /sys/class/net/bond0/bonding/miimon
ifconfig bond0 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx
echo +eth0 &gt; /sys/class/net/bond0/bonding/slaves
echo +eth1 &gt; /sys/class/net/bond0/bonding/slaves

echo +bond1 &gt; /sys/class/net/bonding_masters
echo balance-alb &gt; /sys/class/net/bond1/bonding/mode
echo 100 &gt; /sys/class/net/bond1/bonding/miimon
ifconfig bond1 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx
echo +eth2 &gt; /sys/class/net/bond1/bonding/slaves
echo +eth3 &gt; /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: Greg Edwards &lt;greg.edwards@hp.com&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Acked-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bonding: check if clients MAC addr has changed</title>
<updated>2010-06-30T20:51:11+00:00</updated>
<author>
<name>Flavio Leitner</name>
<email>fleitner@redhat.com</email>
</author>
<published>2010-06-29T08:24:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=42d782ac1bef7cbcdf05b857731345c6e8149f90'/>
<id>urn:sha1:42d782ac1bef7cbcdf05b857731345c6e8149f90</id>
<content type='text'>
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 &lt;system2&gt;
    ARP request  ---------&gt;
                           &lt;--------- ARP reply

+-&gt;rlb_arp_recv  &lt;---------------------+   &lt;--- loop begins
|  rlb_update_entry_from_arp           |
|  client_info-&gt;ntt = 1;               |
|  bond_info-&gt;rx_ntt = 1;              |
|                                      |
|         &lt;communication succeed&gt;      |
|                                      |
|  bond_alb_monitor                    |
|  rlb_update_rx_clients               |
|  rlb_update_client                   |
|  arp_create(ARPOP_REPLY)             |
|   send ARP reply --------------&gt;     V
|   send ARP reply --------------&gt;
|                               rlb_arp_recv
|                               rlb_update_entry_from_arp
|                               client_info-&gt;ntt = 1;
|                               bond_info-&gt;rx_ntt = 1;
|                           &lt; snipped, same as in system 1&gt;
+-------           &lt;-------------- send ARP reply
                   &lt;-------------- 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: Flavio Leitner &lt;fleitner@redhat.com&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bonding: prevent netpoll over bonded interfaces</title>
<updated>2010-06-29T06:54:10+00:00</updated>
<author>
<name>Andy Gospodarek</name>
<email>andy@greyhouse.net</email>
</author>
<published>2010-06-25T09:50:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c22d7ac844f1cb9c6a5fd20f89ebadc2feef891b'/>
<id>urn:sha1:c22d7ac844f1cb9c6a5fd20f89ebadc2feef891b</id>
<content type='text'>
Support for netpoll over bonded interfaces was added here:

	commit f6dc31a85cd46a959bdd987adad14c3b645e03c1
	Author: WANG Cong &lt;amwang@redhat.com&gt;
	Date:   Thu May 6 00:48:51 2010 -0700

	    bonding: make bonding support netpoll

but it is bad enough that we should probably just disable netpoll over
bonding until some of the locking logic in the bonding driver is changed
or converted completely to RCU.  Simple actions like changing the active
slave in active-backup mode will hang the box if a high enough printk
debugging level is enabled.

Keeping the old code around will be good for anyone that wants to work
on it (and for after the RCU conversion), so I propose this small patch
rather than ripping it all out.

Signed-off-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bonding: make bonding support netpoll</title>
<updated>2010-05-06T07:48:51+00:00</updated>
<author>
<name>WANG Cong</name>
<email>amwang@redhat.com</email>
</author>
<published>2010-05-06T07:48:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f6dc31a85cd46a959bdd987adad14c3b645e03c1'/>
<id>urn:sha1:f6dc31a85cd46a959bdd987adad14c3b645e03c1</id>
<content type='text'>
Based on Andy's work, but I modified a lot.

Similar to the patch for bridge, this patch does:

1) implement the 2 methods to support netpoll for bonding;

2) modify netpoll during forwarding packets via bonding;

3) disable netpoll support of bonding when a netpoll-unabled device
   is added to bonding;

4) enable netpoll support when all underlying devices support netpoll.

Cc: Andy Gospodarek &lt;gospo@redhat.com&gt;
Cc: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Cc: Matt Mackall &lt;mpm@selenic.com&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: WANG Cong &lt;amwang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2010-04-07T06:53:30+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2010-04-07T06:53:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4a35ecf8bf1c4b039503fa554100fe85c761de76'/>
<id>urn:sha1:4a35ecf8bf1c4b039503fa554100fe85c761de76</id>
<content type='text'>
Conflicts:
	drivers/net/bonding/bond_main.c
	drivers/net/via-velocity.c
	drivers/net/wireless/iwlwifi/iwl-agn.c
</content>
</entry>
<entry>
<title>net: convert multicast list to list_head</title>
<updated>2010-04-03T21:22:15+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jpirko@redhat.com</email>
</author>
<published>2010-04-01T21:22:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=22bedad3ce112d5ca1eaf043d4990fa2ed698c87'/>
<id>urn:sha1:22bedad3ce112d5ca1eaf043d4990fa2ed698c87</id>
<content type='text'>
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: Jiri Pirko &lt;jpirko@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
