Hi Sam, it would be much better to clean any per-process state after the process terminates. In that sense we shouldn't rely on my type if I/O or another rather just clean and reset every state. Thanks, Eitan
-----Original Message----- From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of Samuel Ghinet Sent: Sunday, September 14, 2014 7:38 PM To: Nithin Raju Cc: dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup I meant in the sense, if it is necessary. AFAIK, the IO pending can only happen in non-dump operations (and here, non-dump netlink pids). Therefore, I don't know if it is really useful to FreeDumpState in a pending IO cancel callback function. Perhaps an ASSERT to make sure the dump state is empty, instead? Thanks, Sam ________________________________________ From: Nithin Raju [nit...@vmware.com] Sent: Thursday, September 11, 2014 4:41 AM To: Samuel Ghinet Cc: dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup On Sep 10, 2014, at 4:15 PM, Samuel Ghinet <sghi...@cloudbasesolutions.com> wrote: > 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? Generally, the PIDs that are used for IO are not used for dump operation. See dpif_linux_port_get_pid() that maps a vport to a netlink socket to be used for I/O. This is true for packets that are passed to userspace via the 'userspace()' action. For packets that are passed to userspace because there's no flow, we could use any of the PIDs that are part of a vport - and these should be different from the ones used for dump. For dump the sockets are allocated nl_pool_alloc(). The call to FreeUserDumpState() I added is to address the case where we are in the middle of a dump operation, and the userspace process got killed. We need to cleanup the state that was associated. Thanks, -- Nithin _______________________________________________ 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=Vm%2FLPXVvHjTDJYtWFTBayOtN3ieO8UqbmcmqBMDhgos%3D%0A&s=f33887f75084cdd9526374ae2c0a4bb13f897fdfcba170d404703dabc3a2b119 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev