Skip to content

Commit b1098bb

Browse files
Cong Wangdavem330
authored andcommitted
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: Stephen 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: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 3dd17ed commit b1098bb

5 files changed

Lines changed: 10 additions & 1157 deletions

File tree

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
ifenslave

‎Documentation/networking/00-INDEX‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ gianfar.txt
8888
- Gianfar Ethernet Driver.
8989
ieee802154.txt
9090
- Linux IEEE 802.15.4 implementation, API and drivers
91-
ifenslave.c
92-
- Configure network interfaces for parallel routing (bonding).
9391
igb.txt
9492
- README for the Intel Gigabit Ethernet Driver (igb).
9593
igbvf.txt

‎Documentation/networking/Makefile‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# kbuild trick to avoid linker error. Can be omitted if a module is built.
22
obj- := dummy.o
33

4-
# List of programs to build
5-
hostprogs-y := ifenslave
6-
7-
HOSTCFLAGS_ifenslave.o += -I$(objtree)/usr/include
8-
94
# Tell kbuild to always build the programs
105
always := $(hostprogs-y)
116

‎Documentation/networking/bonding.txt‎

Lines changed: 10 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ Table of Contents
104104
==============================
105105

106106
Most popular distro kernels ship with the bonding driver
107-
already available as a module and the ifenslave user level control
108-
program installed and ready for use. If your distro does not, or you
107+
already available as a module. If your distro does not, or you
109108
have need to compile bonding from source (e.g., configuring and
110109
installing a mainline kernel from kernel.org), you'll need to perform
111110
the following steps:
@@ -124,46 +123,13 @@ device support" section. It is recommended that you configure the
124123
driver as module since it is currently the only way to pass parameters
125124
to the driver or configure more than one bonding device.
126125

127-
Build and install the new kernel and modules, then continue
128-
below to install ifenslave.
126+
Build and install the new kernel and modules.
129127

130-
1.2 Install ifenslave Control Utility
128+
1.2 Bonding Control Utility
131129
-------------------------------------
132130

133-
The ifenslave user level control program is included in the
134-
kernel source tree, in the file Documentation/networking/ifenslave.c.
135-
It is generally recommended that you use the ifenslave that
136-
corresponds to the kernel that you are using (either from the same
137-
source tree or supplied with the distro), however, ifenslave
138-
executables from older kernels should function (but features newer
139-
than the ifenslave release are not supported). Running an ifenslave
140-
that is newer than the kernel is not supported, and may or may not
141-
work.
142-
143-
To install ifenslave, do the following:
144-
145-
# gcc -Wall -O -I/usr/src/linux/include ifenslave.c -o ifenslave
146-
# cp ifenslave /sbin/ifenslave
147-
148-
If your kernel source is not in "/usr/src/linux," then replace
149-
"/usr/src/linux/include" in the above with the location of your kernel
150-
source include directory.
151-
152-
You may wish to back up any existing /sbin/ifenslave, or, for
153-
testing or informal use, tag the ifenslave to the kernel version
154-
(e.g., name the ifenslave executable /sbin/ifenslave-2.6.10).
155-
156-
IMPORTANT NOTE:
157-
158-
If you omit the "-I" or specify an incorrect directory, you
159-
may end up with an ifenslave that is incompatible with the kernel
160-
you're trying to build it for. Some distros (e.g., Red Hat from 7.1
161-
onwards) do not have /usr/include/linux symbolically linked to the
162-
default kernel source include directory.
163-
164-
SECOND IMPORTANT NOTE:
165-
If you plan to configure bonding using sysfs or using the
166-
/etc/network/interfaces file, you do not need to use ifenslave.
131+
It is recommended to configure bonding via iproute2 (netlink)
132+
or sysfs, the old ifenslave control utility is obsolete.
167133

168134
2. Bonding Driver Options
169135
=========================
@@ -851,7 +817,7 @@ resend_igmp
851817
==============================
852818

853819
You can configure bonding using either your distro's network
854-
initialization scripts, or manually using either ifenslave or the
820+
initialization scripts, or manually using either iproute2 or the
855821
sysfs interface. Distros generally use one of three packages for the
856822
network initialization scripts: initscripts, sysconfig or interfaces.
857823
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
11601126
those instances, see the "Configuring Multiple Bonds Manually" section,
11611127
below.
11621128

1163-
3.3 Configuring Bonding Manually with Ifenslave
1129+
3.3 Configuring Bonding Manually with iproute2
11641130
-----------------------------------------------
11651131

11661132
This section applies to distros whose network initialization
@@ -1171,7 +1137,7 @@ version 8.
11711137
The general method for these systems is to place the bonding
11721138
module parameters into a config file in /etc/modprobe.d/ (as
11731139
appropriate for the installed distro), then add modprobe and/or
1174-
ifenslave commands to the system's global init script. The name of
1140+
`ip link` commands to the system's global init script. The name of
11751141
the global init script differs; for sysconfig, it is
11761142
/etc/init.d/boot.local and for initscripts it is /etc/rc.d/rc.local.
11771143

@@ -1183,8 +1149,8 @@ reboots, edit the appropriate file (/etc/init.d/boot.local or
11831149
modprobe bonding mode=balance-alb miimon=100
11841150
modprobe e100
11851151
ifconfig bond0 192.168.1.1 netmask 255.255.255.0 up
1186-
ifenslave bond0 eth0
1187-
ifenslave bond0 eth1
1152+
ip link set eth0 master bond0
1153+
ip link set eth1 master bond0
11881154

11891155
Replace the example bonding module parameters and bond0
11901156
network configuration (IP address, netmask, etc) with the appropriate

0 commit comments

Comments
 (0)