<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/bonding, branch v3.17</title>
<subtitle>Linux Kernel (branches are rebased on master from time to time)</subtitle>
<id>https://sre.ring0.de/linux/atom?h=v3.17</id>
<link rel='self' href='https://sre.ring0.de/linux/atom?h=v3.17'/>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/'/>
<updated>2014-09-13T21:16:56Z</updated>
<entry>
<title>bonding: fix div by zero while enslaving and transmitting</title>
<updated>2014-09-13T21:16:56Z</updated>
<author>
<name>Nikolay Aleksandrov</name>
<email>nikolay@redhat.com</email>
</author>
<published>2014-09-12T15:38:18Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=9a72c2da690d78e93cff24b9f616412508678dd5'/>
<id>urn:sha1:9a72c2da690d78e93cff24b9f616412508678dd5</id>
<content type='text'>
The problem is that the slave is first linked and slave_cnt is
incremented afterwards leading to a div by zero in the modes that use it
as a modulus. What happens is that in bond_start_xmit()
bond_has_slaves() is used to evaluate further transmission and it becomes
true after the slave is linked in, but when slave_cnt is used in the xmit
path it is still 0, so fetch it once and transmit based on that. Since
it is used only in round-robin and XOR modes, the fix is only for them.
Thanks to Eric Dumazet for pointing out the fault in my first try to fix
this.

