hyperv/hn: Start link status check, if no network changes were pending.

Link status check is much more lightweight than network change detection.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8311
This commit is contained in:
sephe 2016-10-24 05:01:34 +00:00
parent b49e6a6728
commit 951eda704f

View File

@ -3908,12 +3908,18 @@ static void
hn_resume_mgmt(struct hn_softc *sc)
{
/*
* Kick off network change detection, which will
* do link status check too.
*/
sc->hn_mgmt_taskq = sc->hn_mgmt_taskq0;
hn_network_change(sc);
/*
* Kick off network change detection, if it was pending.
* If no network change was pending, start link status
* checks, which is more lightweight than network change
* detection.
*/
if (sc->hn_link_flags & HN_LINK_FLAG_NETCHG)
hn_network_change(sc);
else
hn_link_status_update(sc);
}
static void