From: Stefan Hajnoczi <stefanha@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] net: remove all cleanup methods from NIC NetClientInfos
Date: Tue, 6 Jan 2015 12:59:07 +0000 [thread overview]
Message-ID: <20150106125907.GH29775@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1419353600-30519-1-git-send-email-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2112 bytes --]
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.
>
> 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.
>
> 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.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> 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
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2015-01-06 12:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-23 16:53 [Qemu-devel] [PATCH] net: remove all cleanup methods from NIC NetClientInfos Paolo Bonzini
2015-01-02 14:00 ` Stefan Hajnoczi
2015-01-02 16:22 ` Paolo Bonzini
2015-01-06 12:58 ` Stefan Hajnoczi
2015-01-06 12:59 ` Stefan Hajnoczi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150106125907.GH29775@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).