From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvXBY-00034m-PC for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:08:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvXBT-00032E-LL for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:08:07 -0400 Received: from [199.232.76.173] (port=56503 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvXBT-00032B-Ex for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:08:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30569) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvXBS-0002nK-UK for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:08:03 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n97E8225001389 for ; Wed, 7 Oct 2009 10:08:02 -0400 Message-ID: <4ACCA0BB.2070103@redhat.com> Date: Wed, 07 Oct 2009 16:07:55 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC PATCH v2 4/5] ne2k_isa: qdev-ify. References: <1254918996-26050-1-git-send-email-kraxel@redhat.com> <1254918996-26050-5-git-send-email-kraxel@redhat.com> <1254923407.2887.16.camel@blaa> In-Reply-To: <1254923407.2887.16.camel@blaa> 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: Mark McLoughlin Cc: qemu-devel@nongnu.org On 10/07/09 15:50, Mark McLoughlin wrote: > On Wed, 2009-10-07 at 14:36 +0200, Gerd Hoffmann wrote: > >> - s->vc = qdev_get_vlan_client(&dev->qdev, >> - ne2000_can_receive, ne2000_receive, NULL, >> - isa_ne2000_cleanup, s); >> - qemu_format_nic_info_str(s->vc, s->macaddr); >> + if (s->vlan != -1) { >> + s->vc = qemu_new_vlan_client(qemu_find_vlan(s->vlan, 1), >> + dev->qdev.info->name, dev->qdev.id, >> + ne2000_can_receive, ne2000_receive, NULL, >> + isa_ne2000_cleanup, s); >> + qemu_format_nic_info_str(s->vc, s->macaddr); >> + } else { >> + qemu_error("warning: no vlan specfied, ne2k_isa is unconnected\n"); >> + } > > I'll be posting a patch later which allows qemu_new_vlan_client() to > take a NULL vlan thereafter drop any packets passed to it. > > I think that makes more sense, as VLANClientState should become a > NetClient structure which can represent a NIC, backend or even a vlan > itself. Fine with me. I just had to pull out something out of thin air as placeholder for net changes which are in the pipeline but not posted yet. Will adjust to whatever comes with for the next respin ;) cheers, Gerd