qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 01/22] qdev-ify network cards


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH 01/22] qdev-ify network cards
Date: Wed, 21 Oct 2009 15:25:21 +0200

  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 = <null>
        [ ... ]

'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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]