[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/3] net: reimplement -net nic diagnostic fix
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 0/3] net: reimplement -net nic diagnostic fix |
Date: |
Fri, 20 May 2011 17:12:47 +0100 |
On 20 May 2011 17:07, Jan Kiszka <address@hidden> wrote:
> On 2011-05-20 18:04, Peter Maydell wrote:
>> I think that avoiding MAC address clashes should be done by
>> having net_init_nic() call qemu_macaddr_default_if_unset()
>
> You mean qemu_new_nic? Otherwise it wouldn't help. Will have a look to
> move that over.
No, I mean net_init_nic(). At the moment there are two bits of
code which generate a fresh MAC address:
1. qemu_macaddr_default_if_unset() -- init routines for qdev network
devices call this
2. net_init_nic() -- devices created via -net nic get their MAC
address assigned here; if the underlying device is qdev then
by the time the qdev init routine is called the macaddr is
already set so it isn't overridden
So if the code in 2. calls qemu_macaddr_default_if_unset instead then
we only have one function with a static variable which doles out
autogenerated MAC addresses.
-- PMM
Re: [Qemu-devel] [PATCH 0/3] net: reimplement -net nic diagnostic fix, Markus Armbruster, 2011/05/23