提交 2477bc9a 编写于 作者: J Jonathan Toppins 提交者: David S. Miller

bonding: update bond carrier state when min_links option changes

Cc: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: NJonathan Toppins <jtoppins@cumulusnetworks.com>
Signed-off-by: NJay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 999028cc
...@@ -334,7 +334,7 @@ static int bond_vlan_rx_kill_vid(struct net_device *bond_dev, ...@@ -334,7 +334,7 @@ static int bond_vlan_rx_kill_vid(struct net_device *bond_dev,
* *
* Returns zero if carrier state does not change, nonzero if it does. * Returns zero if carrier state does not change, nonzero if it does.
*/ */
static int bond_set_carrier(struct bonding *bond) int bond_set_carrier(struct bonding *bond)
{ {
struct list_head *iter; struct list_head *iter;
struct slave *slave; struct slave *slave;
......
...@@ -1181,6 +1181,7 @@ static int bond_option_min_links_set(struct bonding *bond, ...@@ -1181,6 +1181,7 @@ static int bond_option_min_links_set(struct bonding *bond,
netdev_info(bond->dev, "Setting min links value to %llu\n", netdev_info(bond->dev, "Setting min links value to %llu\n",
newval->value); newval->value);
bond->params.min_links = newval->value; bond->params.min_links = newval->value;
bond_set_carrier(bond);
return 0; return 0;
} }
......
...@@ -525,6 +525,7 @@ void bond_sysfs_slave_del(struct slave *slave); ...@@ -525,6 +525,7 @@ void bond_sysfs_slave_del(struct slave *slave);
int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev); int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev);
int bond_release(struct net_device *bond_dev, struct net_device *slave_dev); int bond_release(struct net_device *bond_dev, struct net_device *slave_dev);
u32 bond_xmit_hash(struct bonding *bond, struct sk_buff *skb); u32 bond_xmit_hash(struct bonding *bond, struct sk_buff *skb);
int bond_set_carrier(struct bonding *bond);
void bond_select_active_slave(struct bonding *bond); void bond_select_active_slave(struct bonding *bond);
void bond_change_active_slave(struct bonding *bond, struct slave *new_active); void bond_change_active_slave(struct bonding *bond, struct slave *new_active);
void bond_create_debugfs(void); void bond_create_debugfs(void);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册