[ovs-dev] [PATCH] datapath-windows: Pause switch state

Nithin Raju nithin at vmware.com
Mon Feb 29 20:43:21 UTC 2016


Alin,
Can you pls. add KeMemoryBarrier(); after the ŒdataFlowState¹ was set to
OvsSwitchPaused?

What does a ŒNetEventFilterPreDetach¹ event mean in the context of a
Hyper-V switch? Will the OvsExtPause() get invoked after that? If so,
we¹ll have to update the ASSERT in OvsExtPause() which assumes that we are
in OvsSwitchRunning.

-- Nithin

-----Original Message-----
From: dev <dev-bounces at openvswitch.org> on behalf of Alin Serdean
<aserdean at cloudbasesolutions.com>
Date: Friday, February 26, 2016 at 6:08 AM
To: "dev at openvswitch.org" <dev at openvswitch.org>
Subject: [ovs-dev] [PATCH] datapath-windows: Pause switch state

>A PnP(plug and play) event will be triggered before trying to disable
>the extension. We could use this PnP event to prepare for detaching
>the datapath.
>
>This patch sets the switch into a paused state so no more net buffers
>are queued.
>
>Also clean some commentaries.
>
>Signed-off-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
>---
> datapath-windows/ovsext/Switch.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
>diff --git a/datapath-windows/ovsext/Switch.c
>b/datapath-windows/ovsext/Switch.c
>index 77bafb4..882d587 100644
>--- a/datapath-windows/ovsext/Switch.c
>+++ b/datapath-windows/ovsext/Switch.c
>@@ -352,7 +352,7 @@ OvsExtPause(NDIS_HANDLE filterModuleContext,
>         NdisMSleep(1000);
>     }
> 
>-    OVS_LOG_TRACE("Exit: OvsDetach Successfully");
>+    OVS_LOG_TRACE("Exit: OvsExtPause Successfully");
>     return NDIS_STATUS_SUCCESS;
> }
> 
>@@ -605,6 +605,10 @@ OvsExtNetPnPEvent(NDIS_HANDLE filterModuleContext,
>         }
>     }
> 
>+    if (netPnPEvent->NetPnPEvent.NetEvent == NetEventFilterPreDetach) {
>+        switchContext->dataFlowState = OvsSwitchPaused;
>+    }
>+
>     status = NdisFNetPnPEvent(switchContext->NdisFilterHandle,
>                               netPnPEvent);
>     OVS_LOG_TRACE("Exit: OvsExtNetPnPEvent");
>-- 
>1.9.5.msysgit.0
>_______________________________________________
>dev mailing list
>dev at openvswitch.org
>https://urldefense.proofpoint.com/v2/url?u=http-3A__openvswitch.org_mailma
>n_listinfo_dev&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=pN
>HQcdr7B40b4h6Yb7FIedI1dnBsxdDuTLBYD3JqV80&m=bQKQFwbZX9qWM16a8PxTSX5eh9iX5-
>hVz_ReYI1hSqE&s=93MmPjSTjLDgb9KTMaL40o8ycKksb8MRyshpVaE79Kg&e= 




More information about the dev mailing list