[ kvm-Bugs-2386363 ] virtio-net doesn't set vc->info_str

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

 



Bugs item #2386363, was opened at 2008-12-04 04:43
Message generated for change (Comment added) made by jessorensen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2386363&group_id=180599

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: qemu
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nolan (sf-nolan)
Assigned to: Nobody/Anonymous (nobody)
Summary: virtio-net doesn't set vc->info_str

Initial Comment:
Which makes "info network" not show the devices, which makes it difficult to figure out what NIC model a running VM is using via the monitor.

The fix is simple, just add the following to virtio-net.c::virtio_net_init right after the call to qemu_new_vlan_client:
 snprintf(n->vc->info_str, sizeof(n->vc->info_str),
          "%s macaddr=%02x:%02x:%02x:%02x:%02x:%02x", "virtio",
          n->nd->macaddr[0], n->nd->macaddr[1], n->nd->macaddr[2],
          n->nd->macaddr[3], n->nd->macaddr[4], n->nd->macaddr[5]);
Note that the string should probably be "virtio" not "virtio-net" so that it matches the model= command line parameter.

Ideally all of this should be factored up into qemu's generic network code, but the trivial change above at least brings virtio-net to parity with all the other NIC models.

----------------------------------------------------------------------

>Comment By: Jes Sorensen (jessorensen)
Date: 2010-07-01 10:37

Message:
Fixed in more recent QEMU. See below - model information is there fine:

QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info network
VLAN 1 devices:
  tap.0: ifname=tap0,script=/etc/kvm-ifup.sh,downscript=/etc/qemu-ifdown
  virtio-net-pci.0: model=virtio-net-pci,macaddr=02:00:40:3f:55:10

Closing
Jes


----------------------------------------------------------------------

Comment By: Nolan (sf-nolan)
Date: 2009-01-08 18:45

Message:
I'm not sure that this should be closed, as I believe the
qemu_format_nic_info_str fix introduces a regression:
With this change, the "info network" command no longer lists the model,
making it impossible for monitor clients to determine the NIC model in use
for a given interface.

----------------------------------------------------------------------

Comment By: Mark McLoughlin (markmc)
Date: 2009-01-08 18:38

Message:
Thanks, fixed in latest git:

http://git.kernel.org/?p=linux/kernel/git/avi/kvm-userspace.git;a=commitdiff;h=ca1fb16ab

----------------------------------------------------------------------

Comment By: Hollis (hollis)
Date: 2008-12-12 17:31

Message:
Patch submitted: http://marc.info/?l=kvm&m=122882041418031&w=4

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2386363&group_id=180599
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux