diff options
author | stephen hemminger <shemminger@vyatta.com> | 2011-06-22 05:54:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-23 05:12:55 -0400 |
commit | 655f8919d549ad1872e24d826b6ce42530516d2e (patch) | |
tree | 00ecb9724df0f4d162ea7de10fbf74d659e35cfd /drivers/net/bonding/bond_main.c | |
parent | 56f8a75c17abb854b5907f4a815dc4c3f186ba11 (diff) |
bonding: add min links parameter to 802.3ad
This adds support for a configuring the minimum number of links that
must be active before asserting carrier. It is similar to the Cisco
EtherChannel min-links feature. This allows setting the minimum number
of member ports that must be up (link-up state) before marking the
bond device as up (carrier on). This is useful for situations where
higher level services such as clustering want to ensure a minimum
number of low bandwidth links are active before switchover.
See:
http://bugzilla.vyatta.com/show_bug.cgi?id=7196
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index ebb1d219b45c..61265f74ed3d 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -98,6 +98,7 @@ static char *mode; | |||
98 | static char *primary; | 98 | static char *primary; |
99 | static char *primary_reselect; | 99 | static char *primary_reselect; |
100 | static char *lacp_rate; | 100 | static char *lacp_rate; |
101 | static int min_links; | ||
101 | static char *ad_select; | 102 | static char *ad_select; |
102 | static char *xmit_hash_policy; | 103 | static char *xmit_hash_policy; |
103 | static int arp_interval = BOND_LINK_ARP_INTERV; | 104 | static int arp_interval = BOND_LINK_ARP_INTERV; |
@@ -150,6 +151,9 @@ module_param(ad_select, charp, 0); | |||
150 | MODULE_PARM_DESC(ad_select, "803.ad aggregation selection logic; " | 151 | MODULE_PARM_DESC(ad_select, "803.ad aggregation selection logic; " |
151 | "0 for stable (default), 1 for bandwidth, " | 152 | "0 for stable (default), 1 for bandwidth, " |
152 | "2 for count"); | 153 | "2 for count"); |
154 | module_param(min_links, int, 0); | ||
155 | MODULE_PARM_DESC(min_links, "Minimum number of available links before turning on carrier"); | ||
156 | |||
153 | module_param(xmit_hash_policy, charp, 0); | 157 | module_param(xmit_hash_policy, charp, 0); |
154 | MODULE_PARM_DESC(xmit_hash_policy, "balance-xor and 802.3ad hashing method; " | 158 | MODULE_PARM_DESC(xmit_hash_policy, "balance-xor and 802.3ad hashing method; " |
155 | "0 for layer 2 (default), 1 for layer 3+4, " | 159 | "0 for layer 2 (default), 1 for layer 3+4, " |
@@ -4798,6 +4802,7 @@ static int bond_check_params(struct bond_params *params) | |||
4798 | params->tx_queues = tx_queues; | 4802 | params->tx_queues = tx_queues; |
4799 | params->all_slaves_active = all_slaves_active; | 4803 | params->all_slaves_active = all_slaves_active; |
4800 | params->resend_igmp = resend_igmp; | 4804 | params->resend_igmp = resend_igmp; |
4805 | params->min_links = min_links; | ||
4801 | 4806 | ||
4802 | if (primary) { | 4807 | if (primary) { |
4803 | strncpy(params->primary, primary, IFNAMSIZ); | 4808 | strncpy(params->primary, primary, IFNAMSIZ); |