Comments inlined. > -----Mesaj original----- > De la: Nithin Raju [mailto:nit...@vmware.com] > Trimis: Monday, February 29, 2016 10:43 PM > Către: Alin Serdean <aserd...@cloudbasesolutions.com>; > dev@openvswitch.org > Subiect: Re: [ovs-dev] [PATCH] datapath-windows: Pause switch state > > Alin, > Can you pls. add KeMemoryBarrier(); after the ŒdataFlowState¹ was set to > OvsSwitchPaused? [Alin Gabriel Serdean: ] Of course > > 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. [Alin Gabriel Serdean: ] Theoretically it should be the case of: https://msdn.microsoft.com/en-us/library/windows/hardware/ff569988%28v=vs.85%29.aspx NetEventFilterPreDetach gets called before OvsExtPause during boot or in other situations that I could not pinpoint exactly. The problem is we need to support both situations, this will help solve our handles problems. > > -- Nithin > > -----Original Message----- > From: dev <dev-boun...@openvswitch.org> on behalf of Alin Serdean > <aserd...@cloudbasesolutions.com> > Date: Friday, February 26, 2016 at 6:08 AM > To: "dev@openvswitch.org" <dev@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 <aserd...@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@openvswitch.org > >https://urldefense.proofpoint.com/v2/url?u=http- > 3A__openvswitch.org_mai > >lma > >n_listinfo_dev&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw- > YihVMNtXt-uEs&r > >=pN > >HQcdr7B40b4h6Yb7FIedI1dnBsxdDuTLBYD3JqV80&m=bQKQFwbZX9qWM16 > a8PxTSX5eh9i > >X5- > hVz_ReYI1hSqE&s=93MmPjSTjLDgb9KTMaL40o8ycKksb8MRyshpVaE79Kg&e > =
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev