datapath-windows: fix endless loop on reboot
authorAlin Serdean <aserdean@cloudbasesolutions.com>
Tue, 12 Jan 2016 18:00:32 +0000 (18:00 +0000)
committerGurucharan Shetty <guru@ovn.org>
Wed, 3 Feb 2016 16:13:52 +0000 (08:13 -0800)
commit8834e5c27ff9739ff4bf0199894d839581d30da8
treef6025f27cc84c4b28ed2bd02a3133e6b46f7f0ee
parentb1e04512f7150aa9d98a121b32f820c316522372
datapath-windows: fix endless loop on reboot

Testing under 2012 gave some more inisight on an old bug.

If a PNP event with the value of NetEventSwitchActivate was triggered
we were calling OvsQuerySwitchActivationComplete which does an OID request
to the underlying drivers, however this triggered a hang because as per
documentation:
https://msdn.microsoft.com/en-us/library/windows/hardware/ff561830%28v=vs.85%29.aspx
"A driver can call NdisFOidRequest when it is in the Restarting, Running,
Pausing, or Paused state."
This resulted in an endless booting cycle.
Looking at the documentation again:
https://msdn.microsoft.com/en-us/library/windows/hardware/ff568751%28v=vs.85%29.aspx
NetEventSwitchActivate indicates that the extensible switch has completed
activation so we can now safely query the switch itself.

Also we are not forwarding the PNP event to the overlaying drivers unless
we succeeded in the operation, this issue has been fixed also.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
datapath-windows/ovsext/Switch.c