lkml.org 
[lkml]   [2000]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH-2.2] Bonding Driver Enhancements + Security fix
Willy TARREAU wrote:
>
> Hello Thomas !
>
> I've slightly enhanced the bonding code :
> - MII link checking with automatic slave enabling/disabling :
> Now the bond interface monitors all its MII-compliant slaves
> and disables the ones which have a dead link, and enables those
> which have a good one. The link check time defaults to 1 second
> but I've seen no overhead even at 30 ms.
>
> - slave release is now possible with a running bond
> - SMP-safe enslave/release/check/stats/xmit
> - fix a security bug which allowed anybody to enslave any active interface,
> thus making a local denial of service.
> - fix a potential infinite loop in bond_xmit() if no slave is useable.
>
> It now works very well for me, and the removal of a link becomes
> completely transparent now. On monday, I'll trunk it to an alteon switch.
>
> I've stressed the enslave/release code during "ping -f" and links up/down,
> but triggered absolutely no problem. I think it's stable enough to include it
> in 2.2.18 (Alan CC'ed for this). I'd like Constantine to test it on his servers
> because it should do exactly what he needed, and send us his feedback.
>

Ok, I have several things, since work is being done on this..

rename bond_xmit to bond_xmit_roundrobin, so bond_xmit_xor can be
implemented, and used if desired. bond_xmit_xor is what cisco
etherchannel/sun trunking really uses, not round robin.

Remove the variable counters from the xmit loop.. Make it more like:
(from the 2.4 bonding driver)

start = slave = bond

do {
if (slave == bond)
continue;
if (blah..blah)
do xmit()
return 0;
}
} while ((slave=slave->next) != start_at);
kfree(skb);
return 0;

This simplifies the transmit path; and bonding is cpu intensive already!

I'd also like to get the help included.. see attached patch for that!

--
------------------------+--------------------------------------------------
Thomas Davis | PDSF Project Leader
tadavis@lbl.gov |
(510) 486-4524 | "Only a petabyte of data this year?"diff -ruN linux-2.2.17-RAID/Documentation/Configure.help linux/Documentation/Configure.help
--- linux-2.2.17-RAID/Documentation/Configure.help Tue Sep 19 17:18:27 2000
+++ linux/Documentation/Configure.help Mon Oct 2 13:32:41 2000
@@ -4901,6 +4901,28 @@
time, you need to compile this driver as a module. Instead of
'dummy', the devices will then be called 'dummy0', 'dummy1' etc.

+Bonding driver support
+CONFIG_BONDING
+ Say 'Y' or 'M' if you wish to be able to 'bond' multiple Ethernet
+ Channels together. This is called 'Etherchannel' by Cisco,
+ 'Trunking' by Sun, and 'Bonding' in Linux.
+
+ If you have two ethernet connections to some other computer, you can
+ make them behave like one double speed connection using this driver.
+ Naturally, this has to be supported at the other end as well, either
+ with a similar Bonding Linux driver, a Cisco 5500 switch or a
+ SunTrunking SunSoft driver.
+
+ This is similar to the EQL driver, but it merges Ethernet segments
+ instead of serial lines.
+
+ For more information, please see Documentation/networking/bonding.txt.
+
+ If you want to compile this as a module ( = code which can be
+ inserted in and removed from the running kernel whenever you want),
+ say M here and read Documentation/modules.txt. The module will be
+ called bonding.o.
+
SLIP (serial line) support
CONFIG_SLIP
Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to
\
 
 \ /
  Last update: 2005-03-22 12:39    [W:2.457 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site