* [Patch net] bonding: commit link status change after propose
@ 2017-07-25 16:44 Cong Wang
2017-07-25 22:14 ` Mahesh Bandewar (महेश बंडेवार)
2017-07-26 20:43 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Cong Wang @ 2017-07-25 16:44 UTC (permalink / raw)
To: netdev; +Cc: benjamin.gilbert, Cong Wang, Mahesh Bandewar
Commit de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring")
moves link status commitment into bond_mii_monitor(), but it still relies
on the return value of bond_miimon_inspect() as the hint. We need to return
non-zero as long as we propose a link status change.
Fixes: de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring")
Reported-by: Benjamin Gilbert <benjamin.gilbert@coreos.com>
Tested-by: Benjamin Gilbert <benjamin.gilbert@coreos.com>
Cc: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
drivers/net/bonding/bond_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 181839d6fbea..9bee6c1c70cc 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2050,6 +2050,7 @@ static int bond_miimon_inspect(struct bonding *bond)
continue;
bond_propose_link_state(slave, BOND_LINK_FAIL);
+ commit++;
slave->delay = bond->params.downdelay;
if (slave->delay) {
netdev_info(bond->dev, "link status down for %sinterface %s, disabling it in %d ms\n",
@@ -2088,6 +2089,7 @@ static int bond_miimon_inspect(struct bonding *bond)
continue;
bond_propose_link_state(slave, BOND_LINK_BACK);
+ commit++;
slave->delay = bond->params.updelay;
if (slave->delay) {
--
2.13.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch net] bonding: commit link status change after propose
2017-07-25 16:44 [Patch net] bonding: commit link status change after propose Cong Wang
@ 2017-07-25 22:14 ` Mahesh Bandewar (महेश बंडेवार)
2017-07-26 20:43 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Mahesh Bandewar (महेश बंडेवार) @ 2017-07-25 22:14 UTC (permalink / raw)
To: Cong Wang; +Cc: linux-netdev, benjamin.gilbert
On Tue, Jul 25, 2017 at 9:44 AM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> Commit de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring")
> moves link status commitment into bond_mii_monitor(), but it still relies
> on the return value of bond_miimon_inspect() as the hint. We need to return
> non-zero as long as we propose a link status change.
>
> Fixes: de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring")
> Reported-by: Benjamin Gilbert <benjamin.gilbert@coreos.com>
> Tested-by: Benjamin Gilbert <benjamin.gilbert@coreos.com>
> Cc: Mahesh Bandewar <maheshb@google.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Mahesh Bandewar <maheshb@google.com>
> ---
> drivers/net/bonding/bond_main.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 181839d6fbea..9bee6c1c70cc 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -2050,6 +2050,7 @@ static int bond_miimon_inspect(struct bonding *bond)
> continue;
>
> bond_propose_link_state(slave, BOND_LINK_FAIL);
> + commit++;
> slave->delay = bond->params.downdelay;
> if (slave->delay) {
> netdev_info(bond->dev, "link status down for %sinterface %s, disabling it in %d ms\n",
> @@ -2088,6 +2089,7 @@ static int bond_miimon_inspect(struct bonding *bond)
> continue;
>
> bond_propose_link_state(slave, BOND_LINK_BACK);
> + commit++;
> slave->delay = bond->params.updelay;
>
> if (slave->delay) {
> --
> 2.13.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch net] bonding: commit link status change after propose
2017-07-25 16:44 [Patch net] bonding: commit link status change after propose Cong Wang
2017-07-25 22:14 ` Mahesh Bandewar (महेश बंडेवार)
@ 2017-07-26 20:43 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-07-26 20:43 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: netdev, benjamin.gilbert, maheshb
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 25 Jul 2017 09:44:25 -0700
> Commit de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring")
> moves link status commitment into bond_mii_monitor(), but it still relies
> on the return value of bond_miimon_inspect() as the hint. We need to return
> non-zero as long as we propose a link status change.
>
> Fixes: de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring")
> Reported-by: Benjamin Gilbert <benjamin.gilbert@coreos.com>
> Tested-by: Benjamin Gilbert <benjamin.gilbert@coreos.com>
> Cc: Mahesh Bandewar <maheshb@google.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-26 20:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25 16:44 [Patch net] bonding: commit link status change after propose Cong Wang
2017-07-25 22:14 ` Mahesh Bandewar (महेश बंडेवार)
2017-07-26 20:43 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).