bonding: don't change to 802.3ad mode while ARP monitor is running
Subsystems (3)
PATCH 1/1 bonding: don't change to 802.3ad mode while ARP monitor is running
Because the ARP monitor is not support for 802.3ad, but We still could change the mode to 802.3ad from ab mode while ARP monirot is running, it is incorrect.
So add a check for 802.3ad in bonding_store_mode to fix the problem, and make a micro program to simplify the code.
--- drivers/net/bonding/bond_options.c | 2 +- drivers/net/bonding/bonding.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/net/bonding/bond_options.c +1 -1
@@ -45,7 +45,7 @@ int bond_option_mode_set(struct bonding *bond, int mode)return -EPERM ; } -if (BOND_MODE_IS_LB (mode) && bond->params.arp_interval) { +if (BOND_NO_USES_ARP (mode) && bond->params.arp_interval) {pr_err ("%s: %s mode is incompatible with arp monitoring.\n" , bond->dev->name, bond_mode_tbl[mode].modename);return -EINVAL ;
drivers/net/bonding/bonding.h +4 -0
@@ -63,6 +63,10 @@ (((mode) ==BOND_MODE_TLB ) || \ ((mode) == BOND_MODE_ALB)) +#define BOND_NO_USES_ARP (mode) \ + (((mode) == BOND_MODE_8023AD) || \ + ((mode) == BOND_MODE_TLB) || \ + ((mode) == BOND_MODE_ALB))/* * Less bad way to call ioctl from within the kernel; this needs to be * done some other way to get the call out of interrupt context.
Signature · 1 line
1.7.12
David Miller
maintainerFrom: Ding Tianhong <[email protected]>
Date: Fri, 15 Nov 2013 18:02:18 +0800
Quoted 1 line
Because the ARP monitor is not support for 802.3ad, but We still
^^^^^^^
"supported"
No need to capitalize "We".
Quoted 1 line
could change the mode to 802.3ad from ab mode while ARP monirot
^^^^^^^
"monitor"
Quoted 4 lines
is running, it is incorrect.
So add a check for 802.3ad in
bonding_store_modeto fix the problem, and make a micro program to simplify the code.
What is a "micro program"?
Quoted 13 lines · David Miller
From: Ding Tianhong <[email protected]>
Date: Fri, 15 Nov 2013 18:02:18 +0800Quoted 1 line
Because the ARP monitor is not support for 802.3ad, but We still
^^^^^^^"supported"
No need to capitalize "We".
Quoted 1 line
could change the mode to 802.3ad from ab mode while ARP monirot
^^^^^^^
Quoted 7 lines
"monitor"
Quoted 4 lines
is running, it is incorrect.
So add a check for 802.3ad in
bonding_store_modeto fix the problem, and make a micro program to simplify the code.What is a "micro program"?
sorry, not review the changelog yet,I will resend it and it will not be happend again. Regards
Ding
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html