Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Apr 2005 16:16:10 -0700 (PDT) Received: from orsfmr002.jf.intel.com (fmr17.intel.com [134.134.136.16]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j37NG6SB003761 for ; Thu, 7 Apr 2005 16:16:06 -0700 Received: from orsfmr101.jf.intel.com (orsfmr101.jf.intel.com [10.7.209.17]) by orsfmr002.jf.intel.com (8.12.10/8.12.10/d: major-outer.mc,v 1.1 2004/09/17 17:50:56 root Exp $) with ESMTP id j37NFqwZ022429; Thu, 7 Apr 2005 23:15:52 GMT Received: from nwlxmail01.jf.intel.com (nwlxmail01.jf.intel.com [10.7.171.40]) by orsfmr101.jf.intel.com (8.12.10/8.12.10/d: major-inner.mc,v 1.2 2004/09/17 18:05:01 root Exp $) with ESMTP id j37NFqRZ024716; Thu, 7 Apr 2005 23:15:52 GMT Received: from [134.134.3.231] ([134.134.3.231]) by nwlxmail01.jf.intel.com (8.12.10/8.12.9/MailSET/Hub) with ESMTP id j37NFqSL028838; Thu, 7 Apr 2005 16:15:52 -0700 Date: Fri, 8 Apr 2005 16:15:24 -0700 (PDT) From: Radheka Godse X-X-Sender: radheka@localhost.localdomain To: fubar@us.ibm.com, bonding-devel@lists.sourceforge.net cc: netdev@oss.sgi.com Subject: [PATCH 2.6.12-rc2 0/17] bonding: sysfs interface... Message-ID: ReplyTo: "Radheka Godse" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Scanned-By: MIMEDefang 2.44 X-Virus-Scanned: ClamAV 0.83/813/Thu Apr 7 03:20:51 2005 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 1552 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: radheka.godse@intel.com Precedence: bulk X-list: netdev Content-Length: 2240 Lines: 55 This patch set implements the sysfs interface for bonding and has a couple bug fixes. We have done a full test pass and consider these patches ready for inclusion upstream. We have submitted them to bonding-devel several times and have incorporated feedback and fixes all known issues. The interface is pretty simple. Here are some notes on how it could be used: The file /sys/class/net/bonding_masters contains the names of all the active bonds. To add or remove bonds, write a whitespace-delimited list of interface names to this file. For example: echo "bond1 bond2 bond3" > /sys/class/net/bonding_masters will create three bonds with the given names. If any other bonds exist, they will be deleted. echo "bond0 bond2 bond3" > /sys/class/net/bonding_masters would then create bond0 and remove bond1. For each bond, there is a directory /sys/class/net//bonding. In this directory are a number of files which control the bond. The names of these files match the existing module parameters and do the same things. The slaves file contains a whitespace-delimited list of interface names, which are slaves to the bond. This file behaves much the same as the "bonding_masters" file; just write a list of your desired interfaces to this file. Likewise, the arp_targets file contains a whitespace-delimited list of IP addresses and should be written to in a similar fashion. The other files contain single values(numeric and/or mnemonic), except for stat, which duplicates the slave information in the proc file. Some caveats: - slaves can only be assigned when the interface is up - mode can only be changed when the interface is down Warnings and status messages will be logged and can be viewed with dmesg. Example: modprobe bonding echo "bond0 bond1" > /sys/class/net/bonding_masters echo "6" > /sys/class/net/bond0/bonding/mode echo "1000" > /sys/class/net/bond0/bonding/miimon ifconfig bond0 192.168.0.1 echo "eth0 eth1" > /sys/class/net/bond0/bonding/slaves # bond0 is now ready to use echo "1" > /sys/class/net/bond1/bonding/mode # ... and so on for bond1 These patches apply cleanly to kernel 2.6.12-rc2. - Mitch Williams - Radheka Godse