Commit 834db4bc authored by dingtianhong's avatar dingtianhong Committed by David S. Miller

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: default avatarDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3a7129e5
...@@ -4071,8 +4071,8 @@ static int bond_check_params(struct bond_params *params) ...@@ -4071,8 +4071,8 @@ static int bond_check_params(struct bond_params *params)
num_peer_notif = 1; num_peer_notif = 1;
} }
/* reset values for 802.3ad */ /* reset values for 802.3ad/TLB/ALB */
if (bond_mode == BOND_MODE_8023AD) { if (BOND_NO_USES_ARP(bond_mode)) {
if (!miimon) { 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("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"); pr_warning("Forcing miimon to 100msec\n");
...@@ -4107,16 +4107,6 @@ static int bond_check_params(struct bond_params *params) ...@@ -4107,16 +4107,6 @@ static int bond_check_params(struct bond_params *params)
packets_per_slave = 1; 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) { 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", 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); updelay);
......
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