From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHIfz-0004FX-4l for qemu-devel@nongnu.org; Thu, 18 Jun 2009 10:33:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHIfu-000490-HW for qemu-devel@nongnu.org; Thu, 18 Jun 2009 10:33:14 -0400 Received: from [199.232.76.173] (port=58673 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHIfu-00048r-BX for qemu-devel@nongnu.org; Thu, 18 Jun 2009 10:33:10 -0400 Received: from mx20.gnu.org ([199.232.41.8]:32353) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MHIfu-0001kV-0T for qemu-devel@nongnu.org; Thu, 18 Jun 2009 10:33:10 -0400 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MHIfs-0004QB-Si for qemu-devel@nongnu.org; Thu, 18 Jun 2009 10:33:09 -0400 Message-ID: <4A3A501E.8080600@redhat.com> Date: Thu, 18 Jun 2009 16:33:02 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] replace duplicated code. References: <1245279129-6768-1-git-send-email-glommer@redhat.com> <4A3A0D6C.9080002@redhat.com> <20090618135950.GF3517@poweredge.glommer> In-Reply-To: <20090618135950.GF3517@poweredge.glommer> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On 06/18/09 15:59, Glauber Costa wrote: >> You have changed the ordering of the qdev_set_netdev and qdev_init >> calls. I don't think this is correct, the init callback will not see >> the nicinfo then. > I see. > > How would you feel about changing the nd field of qdev for a void * one, > call it private, or whatever? > > then we could have a generic qdev_set_private(dev, p), that does it for > everybody. I must say I kinda dislike that specific dependency on nd for > net devices. Ideally, all devices should be treated as the same. What problem you are trying to solve? Unless there is something urgent to fix I'd leave it as is for now. We need some sane way to link guest config (hopefully done by config file soon) to host config. Link nic to vlan in that case, but disks and chardevs share the same issue. I consider DeviceState->nd being temporary and expect will go away once we figured that out. It is a bigger undertaking though ... cheers, Gerd