qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v2 4/5] ne2k_isa: qdev-ify.


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [RFC PATCH v2 4/5] ne2k_isa: qdev-ify.
Date: Wed, 07 Oct 2009 16:07:55 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-2.7.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4

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




reply via email to

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