提交 ff71529d 编写于 作者: V Veaceslav Falico 提交者: David S. Miller

bonding: use last_arp_rx in bond_loadbalance_arp_mon()

Now that last_arp_rx correctly show the last time we've received an ARP, we
can use it safely instead of slave->dev->last_rx.

CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9f242738
...@@ -2372,7 +2372,7 @@ static void bond_loadbalance_arp_mon(struct work_struct *work) ...@@ -2372,7 +2372,7 @@ static void bond_loadbalance_arp_mon(struct work_struct *work)
if (slave->link != BOND_LINK_UP) { if (slave->link != BOND_LINK_UP) {
if (bond_time_in_interval(bond, trans_start, 1) && if (bond_time_in_interval(bond, trans_start, 1) &&
bond_time_in_interval(bond, slave->dev->last_rx, 1)) { bond_time_in_interval(bond, slave->last_arp_rx, 1)) {
slave->link = BOND_LINK_UP; slave->link = BOND_LINK_UP;
slave_state_changed = 1; slave_state_changed = 1;
...@@ -2401,7 +2401,7 @@ static void bond_loadbalance_arp_mon(struct work_struct *work) ...@@ -2401,7 +2401,7 @@ static void bond_loadbalance_arp_mon(struct work_struct *work)
* if we don't know our ip yet * if we don't know our ip yet
*/ */
if (!bond_time_in_interval(bond, trans_start, 2) || if (!bond_time_in_interval(bond, trans_start, 2) ||
!bond_time_in_interval(bond, slave->dev->last_rx, 2)) { !bond_time_in_interval(bond, slave->last_arp_rx, 2)) {
slave->link = BOND_LINK_DOWN; slave->link = BOND_LINK_DOWN;
slave_state_changed = 1; slave_state_changed = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册