From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lu50C-0005ha-2o for qemu-devel@nongnu.org; Wed, 15 Apr 2009 09:18:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lu507-0005gZ-At for qemu-devel@nongnu.org; Wed, 15 Apr 2009 09:18:07 -0400 Received: from [199.232.76.173] (port=44431 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lu507-0005gW-4b for qemu-devel@nongnu.org; Wed, 15 Apr 2009 09:18:03 -0400 Received: from mx2.redhat.com ([66.187.237.31]:56870) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lu506-0007dp-RX for qemu-devel@nongnu.org; Wed, 15 Apr 2009 09:18:03 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3FDI2Up029337 for ; Wed, 15 Apr 2009 09:18:02 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3FDI1v0005621 for ; Wed, 15 Apr 2009 09:18:01 -0400 Received: from [127.0.0.1] (file.rdu.redhat.com [10.11.255.147]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3FDHxh2008214 for ; Wed, 15 Apr 2009 09:18:00 -0400 Subject: Re: [Qemu-devel] [PATCH 2/7] net: Add VLAN client cleanup handler From: Mark McLoughlin In-Reply-To: <20090414172954.15035.35711.stgit@mchn012c.ww002.siemens.net> References: <20090414172954.15035.73053.stgit@mchn012c.ww002.siemens.net> <20090414172954.15035.35711.stgit@mchn012c.ww002.siemens.net> Content-Type: text/plain Date: Wed, 15 Apr 2009 14:09:39 +0100 Message-Id: <1239800979.4431.128.camel@blaa> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: Mark McLoughlin , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi Jan, On Tue, 2009-04-14 at 19:29 +0200, Jan Kiszka wrote: > Do proper VLAN client cleanup via a callback handler. This fixes > resource leakage on host_net_remove and allows a generic net_cleanup > implementation. Yep, we need this. However, I've got a different version in my queue (see below) - I've been holding back on posting it until I finished some other patches I'm working on, but I'll polish it off and post this afternoon. Differences from yours include: - I've added cleanup code to all the NICs, including adding unregister_savevm() so that we don't try and save deleted NICs - Rather than adding yet another param to new_vlan_client(), I just initialize vc->cleanup after creating the client; another patch in my queue removes all callbacks to new_vlan_client() because as more are added it just gets terribly unwieldy. - I remove the io handler on e.g. the tapfd when freeing - otherwise we'll continue to poll the fd AFAICS - I implement net_cleanup() by calling del_vlan_client() on all clients Apart from that, the patches are very similar - are you okay with just waiting for my patch? Thanks, Mark.