[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: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PATCH 0/3] net: reimplement -net nic diagnostic fix |
Date: |
Fri, 20 May 2011 18:15:07 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2011-05-20 18:12, Peter Maydell wrote:
> 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.
Ah, I see. I thought qdev would always assign the same MAC. Then it's fine.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
- [Qemu-devel] [PATCH 2/3] net: Don't warn about the default network setup, (continued)
Re: [Qemu-devel] [PATCH 0/3] net: reimplement -net nic diagnostic fix, Markus Armbruster, 2011/05/23