summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authordingtianhong2013-12-21 07:40:17 +0100
committerDavid S. Miller2013-12-31 06:40:31 +0100
commit834db4bcdf937b9f06122a633672ee5acd77085b (patch)
tree5f0df724b448a7f856b791b6a62db1334126005a /drivers/net/bonding/bond_main.c
parentbonding: add option lp_interval for loading module (diff)
downloadkernel-qcow2-linux-834db4bcdf937b9f06122a633672ee5acd77085b.tar.gz
kernel-qcow2-linux-834db4bcdf937b9f06122a633672ee5acd77085b.tar.xz
kernel-qcow2-linux-834db4bcdf937b9f06122a633672ee5acd77085b.zip
bonding: ust micro BOND_NO_USE_ARP to simplify the mode check
The bond 3ad and TLB/ALB has the same check path, so combine them. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 8c973398fef6..06f3a9f344b3 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4071,8 +4071,8 @@ static int bond_check_params(struct bond_params *params)
num_peer_notif = 1;
}
- /* reset values for 802.3ad */
- if (bond_mode == BOND_MODE_8023AD) {
+ /* reset values for 802.3ad/TLB/ALB */
+ if (BOND_NO_USES_ARP(bond_mode)) {
if (!miimon) {
pr_warning("Warning: miimon must be specified, otherwise bonding will not detect link failure, speed and duplex which are essential for 802.3ad operation\n");
pr_warning("Forcing miimon to 100msec\n");
@@ -4107,16 +4107,6 @@ static int bond_check_params(struct bond_params *params)
packets_per_slave = 1;
}
- /* reset values for TLB/ALB */
- if ((bond_mode == BOND_MODE_TLB) ||
- (bond_mode == BOND_MODE_ALB)) {
- if (!miimon) {
- pr_warning("Warning: miimon must be specified, otherwise bonding will not detect link failure and link speed which are essential for TLB/ALB load balancing\n");
- pr_warning("Forcing miimon to 100msec\n");
- miimon = BOND_DEFAULT_MIIMON;
- }
- }
-
if (bond_mode == BOND_MODE_ALB) {
pr_notice("In ALB mode you might experience client disconnections upon reconnection of a link if the bonding module updelay parameter (%d msec) is incompatible with the forwarding delay time of the switch\n",
updelay);