[ovs-dev] [PATCH v2] datapath-windows: Pause switch state on PnP event

Nithin Raju nithin at vmware.com
Tue Apr 26 13:36:07 UTC 2016


Acked-by: Nithin Raju <nithin at vmware.com>

-----Original Message-----
From: dev <dev-bounces at openvswitch.org> on behalf of Sairam Venugopal
<vsairam at vmware.com>
Date: Monday, April 25, 2016 at 2:38 PM
To: Alin Serdean <aserdean at cloudbasesolutions.com>, "dev at openvswitch.org"
<dev at openvswitch.org>
Subject: Re: [ovs-dev] [PATCH v2] datapath-windows: Pause switch state on
PnP event

>Thanks for incorporating the review comments. I noticed that V2 hasn¹t
>been ACKED yet. 
>
>Acked-by: Sairam Venugopal <vsairam at vmware.com>
>
>
>
>On 3/10/16, 5:33 AM, "Alin Serdean" <aserdean at cloudbasesolutions.com>
>wrote:
>
>>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>
>>---
>>v2: Address comments
>>---
>> datapath-windows/ovsext/Switch.c | 8 ++++++--
>> 1 file changed, 6 insertions(+), 2 deletions(-)
>>
>>diff --git a/datapath-windows/ovsext/Switch.c
>>b/datapath-windows/ovsext/Switch.c
>>index 77bafb4..2a19988 100644
>>--- a/datapath-windows/ovsext/Switch.c
>>+++ b/datapath-windows/ovsext/Switch.c
>>@@ -345,14 +345,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;
>> }
>> 
>>@@ -605,6 +604,11 @@ OvsExtNetPnPEvent(NDIS_HANDLE filterModuleContext,
>>         }
>>     }
>> 
>>+    if (netPnPEvent->NetPnPEvent.NetEvent == NetEventFilterPreDetach) {
>>+        switchContext->dataFlowState = OvsSwitchPaused;
>>+        KeMemoryBarrier();
>>+    }
>>+
>>     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_mailm
>>an_listinfo_dev&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=
>>pNHQcdr7B40b4h6Yb7FIedI1dnBsxdDuTLBYD3JqV80&m=PAT4l_htdzZf5en9YHeXbuJ_V8b
>>cEK9etu52fQdn03k&s=-8S9mRqroWfEtzpHQOqA0GTM5IWhnuHVihkZjcuEe0c&e=
>
>_______________________________________________
>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=PAT4l_htdzZf5en9YHeXbuJ_V8bcEK
>9etu52fQdn03k&s=-8S9mRqroWfEtzpHQOqA0GTM5IWhnuHVihkZjcuEe0c&e= 



More information about the dev mailing list