diff options
author | Debabrata Banerjee <dbanerje@akamai.com> | 2018-05-14 14:48:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-16 12:15:11 -0400 |
commit | 1386c36b30388f46a95100924bfcae75160db715 (patch) | |
tree | db9d63a1cb1d8afe910fc0bbf24ad16dd3fdf887 /drivers/net/bonding/bond_options.c | |
parent | e79c1055749e3183a2beee04a24da378623329c5 (diff) | |
download | blackbird-op-linux-1386c36b30388f46a95100924bfcae75160db715.tar.gz blackbird-op-linux-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 'drivers/net/bonding/bond_options.c')
-rw-r--r-- | drivers/net/bonding/bond_options.c | 7 |
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[] = { |