Call trace (took it out of net-next kernel, but it's the same with net):
[46934.330038] divide error: 0000 [#1] SMP
[46934.330041] Modules linked in: bonding(O) 9p fscache
snd_hda_codec_generic crct10dif_pclmul
[46934.330041] bond0: Enslaving eth1 as an active interface with an up
link
[46934.330051]  ppdev joydev crc32_pclmul crc32c_intel 9pnet_virtio
ghash_clmulni_intel snd_hda_intel 9pnet snd_hda_controller parport_pc
serio_raw pcspkr snd_hda_codec parport virtio_balloon virtio_console
snd_hwdep snd_pcm pvpanic i2c_piix4 snd_timer i2ccore snd soundcore
virtio_blk virtio_net virtio_pci virtio_ring virtio ata_generic
pata_acpi floppy [last unloaded: bonding]
[46934.330053] CPU: 1 PID: 3382 Comm: ping Tainted: G           O
3.17.0-rc4+ #27
[46934.330053] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[46934.330054] task: ffff88005aebf2c0 ti: ffff88005b728000 task.ti:
ffff88005b728000
[46934.330059] RIP: 0010:[&lt;ffffffffa0198c33&gt;]  [&lt;ffffffffa0198c33&gt;]
bond_start_xmit+0x1c3/0x450 [bonding]
[46934.330060] RSP: 0018:ffff88005b72b7f8  EFLAGS: 00010246
[46934.330060] RAX: 0000000000000679 RBX: ffff88004b077000 RCX:
000000000000002a
[46934.330061] RDX: 0000000000000000 RSI: ffff88004b3f0500 RDI:
ffff88004b077940
[46934.330061] RBP: ffff88005b72b830 R08: 00000000000000c0 R09:
ffff88004a83e000
[46934.330062] R10: 000000000000ffff R11: ffff88004b1f12c0 R12:
ffff88004b3f0500
[46934.330062] R13: ffff88004b3f0500 R14: 000000000000002a R15:
ffff88004b077940
[46934.330063] FS:  00007fbd91a4c740(0000) GS:ffff88005f080000(0000)
knlGS:0000000000000000
[46934.330064] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[46934.330064] CR2: 00007f803a8bb000 CR3: 000000004b2c9000 CR4:
00000000000406e0
[46934.330069] Stack:
[46934.330071]  ffffffff811e6169 00000000e772fa05 ffff88004b077000
ffff88004b3f0500
[46934.330072]  ffffffff81d17d18 000000000000002a 0000000000000000
ffff88005b72b8a0
[46934.330073]  ffffffff81620108 ffffffff8161fe0e ffff88005b72b8c4
ffff88005b302000
[46934.330073] Call Trace:
[46934.330077]  [&lt;ffffffff811e6169&gt;] ?
__kmalloc_node_track_caller+0x119/0x300
[46934.330084]  [&lt;ffffffff81620108&gt;] dev_hard_start_xmit+0x188/0x410
[46934.330086]  [&lt;ffffffff8161fe0e&gt;] ? harmonize_features+0x2e/0x90
[46934.330088]  [&lt;ffffffff81620b06&gt;] __dev_queue_xmit+0x456/0x590
[46934.330089]  [&lt;ffffffff81620c50&gt;] dev_queue_xmit+0x10/0x20
[46934.330090]  [&lt;ffffffff8168f022&gt;] arp_xmit+0x22/0x60
[46934.330091]  [&lt;ffffffff8168f090&gt;] arp_send.part.16+0x30/0x40
[46934.330092]  [&lt;ffffffff8168f1e5&gt;] arp_solicit+0x115/0x2b0
[46934.330094]  [&lt;ffffffff8160b5d7&gt;] ? copy_skb_header+0x17/0xa0
[46934.330096]  [&lt;ffffffff8162875a&gt;] neigh_probe+0x4a/0x70
[46934.330097]  [&lt;ffffffff8162979c&gt;] __neigh_event_send+0xac/0x230
[46934.330098]  [&lt;ffffffff8162a00b&gt;] neigh_resolve_output+0x13b/0x220
[46934.330100]  [&lt;ffffffff8165f120&gt;] ? ip_forward_options+0x1c0/0x1c0
[46934.330101]  [&lt;ffffffff81660478&gt;] ip_finish_output+0x1f8/0x860
[46934.330102]  [&lt;ffffffff81661f08&gt;] ip_output+0x58/0x90
[46934.330103]  [&lt;ffffffff81661602&gt;] ? __ip_local_out+0xa2/0xb0
[46934.330104]  [&lt;ffffffff81661640&gt;] ip_local_out_sk+0x30/0x40
[46934.330105]  [&lt;ffffffff81662a66&gt;] ip_send_skb+0x16/0x50
[46934.330106]  [&lt;ffffffff81662ad3&gt;] ip_push_pending_frames+0x33/0x40
[46934.330107]  [&lt;ffffffff8168854c&gt;] raw_sendmsg+0x88c/0xa30
[46934.330110]  [&lt;ffffffff81612b31&gt;] ? skb_recv_datagram+0x41/0x60
[46934.330111]  [&lt;ffffffff816875a9&gt;] ? raw_recvmsg+0xa9/0x1f0
[46934.330113]  [&lt;ffffffff816978d4&gt;] inet_sendmsg+0x74/0xc0
[46934.330114]  [&lt;ffffffff81697a9b&gt;] ? inet_recvmsg+0x8b/0xb0
[46934.330115] bond0: Adding slave eth2
[46934.330116]  [&lt;ffffffff8160357c&gt;] sock_sendmsg+0x9c/0xe0
[46934.330118]  [&lt;ffffffff81603248&gt;] ?
move_addr_to_kernel.part.20+0x28/0x80
[46934.330121]  [&lt;ffffffff811b4477&gt;] ? might_fault+0x47/0x50
[46934.330122]  [&lt;ffffffff816039b9&gt;] ___sys_sendmsg+0x3a9/0x3c0
[46934.330125]  [&lt;ffffffff8144a14a&gt;] ? n_tty_write+0x3aa/0x530
[46934.330127]  [&lt;ffffffff810d1ae4&gt;] ? __wake_up+0x44/0x50
[46934.330129]  [&lt;ffffffff81242b38&gt;] ? fsnotify+0x238/0x310
[46934.330130]  [&lt;ffffffff816048a1&gt;] __sys_sendmsg+0x51/0x90
[46934.330131]  [&lt;ffffffff816048f2&gt;] SyS_sendmsg+0x12/0x20
[46934.330134]  [&lt;ffffffff81738b29&gt;] system_call_fastpath+0x16/0x1b
[46934.330144] Code: 48 8b 10 4c 89 ee 4c 89 ff e8 aa bc ff ff 31 c0 e9
1a ff ff ff 0f 1f 00 4c 89 ee 4c 89 ff e8 65 fb ff ff 31 d2 4c 89 ee 4c
89 ff &lt;f7&gt; b3 64 09 00 00 e8 02 bd ff ff 31 c0 e9 f2 fe ff ff 0f 1f 00
[46934.330146] RIP  [&lt;ffffffffa0198c33&gt;] bond_start_xmit+0x1c3/0x450
[bonding]
[46934.330146]  RSP &lt;ffff88005b72b7f8&gt;

CC: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Jay Vosburgh &lt;j.vosburgh@gmail.com&gt;
CC: Veaceslav Falico &lt;vfalico@gmail.com&gt;
Fixes: 278b208375 ("bonding: initial RCU conversion")
Signed-off-by: Nikolay Aleksandrov &lt;nikolay@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net:bonding: Add missing space in bonding driver parameter description</title>
<updated>2014-09-10T03:38:03Z</updated>
<author>
<name>Masanari Iida</name>
<email>standby24x7@gmail.com</email>
</author>
<published>2014-09-09T09:07:55Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=37b7021d9d713964482faeb9e0935f458a1a4016'/>
<id>urn:sha1:37b7021d9d713964482faeb9e0935f458a1a4016</id>
<content type='text'>
This patch adds missing space between "interface" and "by"
in bonding module parameter description.

Signed-off-by: Masanari Iida &lt;standby24x7@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2014-08-06T01:46:26Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2014-08-06T01:46:26Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=d247b6ab3ce6dd43665780865ec5fa145d9ab6bd'/>
<id>urn:sha1:d247b6ab3ce6dd43665780865ec5fa145d9ab6bd</id>
<content type='text'>
Conflicts:
	drivers/net/Makefile
	net/ipv6/sysctl_net_ipv6.c

Two ipv6_table_template[] additions overlap, so the index
of the ipv6_table[x] assignments needed to be adjusted.

In the drivers/net/Makefile case, we've gotten rid of the
garbage whereby we had to list every single USB networking
driver in the top-level Makefile, there is just one
"USB_NETWORKING" that guards everything.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bonding: use kobject_put instead of _del after kobject_add</title>
<updated>2014-07-31T18:16:09Z</updated>
<author>
<name>Veaceslav Falico</name>
<email>vfalico@gmail.com</email>
</author>
<published>2014-07-29T11:27:43Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=7afcaec4969652e177cf0b247a1530ac927a20f8'/>
<id>urn:sha1:7afcaec4969652e177cf0b247a1530ac927a20f8</id>
<content type='text'>
Otherwise the name of the kobject isn't getting freed and other stuff from
kobject_cleanup() isn't getting called. kobject_put() will call
kobject_del() on its own in kobject_cleanup().

CC: Jay Vosburgh &lt;j.vosburgh@gmail.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Signed-off-by: Veaceslav Falico &lt;vfalico@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bonding: fix a memory leak in bond_arp_send_all()</title>
<updated>2014-07-29T00:27:47Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-07-25T12:21:21Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=a67eed571aa505f51a4d02cab765a9d4f6ef80c4'/>
<id>urn:sha1:a67eed571aa505f51a4d02cab765a9d4f6ef80c4</id>
<content type='text'>
This test is reversed so the memory is always leaked.  It's better style
to remove the test anyway.

Fixes: 3e403a77779f ('bonding: make it possible to have unlimited nested upper vlans')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Veaceslav Falico &lt;vfalico@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bonding: make it possible to have unlimited nested upper vlans</title>
<updated>2014-07-21T03:35:00Z</updated>
<author>
<name>Veaceslav Falico</name>
<email>vfalico@gmail.com</email>
</author>
<published>2014-07-17T15:02:23Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=3e403a77779faf046862d91c36ef79fb4b12be9a'/>
<id>urn:sha1:3e403a77779faf046862d91c36ef79fb4b12be9a</id>
<content type='text'>
Currently we're limited by a constant level of vlan nestings, and fail to
find anything beyound that level (currently 2).

To fix this - remove the limit of nestings when going through device tree,
and when the end device is found - allocate the needed amount of vlan tags
and return them, instead of found/not found.

CC: Jay Vosburgh &lt;j.vosburgh@gmail.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Signed-off-by: Veaceslav Falico &lt;vfalico@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bonding: destroy proc directory only after all bonds are gone</title>
<updated>2014-07-17T23:33:27Z</updated>
<author>
<name>Veaceslav Falico</name>
<email>vfalico@gmail.com</email>
</author>
<published>2014-07-17T10:04:08Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=23fa5c2caae08f919d906b1064b9fdc352b3024e'/>
<id>urn:sha1:23fa5c2caae08f919d906b1064b9fdc352b3024e</id>
<content type='text'>
Currently we might arrive to bond_net_exit() with some bonds left (that
were created while the module is unloading). We take care of that by
destroying sysfs (the last possibility to add new bonds) and then
destroying all the remaining bonds.

However, we destroy the /proc/net/bonding directory before destroying those
last bonds, and get a warning that we're trying to destroy a non-empty
proc directory (containing /proc/net/bonding/bondX).

Fix this by moving bond_destroy_proc_dir() after all the bonds are
destroyed, so that we're sure that no bonds exist.

CC: Jay Vosburgh &lt;j.vosburgh@gmail.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Signed-off-by: Veaceslav Falico &lt;vfalico@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bonding: use rtnl_deref in bond_change_rx_flags()</title>
<updated>2014-07-17T23:06:52Z</updated>
<author>
<name>Veaceslav Falico</name>
<email>vfalico@gmail.com</email>
</author>
<published>2014-07-16T16:32:01Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=14056e7930761b730e2b34ae716e151ba890f3bf'/>
<id>urn:sha1:14056e7930761b730e2b34ae716e151ba890f3bf</id>
<content type='text'>
As it's always called with RTNL held, via dev_set_allmulti/promiscuity.
Also, remove the wrong comment.

CC: Jay Vosburgh &lt;j.vosburgh@gmail.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Signed-off-by: Veaceslav Falico &lt;vfalico@gmail.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bonding: enhance L2 hash helper with packet type</title>
<updated>2014-07-17T23:03:27Z</updated>
<author>
<name>Jianhua Xie</name>
<email>jianhua.xie@freescale.com</email>
</author>
<published>2014-07-17T06:16:25Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=ce04d63502ca7ec30ef07336a0fd6f1165fd486b'/>
<id>urn:sha1:ce04d63502ca7ec30ef07336a0fd6f1165fd486b</id>
<content type='text'>
Current L2 hash helper calculates destination eth addr and
source ether addr as L2 hash factors.  This patch is adding
packet type ID field into L2 hash factors.  While one of
BOND_XMIT_POLICY_LAYER2 or BOND_XMIT_POLICY_{LAYER|ENCAP}23
is applied, for the 2nd level hash, enhanced hash method can
help to distribute different types of packets like IPv4/IPv6
packets to different slave devices.

CC: Jay Vosburgh &lt;j.vosburgh@gmail.com&gt;
CC: Veaceslav Falico &lt;vfalico@gmail.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: David S. Miller &lt;davem@davemloft.net&gt;
CC: Pan Jiafei &lt;Jiafei.Pan@freescale.com&gt;

Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Jianhua Xie &lt;jianhua.xie@freescale.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bonding: Do not try to send packets over dead link in TLB mode.</title>
<updated>2014-07-17T06:35:35Z</updated>
<author>
<name>Mahesh Bandewar</name>
<email>maheshb@google.com</email>
</author>
<published>2014-07-16T18:10:36Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=6b794c1cd8e0e693621e846166f6a25b38bcb862'/>
<id>urn:sha1:6b794c1cd8e0e693621e846166f6a25b38bcb862</id>
<content type='text'>
In TLB mode if tlb_dynamic_lb is NOT set, slaves from the bond
group are selected based on the hash distribution. This does not
exclude dead links which are part of the bond. Also if there is a
temporary link event which brings down the interface, packets
hashed on that interface would be dropped too.

This patch fixes these issues and distributes flows across the
UP links only. Also the array construction of links which are
capable of sending packets happen in the control path leaving
only link-selection during the data-path.

One possible side effect of this is - at a link event; all
flows will be shuffled to get good distribution. But impact of
this should be minimum with the assumption that a member or
members of the bond group are not available is a very temporary
situation.

Signed-off-by: Mahesh Bandewar &lt;maheshb@google.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
