Commit b1098bbe authored by Cong Wang's avatar Cong Wang Committed by David S. Miller

bonding: remove ifenslave.c from kernel source

As Stephen proposed:
Since bonding supports configuration via iproute (netlink) and sysfs, I think
it is time to purge the old ifenslave code out of Documentation/networking
and update the documentation.
Suggested-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: default avatarCong Wang <amwang@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3dd17ede
...@@ -88,8 +88,6 @@ gianfar.txt ...@@ -88,8 +88,6 @@ gianfar.txt
- Gianfar Ethernet Driver. - Gianfar Ethernet Driver.
ieee802154.txt ieee802154.txt
- Linux IEEE 802.15.4 implementation, API and drivers - Linux IEEE 802.15.4 implementation, API and drivers
ifenslave.c
- Configure network interfaces for parallel routing (bonding).
igb.txt igb.txt
- README for the Intel Gigabit Ethernet Driver (igb). - README for the Intel Gigabit Ethernet Driver (igb).
igbvf.txt igbvf.txt
......
# kbuild trick to avoid linker error. Can be omitted if a module is built. # kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o obj- := dummy.o
# List of programs to build
hostprogs-y := ifenslave
HOSTCFLAGS_ifenslave.o += -I$(objtree)/usr/include
# Tell kbuild to always build the programs # Tell kbuild to always build the programs
always := $(hostprogs-y) always := $(hostprogs-y)
......
...@@ -104,8 +104,7 @@ Table of Contents ...@@ -104,8 +104,7 @@ Table of Contents
============================== ==============================
Most popular distro kernels ship with the bonding driver Most popular distro kernels ship with the bonding driver
already available as a module and the ifenslave user level control already available as a module. If your distro does not, or you
program installed and ready for use. If your distro does not, or you
have need to compile bonding from source (e.g., configuring and have need to compile bonding from source (e.g., configuring and
installing a mainline kernel from kernel.org), you'll need to perform installing a mainline kernel from kernel.org), you'll need to perform
the following steps: the following steps:
...@@ -124,46 +123,13 @@ device support" section. It is recommended that you configure the ...@@ -124,46 +123,13 @@ device support" section. It is recommended that you configure the
driver as module since it is currently the only way to pass parameters driver as module since it is currently the only way to pass parameters
to the driver or configure more than one bonding device. to the driver or configure more than one bonding device.
Build and install the new kernel and modules, then continue Build and install the new kernel and modules.
below to install ifenslave.
1.2 Install ifenslave Control Utility 1.2 Bonding Control Utility
------------------------------------- -------------------------------------
The ifenslave user level control program is included in the It is recommended to configure bonding via iproute2 (netlink)
kernel source tree, in the file Documentation/networking/ifenslave.c. or sysfs, the old ifenslave control utility is obsolete.
It is generally recommended that you use the ifenslave that
corresponds to the kernel that you are using (either from the same
source tree or supplied with the distro), however, ifenslave
executables from older kernels should function (but features newer
than the ifenslave release are not supported). Running an ifenslave
that is newer than the kernel is not supported, and may or may not
work.
To install ifenslave, do the following:
# gcc -Wall -O -I/usr/src/linux/include ifenslave.c -o ifenslave
# cp ifenslave /sbin/ifenslave
If your kernel source is not in "/usr/src/linux," then replace
"/usr/src/linux/include" in the above with the location of your kernel
source include directory.
You may wish to back up any existing /sbin/ifenslave, or, for
testing or informal use, tag the ifenslave to the kernel version
(e.g., name the ifenslave executable /sbin/ifenslave-2.6.10).
IMPORTANT NOTE:
If you omit the "-I" or specify an incorrect directory, you
may end up with an ifenslave that is incompatible with the kernel
you're trying to build it for. Some distros (e.g., Red Hat from 7.1
onwards) do not have /usr/include/linux symbolically linked to the
default kernel source include directory.
SECOND IMPORTANT NOTE:
If you plan to configure bonding using sysfs or using the
/etc/network/interfaces file, you do not need to use ifenslave.
2. Bonding Driver Options 2. Bonding Driver Options
========================= =========================
...@@ -851,7 +817,7 @@ resend_igmp ...@@ -851,7 +817,7 @@ resend_igmp
============================== ==============================
You can configure bonding using either your distro's network You can configure bonding using either your distro's network
initialization scripts, or manually using either ifenslave or the initialization scripts, or manually using either iproute2 or the
sysfs interface. Distros generally use one of three packages for the sysfs interface. Distros generally use one of three packages for the
network initialization scripts: initscripts, sysconfig or interfaces. network initialization scripts: initscripts, sysconfig or interfaces.
Recent versions of these packages have support for bonding, while older Recent versions of these packages have support for bonding, while older
...@@ -1160,7 +1126,7 @@ not support this method for specifying multiple bonding interfaces; for ...@@ -1160,7 +1126,7 @@ not support this method for specifying multiple bonding interfaces; for
those instances, see the "Configuring Multiple Bonds Manually" section, those instances, see the "Configuring Multiple Bonds Manually" section,
below. below.
3.3 Configuring Bonding Manually with Ifenslave 3.3 Configuring Bonding Manually with iproute2
----------------------------------------------- -----------------------------------------------
This section applies to distros whose network initialization This section applies to distros whose network initialization
...@@ -1171,7 +1137,7 @@ version 8. ...@@ -1171,7 +1137,7 @@ version 8.
The general method for these systems is to place the bonding The general method for these systems is to place the bonding
module parameters into a config file in /etc/modprobe.d/ (as module parameters into a config file in /etc/modprobe.d/ (as
appropriate for the installed distro), then add modprobe and/or appropriate for the installed distro), then add modprobe and/or
ifenslave commands to the system's global init script. The name of `ip link` commands to the system's global init script. The name of
the global init script differs; for sysconfig, it is the global init script differs; for sysconfig, it is
/etc/init.d/boot.local and for initscripts it is /etc/rc.d/rc.local. /etc/init.d/boot.local and for initscripts it is /etc/rc.d/rc.local.
...@@ -1183,8 +1149,8 @@ reboots, edit the appropriate file (/etc/init.d/boot.local or ...@@ -1183,8 +1149,8 @@ reboots, edit the appropriate file (/etc/init.d/boot.local or
modprobe bonding mode=balance-alb miimon=100 modprobe bonding mode=balance-alb miimon=100
modprobe e100 modprobe e100
ifconfig bond0 192.168.1.1 netmask 255.255.255.0 up ifconfig bond0 192.168.1.1 netmask 255.255.255.0 up
ifenslave bond0 eth0 ip link set eth0 master bond0
ifenslave bond0 eth1 ip link set eth1 master bond0
Replace the example bonding module parameters and bond0 Replace the example bonding module parameters and bond0
network configuration (IP address, netmask, etc) with the appropriate network configuration (IP address, netmask, etc) with the appropriate
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment