aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2011-06-22 05:54:39 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-23 05:12:55 -0400
commit655f8919d549ad1872e24d826b6ce42530516d2e (patch)
tree00ecb9724df0f4d162ea7de10fbf74d659e35cfd /drivers/net/bonding/bond_main.c
parent56f8a75c17abb854b5907f4a815dc4c3f186ba11 (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.c5
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;
98static char *primary; 98static char *primary;
99static char *primary_reselect; 99static char *primary_reselect;
100static char *lacp_rate; 100static char *lacp_rate;
101static int min_links;
101static char *ad_select; 102static char *ad_select;
102static char *xmit_hash_policy; 103static char *xmit_hash_policy;
103static int arp_interval = BOND_LINK_ARP_INTERV; 104static int arp_interval = BOND_LINK_ARP_INTERV;
@@ -150,6 +151,9 @@ module_param(ad_select, charp, 0);
150MODULE_PARM_DESC(ad_select, "803.ad aggregation selection logic; " 151MODULE_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");
154module_param(min_links, int, 0);
155MODULE_PARM_DESC(min_links, "Minimum number of available links before turning on carrier");
156
153module_param(xmit_hash_policy, charp, 0); 157module_param(xmit_hash_policy, charp, 0);
154MODULE_PARM_DESC(xmit_hash_policy, "balance-xor and 802.3ad hashing method; " 158MODULE_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);