Skip to contentSkip to conversation

[6219] add missing MAC address to info_str for some NICs (Mark McLoughlin)

Qemu-devel Anthony Liguori 3 participants 4 messages Jan 7, 2009 – Jan 8, 2009

lore
Share & tools
lore
#0 lore raw

Revision: 6219

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6219
Author:   aliguori
Date:     2009-01-07 17:47:15 +0000 (Wed, 07 Jan 2009)

Log Message:
-----------
add missing MAC address to info_str for some NICs (Mark McLoughlin)

Modified Paths:
--------------

    trunk/hw/mcf_fec.c
    trunk/hw/smc91c111.c
    trunk/hw/stellaris_enet.c
    trunk/hw/virtio-net.c

Modified: trunk/hw/mcf_fec.c
===================================================================

hw/mcf_fec.c +1 -0
@@ -455,4 +455,5 @@
     s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
                                  mcf_fec_receive, mcf_fec_can_receive, s);
     memcpy(s->macaddr, nd->macaddr, 6);
+    qemu_format_nic_info_str(n->vc, s->macaddr);
 }

Modified: trunk/hw/smc91c111.c
===================================================================

hw/smc91c111.c +1 -0
@@ -706,5 +706,6 @@
 
     s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
                                  smc91c111_receive, smc91c111_can_receive, s);
+    qemu_format_nic_info_str(s->vc, s->macaddr);
     /* ??? Save/restore.  */
 }

Modified: trunk/hw/stellaris_enet.c
===================================================================

hw/stellaris_enet.c +3 -1
@@ -396,9 +396,11 @@
     s->irq = irq;
     memcpy(s->macaddr, nd->macaddr, 6);
 
-    if (nd->vlan)
+    if (nd->vlan) {
         s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
                                      stellaris_enet_receive, stellaris_enet_can_receive, s);
+        qemu_format_nic_info_str(s->vc, s->macaddr);
+    }
 
     stellaris_enet_reset(s);
     register_savevm("stellaris_enet", -1, 1,

Modified: trunk/hw/virtio-net.c
===================================================================

hw/virtio-net.c +2 -0
@@ -318,6 +318,8 @@
     n->vc = qemu_new_vlan_client(nd->vlan, nd->model,
                                  virtio_net_receive, virtio_net_can_receive, n);
 
+    qemu_format_nic_info_str(n->vc, n->mac);
+
     n->tx_timer = qemu_new_timer(vm_clock, virtio_net_tx_timer, n);
     n->tx_timer_active = 0;
     n->mergeable_rx_bufs = 0;
#1 lore raw
Quoted 26 lines · Anthony Liguori

Revision: 6219

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6219
Author:   aliguori
Date:     2009-01-07 17:47:15 +0000 (Wed, 07 Jan 2009)

Log Message:
-----------
add missing MAC address to info_str for some NICs (Mark McLoughlin)

Modified Paths:
--------------

    trunk/hw/mcf_fec.c
    trunk/hw/smc91c111.c
    trunk/hw/stellaris_enet.c
    trunk/hw/virtio-net.c

Modified: trunk/hw/mcf_fec.c
===================================================================

hw/mcf_fec.c line 459

Quoted 5 lines
hw/mcf_fec.c +1 -0
@@ -455,4 +455,5 @@
     s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
                                  mcf_fec_receive, mcf_fec_can_receive, s);
     memcpy(s->macaddr, nd->macaddr, 6);
+    qemu_format_nic_info_str(n->vc, s->macaddr);
 }

s->vc looks better than n->vc :-)

Regards
Stefan Weil

#2 lore raw
Quoted 21 lines · Stefan Weil
Quoted 19 lines · Anthony Liguori

Revision: 6219

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6219
Author:   aliguori
Date:     2009-01-07 17:47:15 +0000 (Wed, 07 Jan 2009)

Log Message:
-----------
add missing MAC address to info_str for some NICs (Mark McLoughlin)

Modified Paths:
--------------

    trunk/hw/mcf_fec.c
    trunk/hw/smc91c111.c
    trunk/hw/stellaris_enet.c
    trunk/hw/virtio-net.c
Quoted 16 lines

hw/mcf_fec.c line 459

Quoted 13 lines

Modified: trunk/hw/mcf_fec.c
===================================================================

hw/mcf_fec.c +1 -0
@@ -455,4 +455,5 @@
     s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
                                  mcf_fec_receive, mcf_fec_can_receive, s);
     memcpy(s->macaddr, nd->macaddr, 6);
+    qemu_format_nic_info_str(n->vc, s->macaddr);
 }

s->vc looks better than n->vc :-)

Good catch.

Regards,

Anthony Liguori

Quoted 6 lines

Regards
Stefan Weil

#3 lore raw
Quoted 39 lines · Anthony Liguori
Quoted 21 lines · Stefan Weil
Quoted 19 lines · Anthony Liguori

Revision: 6219

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6219
Author:   aliguori
Date:     2009-01-07 17:47:15 +0000 (Wed, 07 Jan 2009)

Log Message:
-----------
add missing MAC address to info_str for some NICs (Mark McLoughlin)

Modified Paths:
--------------

    trunk/hw/mcf_fec.c
    trunk/hw/smc91c111.c
    trunk/hw/stellaris_enet.c
    trunk/hw/virtio-net.c
Quoted 16 lines

hw/mcf_fec.c line 459

Quoted 13 lines

Modified: trunk/hw/mcf_fec.c
===================================================================

hw/mcf_fec.c +1 -0
@@ -455,4 +455,5 @@
     s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
                                  mcf_fec_receive, mcf_fec_can_receive, s);
     memcpy(s->macaddr, nd->macaddr, 6);
+    qemu_format_nic_info_str(n->vc, s->macaddr);
 }

s->vc looks better than n->vc :-)

Quoted 1 line

Good catch.

Indeed, thanks.

Strange build problems, I think:

1) I had a build of m68k-softmmu/mcf_fec.o dated 2008-11-13 and I'm not sure it was being rebuilt

2) I deleted that and "make -j4" looked like it finished just fine, but if you look back up the log, the build of mcf_fec.o did indeed fail

Haven't investigated any further; but clearly I need to keep a very close watch on qemu builds :-)

Cheers,
Mark.