summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--datapath-windows/ovsext/Switch.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/datapath-windows/ovsext/Switch.c b/datapath-windows/ovsext/Switch.c
index 7ad2e9846..825fa3c8f 100644
--- a/datapath-windows/ovsext/Switch.c
+++ b/datapath-windows/ovsext/Switch.c
@@ -353,14 +353,13 @@ OvsExtPause(NDIS_HANDLE filterModuleContext,
OVS_LOG_TRACE("Enter: filterModuleContext %p",
filterModuleContext);
- ASSERT(switchContext->dataFlowState == OvsSwitchRunning);
switchContext->dataFlowState = OvsSwitchPaused;
KeMemoryBarrier();
while(switchContext->pendingOidCount > 0) {
NdisMSleep(1000);
}
- OVS_LOG_TRACE("Exit: OvsDetach Successfully");
+ OVS_LOG_TRACE("Exit: OvsExtPause Successfully");
return NDIS_STATUS_SUCCESS;
}
@@ -613,6 +612,11 @@ OvsExtNetPnPEvent(NDIS_HANDLE filterModuleContext,
}
}
+ if (netPnPEvent->NetPnPEvent.NetEvent == NetEventFilterPreDetach) {
+ switchContext->dataFlowState = OvsSwitchPaused;
+ KeMemoryBarrier();
+ }
+
status = NdisFNetPnPEvent(switchContext->NdisFilterHandle,
netPnPEvent);
OVS_LOG_TRACE("Exit: OvsExtNetPnPEvent");