From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0bCN-0007jd-Dj for qemu-devel@nongnu.org; Wed, 21 Oct 2009 09:25:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0bCI-0007bh-6W for qemu-devel@nongnu.org; Wed, 21 Oct 2009 09:25:54 -0400 Received: from [199.232.76.173] (port=55705 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0bCH-0007bT-VI for qemu-devel@nongnu.org; Wed, 21 Oct 2009 09:25:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53233) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N0bCH-0007Nj-IM for qemu-devel@nongnu.org; Wed, 21 Oct 2009 09:25:49 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9LDPlRP009065 for ; Wed, 21 Oct 2009 09:25:48 -0400 From: Gerd Hoffmann Date: Wed, 21 Oct 2009 15:25:21 +0200 Message-Id: <1256131543-28416-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 01/22] qdev-ify network cards List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Hi, Now the first non-RfC version of this series. Changes compared to last RfC patch: * Added some common helper code so we have less code duplication and the actual driver changes are smaller. * All network drivers are converted now. * Some final cleanups which zap dead code. With the patches applied network cards can now be created using ... -device ne2k_isa,mac=00:11:22:33:44:55,vlan=1,irq=3,id=foo 'info qtree' shows ... [ ... ] bus: isa.0 type ISA dev: ne2k_isa, id "foo" dev-prop: iobase = 0x300 dev-prop: irq = 3 dev-prop: mac = 00:11:22:33:44:55 dev-prop: vlan = 1 dev-prop: netdev = [ ... ] 'info network' shows: [ ... ] VLAN 1 devices: foo: model=ne2k_isa,macaddr=00:11:22:33:44:55 The nic initialization code calls qemu_new_vlan_client() with the vlan/netdev specified using the properties. Likewise the device cleanup code should call qemu_del_vlan_client (which only makes sense for hot-pluggable devices). struct NICInfo is only involved when creating nics using the legacy path (via -net nic,...). This patch series is also available here: http://repo.or.cz/w/qemu/kraxel.git?a=shortlog;h=refs/heads/nic.v4 cheers, Gerd