aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_options.c
diff options
context:
space:
mode:
authorDebabrata Banerjee <dbanerje@akamai.com>2018-05-14 14:48:10 -0400
committerDavid S. Miller <davem@davemloft.net>2018-05-16 12:15:11 -0400
commit1386c36b30388f46a95100924bfcae75160db715 (patch)
treedb9d63a1cb1d8afe910fc0bbf24ad16dd3fdf887 /drivers/net/bonding/bond_options.c
parentbonding: allow use of tx hashing in balance-alb (diff)
downloadlinux-dev-1386c36b30388f46a95100924bfcae75160db715.tar.xz
linux-dev-1386c36b30388f46a95100924bfcae75160db715.zip
bonding: allow carrier and link status to determine link state
In a mixed environment it may be difficult to tell if your hardware support carrier, if it does not it can always report true. With a new use_carrier option of 2, we can check both carrier and link status sequentially, instead of one or the other Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/bonding/bond_options.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index 8a945c9341d6..dba6cef05134 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -164,9 +164,10 @@ static const struct bond_opt_value bond_primary_reselect_tbl[] = {
};
static const struct bond_opt_value bond_use_carrier_tbl[] = {
- { "off", 0, 0},
- { "on", 1, BOND_VALFLAG_DEFAULT},
- { NULL, -1, 0}
+ { "off", 0, 0},
+ { "on", 1, BOND_VALFLAG_DEFAULT},
+ { "both", 2, 0},
+ { NULL, -1, 0}
};
static const struct bond_opt_value bond_all_slaves_active_tbl[] = {