Hi Nithin,
Sorry for coming late on this one.
We should free the dump state when the system calls the driver on cleanup as 
you did. But, the cleanup IOCTL can be (actually will be) executed from a 
different thread context. This means that we need to protect  dumpState.ovsMsg.
Eitan

-----Original Message-----
From: Nithin Raju 
Sent: Thursday, September 11, 2014 11:09 PM
To: Eitan Eliahu
Cc: Samuel Ghinet; dev@openvswitch.org
Subject: Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during 
instance cleanup

Samuel/Eitan,
If you are OK with the changes, can you pls. give a Acked-by, so we can check 
it in?

thanks,
Nithin


On Sep 11, 2014, at 12:23 AM, Eitan Eliahu <elia...@vmware.com> wrote:

> HI Sam,
> Please note that the cleanup callback is not called by NDIS rather called 
> directed by the I/O manager for the device we created for communicating with 
> the user mode process.
> This device is not part of the network stack.
> Per your question: Socket for sump operation are transient (i.e. created and 
> deleted specifically for the transaction). On the other hand socket which are 
> used for notifications are associated (indirectly) with a queue. Each socket 
> is associated with an open file handle. But, packet socket and transaction 
> based sockets are always separate. Only notification sockets has an I/O 
> pending in the driver. So there is no case were same socket or file handle is 
> used for event notifications and for packet read.
> I hope I answered your question.
> Eitan
> 
> -----Original Message-----
> From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of Samuel Ghinet
> Sent: Wednesday, September 10, 2014 4:15 PM
> To: dev@openvswitch.org; Nithin Raju
> Subject: Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during 
> instance cleanup
> 
> Hey Nithin,
> 
> AFAIK OvsCleanupOpenInstance is called by OvsCleanupDevice, which is a 
> callback called by NDIS when an IO is pending and the file must be closed.
> FreeUserDumpState is only for dump operations.
> 
> Is it possible that an IO to be pending (packet queueing) while at the same 
> time a dump operation to be in progress, for the same file?
> 
> Sam
> ________________________________________
> Date: Wed, 10 Sep 2014 13:17:17 -0700
> From: Nithin Raju <nit...@vmware.com>
> To: dev@openvswitch.org
> Subject: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during
>        instance cleanup
> Message-ID: <1410380237-28794-1-git-send-email-nit...@vmware.com>
> 
> Signed-off-by: Nithin Raju <nit...@vmware.com>
> ---
> datapath-windows/ovsext/Datapath.c |    1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/datapath-windows/ovsext/Datapath.c 
> b/datapath-windows/ovsext/Datapath.c
> index c145d00..d1f4b9d 100644
> --- a/datapath-windows/ovsext/Datapath.c
> +++ b/datapath-windows/ovsext/Datapath.c
> @@ -417,6 +417,7 @@ OvsCleanupOpenInstance(PFILE_OBJECT fileObject)
>     POVS_OPEN_INSTANCE instance = (POVS_OPEN_INSTANCE)fileObject->FsContext;
>     ASSERT(instance);
>     ASSERT(fileObject == instance->fileObject);
> +    FreeUserDumpState(instance);
>     OvsCleanupEvent(instance);
>     OvsCleanupPacketQueue(instance);
> }
> --
> 1.7.4.1
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://urldefense.proofpoint.com/v1/url?u=http://openvswitch.org/mailman/listinfo/dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=yTvML8OxA42Jb6ViHe7fUXbvPVOYDPVq87w43doxtlY%3D%0A&m=8PGOpOx4Jbc2Rk0NuHKo7bm7PJJIqvvnMhULmRE9Kvk%3D%0A&s=300c6894f54d84467a05b77d22166d90cfea554f7fa5275258ccd00d493d3fd7

Thanks,
-- Nithin

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to