All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH next 0/5] link-status fixes for mii-monitoring
@ 2017-03-27 18:37 Mahesh Bandewar
  2017-03-28  4:12 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Mahesh Bandewar @ 2017-03-27 18:37 UTC (permalink / raw)
  To: Jay Vosburgh, Andy Gospodarek, Veaceslav Falico,
	Nikolay Aleksandrov, David Miller, Eric Dumazet
  Cc: netdev, Mahesh Bandewar, Mahesh Bandewar

From: Mahesh Bandewar <maheshb@google.com>

The mii monitoring is divided into two phases - inspect and commit. The
inspect phase technically should not make any changes to the state and
defer it to the commit phase. However detected link state inconsistencies
on several machines and discovered that it's the result of some
inconsistent update to link states and assumption that you *always* get
rtnl-mutex. In reality when trylock() fails to acquire rtnl-mutex, the
commit phase is postponed until next mii-mon run. At the next round
because of the state change performed in the previous inspect-run, this
round does not detect any changes and would skip calling commit phase.
This would result in an inconsistent state until next link event happens
(if it ever happens).

During the the commit phase, it's always assumed that speed and duplex
fetch is always successful, but that's always not the case. However the
slave state is marked UP irrespective of speed / duplex fetch operation.
If the speed / duplex fetch operation results in insane values for either
of these two fields, then keeping internal link state UP is not going to
provide fruitful results either.

Please see into individual patches for more details.

Mahesh Bandewar (5):
  bonding: split bond_set_slave_link_state into two parts
  bonding: improve link-status update in mii-monitoring
  bonding: make speed, duplex setting consistent with link state
  bonding: correctly update link status during mii-commit phase
  bonding: avoid printing while holding a spinlock

 drivers/net/bonding/bond_3ad.c  |  6 ++---
 drivers/net/bonding/bond_main.c | 49 ++++++++++++++++++++++++-----------------
 include/net/bonding.h           | 22 +++++++++++++-----
 3 files changed, 49 insertions(+), 28 deletions(-)

-- 
2.12.1.578.ge9c3154ca4-goog

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH next 0/5] link-status fixes for mii-monitoring
  2017-03-27 18:37 [PATCH next 0/5] link-status fixes for mii-monitoring Mahesh Bandewar
@ 2017-03-28  4:12 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-03-28  4:12 UTC (permalink / raw)
  To: mahesh; +Cc: j.vosburgh, andy, vfalico, nikolay, edumazet, netdev, maheshb

From: Mahesh Bandewar <mahesh@bandewar.net>
Date: Mon, 27 Mar 2017 11:37:24 -0700

> From: Mahesh Bandewar <maheshb@google.com>
> 
> The mii monitoring is divided into two phases - inspect and commit. The
> inspect phase technically should not make any changes to the state and
> defer it to the commit phase. However detected link state inconsistencies
> on several machines and discovered that it's the result of some
> inconsistent update to link states and assumption that you *always* get
> rtnl-mutex. In reality when trylock() fails to acquire rtnl-mutex, the
> commit phase is postponed until next mii-mon run. At the next round
> because of the state change performed in the previous inspect-run, this
> round does not detect any changes and would skip calling commit phase.
> This would result in an inconsistent state until next link event happens
> (if it ever happens).
> 
> During the the commit phase, it's always assumed that speed and duplex
> fetch is always successful, but that's always not the case. However the
> slave state is marked UP irrespective of speed / duplex fetch operation.
> If the speed / duplex fetch operation results in insane values for either
> of these two fields, then keeping internal link state UP is not going to
> provide fruitful results either.
> 
> Please see into individual patches for more details.

Looks good, series applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-28  4:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27 18:37 [PATCH next 0/5] link-status fixes for mii-monitoring Mahesh Bandewar
2017-03-28  4:12 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.