summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Datapath.c
diff options
context:
space:
mode:
authorSorin Vinturis <svinturis@cloudbasesolutions.com>2015-03-24 14:53:11 +0000
committerBen Pfaff <blp@nicira.com>2015-03-24 08:37:27 -0700
commit59a33335dcc5c750b55dbd2a7961e91a816697b7 (patch)
tree21de56c28c876b0906f65401645a488e52f5ca42 /datapath-windows/ovsext/Datapath.c
parent677d9158fc0aa16f875198d83c7bd8f87238aed5 (diff)
downloadopenvswitch-59a33335dcc5c750b55dbd2a7961e91a816697b7.tar.gz
datapath-windows: Updated WFP system provider handling
If the Base Filtering Engine (BFE) is not started, the WFP system provider failed to be added because no session to the engine could be acquired. The solution for this was to registered a BFE notification callback that is called whenever the BFE's state changes. Only if the BFE's state is running the WFP system provider is added. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/65 Acked-by: Eitan Eliahu <eliahue@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows/ovsext/Datapath.c')
-rw-r--r--datapath-windows/ovsext/Datapath.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/datapath-windows/ovsext/Datapath.c b/datapath-windows/ovsext/Datapath.c
index 8eb13f14a..c6fe89eb7 100644
--- a/datapath-windows/ovsext/Datapath.c
+++ b/datapath-windows/ovsext/Datapath.c
@@ -353,35 +353,19 @@ PNDIS_SPIN_LOCK gOvsCtrlLock;
VOID
OvsInit()
{
- HANDLE handle = NULL;
-
gOvsCtrlLock = &ovsCtrlLockObj;
NdisAllocateSpinLock(gOvsCtrlLock);
OvsInitEventQueue();
-
- OvsTunnelEngineOpen(&handle);
- if (handle) {
- OvsTunnelAddSystemProvider(handle);
- }
- OvsTunnelEngineClose(&handle);
}
VOID
OvsCleanup()
{
- HANDLE handle = NULL;
-
OvsCleanupEventQueue();
if (gOvsCtrlLock) {
NdisFreeSpinLock(gOvsCtrlLock);
gOvsCtrlLock = NULL;
}
-
- OvsTunnelEngineOpen(&handle);
- if (handle) {
- OvsTunnelRemoveSystemProvider(handle);
- }
- OvsTunnelEngineClose(&handle);
}
VOID
@@ -448,6 +432,8 @@ OvsCreateDeviceObject(NDIS_HANDLE ovsExtDriverHandle)
if (ovsExt) {
ovsExt->numberOpenInstance = 0;
}
+ } else {
+ OvsRegisterSystemProvider((PVOID)gOvsDeviceObject);
}
OVS_LOG_TRACE("DeviceObject: %p", gOvsDeviceObject);
@@ -471,6 +457,8 @@ OvsDeleteDeviceObject()
NdisDeregisterDeviceEx(gOvsDeviceHandle);
gOvsDeviceHandle = NULL;
gOvsDeviceObject = NULL;
+
+ OvsUnregisterSystemProvider();
}
}