From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8Tj8-0002cN-2D for qemu-devel@nongnu.org; Tue, 06 Jan 2015 07:59:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8Tj4-0000jC-LL for qemu-devel@nongnu.org; Tue, 06 Jan 2015 07:59:14 -0500 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:48156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8Tj4-0000j3-F8 for qemu-devel@nongnu.org; Tue, 06 Jan 2015 07:59:10 -0500 Received: by mail-wi0-f178.google.com with SMTP id em10so5265565wid.11 for ; Tue, 06 Jan 2015 04:59:09 -0800 (PST) Date: Tue, 6 Jan 2015 12:59:07 +0000 From: Stefan Hajnoczi Message-ID: <20150106125907.GH29775@stefanha-thinkpad.redhat.com> References: <1419353600-30519-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kHRd/tpU31Zn62xO" Content-Disposition: inline In-Reply-To: <1419353600-30519-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH] net: remove all cleanup methods from NIC NetClientInfos List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, stefanha@redhat.com --kHRd/tpU31Zn62xO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 23, 2014 at 05:53:19PM +0100, Paolo Bonzini wrote: > All NICs have a cleanup function that, in most cases, zeroes the pointer > to the NICState. In some cases, it frees data belonging to the NIC. >=20 > However, this function is never called except when exiting from QEMU. > It is not necessary to NULL pointers and free data here; the right place > to do that would be in the device's unrealize function, after calling > qemu_del_nic. Zeroing the NIC multiple times is also wrong for multiqueue > devices. >=20 > This cleanup function gets in the way of making the NetClientStates for > the NIC hold an object_ref reference to the object, so get rid of it. >=20 > Signed-off-by: Paolo Bonzini > --- > hw/net/allwinner_emac.c | 8 -------- > hw/net/cadence_gem.c | 9 --------- > hw/net/dp8393x.c | 11 ----------- > hw/net/e1000.c | 9 --------- > hw/net/eepro100.c | 8 -------- > hw/net/etraxfs_eth.c | 13 ------------- > hw/net/fsl_etsec/etsec.c | 6 ------ > hw/net/lan9118.c | 8 -------- > hw/net/lance.c | 8 -------- > hw/net/mcf_fec.c | 8 -------- > hw/net/milkymist-minimac2.c | 8 -------- > hw/net/mipsnet.c | 8 -------- > hw/net/ne2000-isa.c | 8 -------- > hw/net/ne2000.c | 8 -------- > hw/net/opencores_eth.c | 5 ----- > hw/net/pcnet-pci.c | 8 -------- > hw/net/pcnet.c | 5 ----- > hw/net/pcnet.h | 1 - > hw/net/rtl8139.c | 8 -------- > hw/net/smc91c111.c | 8 -------- > hw/net/spapr_llan.c | 8 -------- > hw/net/stellaris_enet.c | 8 -------- > hw/net/virtio-net.c | 8 -------- > hw/net/vmxnet3.c | 7 ------- > hw/net/xgmac.c | 8 -------- > hw/net/xilinx_axienet.c | 9 --------- > hw/net/xilinx_ethlite.c | 8 -------- > 27 files changed, 211 deletions(-) Thanks, applied to my net tree: https://github.com/stefanha/qemu/commits/net Stefan --kHRd/tpU31Zn62xO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUq9wbAAoJEJykq7OBq3PIdeAH/jJHsbPCS18CS9JYFcK/Twj6 Y6cKZEQ0oQY/L0rcpojAV9Mp3oYN3x9GMykMXhpkEFYQ8Aj2LJmKR7qxkP9bTq8i 6EyyNVsBX5bRL+R2l4CuXtExCq1UIs2P/iUYWrmABWPmGijhnbY3+VeoO6oq3Q4+ derWY3EHD+rZDaGjDMLmdETLndu6b06ereQ/LzBo0KdEocPVjZvz8ifr5NVUmDRS vb5x5tdlVmT3KoLpUI+Y6xodDB28oU3BKy7rxomfOh1JmDarVERhOmjFfZwXvui8 3yHoWa7X16s7sJmqjlDUNc/llZ8Qp6rPqjFiErbtJ/2US15A3iaeFkTeg34YUb4= =6CqS -----END PGP SIGNATURE----- --kHRd/tpU31Zn62xO--