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 [[email protected]] Sent: Thursday, September 11, 2014 4:41 AM To: Samuel Ghinet Cc: [email protected] Subject: Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup On Sep 10, 2014, at 4:15 PM, Samuel Ghinet <[email protected]> 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 [email protected] http://openvswitch.org/mailman/listinfo/dev
