summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Switch.c
diff options
context:
space:
mode:
authorSorin Vinturis <svinturis@cloudbasesolutions.com>2015-04-29 12:58:16 +0000
committerGurucharan Shetty <gshetty@nicira.com>2015-04-29 07:26:56 -0700
commit9719aee5c7bf4d3b99a0b25eecf86ea0eef652e8 (patch)
tree9f5322aed039c19adf6d56de255cdbda7adc111e /datapath-windows/ovsext/Switch.c
parent5c62a855c7bb24424cbe7ec48ecf2f128db8b102 (diff)
downloadopenvswitch-9719aee5c7bf4d3b99a0b25eecf86ea0eef652e8.tar.gz
datapath-windows: Enable extension after rrestart
The extension failed to be activated during booting due to the failure to initialize tunnel filter. This happened because the Base Filtering Engine (BFE) is not started and 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 tunnel filter is initialized. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/77 Acked-by: Eitan Eliahu <eliahue@vmware.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Diffstat (limited to 'datapath-windows/ovsext/Switch.c')
-rw-r--r--datapath-windows/ovsext/Switch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/datapath-windows/ovsext/Switch.c b/datapath-windows/ovsext/Switch.c
index 4f784b8a2..032153d39 100644
--- a/datapath-windows/ovsext/Switch.c
+++ b/datapath-windows/ovsext/Switch.c
@@ -40,6 +40,7 @@ UINT64 ovsTimeIncrementPerTick;
extern NDIS_HANDLE gOvsExtDriverHandle;
extern NDIS_HANDLE gOvsExtDriverObject;
+extern PDEVICE_OBJECT gOvsDeviceObject;
/*
* Reference count used to prevent premature deallocation of the global switch
@@ -203,11 +204,12 @@ OvsCreateSwitch(NDIS_HANDLE ndisFilterHandle,
goto create_switch_done;
}
- status = OvsTunnelFilterInitialize(gOvsExtDriverObject);
+ status = OvsInitTunnelFilter(gOvsExtDriverObject, gOvsDeviceObject);
if (status != NDIS_STATUS_SUCCESS) {
OvsUninitSwitchContext(switchContext);
goto create_switch_done;
}
+
*switchContextOut = switchContext;
create_switch_done:
@@ -261,7 +263,7 @@ OvsDeleteSwitch(POVS_SWITCH_CONTEXT switchContext)
if (switchContext)
{
dpNo = switchContext->dpNo;
- OvsTunnelFilterUninitialize(gOvsExtDriverObject);
+ OvsUninitTunnelFilter(gOvsExtDriverObject);
OvsClearAllSwitchVports(switchContext);
OvsUninitSwitchContext(switchContext);
}