Repository navigation
Commit de77ecd
bonding: improve link-status update in mii-monitoring
The primary issue is that mii-inspect phase updates link-state and
expects changes to be committed during the mii-commit phase. After
the inspect phase if it fails to acquire rtnl-mutex, the commit
phase (bond_mii_commit) doesn't get to run. This partially updated
state stays and makes the internal-state inconsistent.
e.g. setup bond0 => slaves: eth1, eth2
eth1 goes DOWN -> UP
mii_monitor()
mii-inspect()
bond_set_slave_link_state(eth1, UP, DontNotify)
rtnl_trylock() <- fails!
Next mii-monitor round
eth1: No change
mii_monitor()
mii-inspect()
eth1->link == current-status (ethtool_ops->get_link)
no-change-detected
End result:
eth1:
Link = BOND_LINK_UP
Speed = 0xfffff [SpeedUnknown]
Duplex = 0xff [DuplexUnknown]
This doesn't always happen but for some unlucky machines in a large set
of machines it creates problems.
The fix for this is to avoid making changes during inspect phase and
postpone them until acquiring the rtnl-mutex / invoking commit phase.
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent f307668 commit de77ecd
1 file changed
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2033 | 2033 | | |
2034 | 2034 | | |
2035 | 2035 | | |
2036 | | - | |
2037 | | - | |
| 2036 | + | |
2038 | 2037 | | |
2039 | 2038 | | |
2040 | 2039 | | |
| |||
2049 | 2048 | | |
2050 | 2049 | | |
2051 | 2050 | | |
2052 | | - | |
2053 | | - | |
| 2051 | + | |
2054 | 2052 | | |
2055 | 2053 | | |
2056 | 2054 | | |
| |||
2072 | 2070 | | |
2073 | 2071 | | |
2074 | 2072 | | |
2075 | | - | |
2076 | | - | |
| 2073 | + | |
2077 | 2074 | | |
2078 | 2075 | | |
2079 | 2076 | | |
| |||
2086 | 2083 | | |
2087 | 2084 | | |
2088 | 2085 | | |
2089 | | - | |
2090 | | - | |
2091 | | - | |
| 2086 | + | |
2092 | 2087 | | |
2093 | 2088 | | |
2094 | 2089 | | |
| |||
2225 | 2220 | | |
2226 | 2221 | | |
2227 | 2222 | | |
| 2223 | + | |
| 2224 | + | |
2228 | 2225 | | |
2229 | 2226 | | |
2230 | 2227 | | |
| |||
2245 | 2242 | | |
2246 | 2243 | | |
2247 | 2244 | | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
2248 | 2248 | | |
2249 | 2249 | | |
2250 | 2250 | | |
| |||
0 commit comments