qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "patches@linaro.org" <patches@linaro.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/3] net: reimplement -net nic diagnostic fix
Date: Fri, 20 May 2011 17:12:47 +0100	[thread overview]
Message-ID: <BANLkTimio2Je+UEg7wqfyzqYzAnxYNYgqQ@mail.gmail.com> (raw)
In-Reply-To: <4DD691DC.7080109@siemens.com>

On 20 May 2011 17:07, Jan Kiszka <jan.kiszka@siemens.com> 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

  reply	other threads:[~2011-05-20 16:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-20 15:49 [Qemu-devel] [PATCH 0/3] net: reimplement -net nic diagnostic fix Peter Maydell
2011-05-20 15:49 ` [Qemu-devel] [PATCH 1/3] Revert "net: Improve the warnings for dubious command line option combinations" Peter Maydell
2011-05-20 15:50 ` [Qemu-devel] [PATCH 2/3] net: Don't warn about the default network setup Peter Maydell
2011-05-23  8:30   ` Markus Armbruster
2011-05-23  8:55     ` Peter Maydell
2011-05-20 15:50 ` [Qemu-devel] [PATCH 3/3] net: Warn about "-net nic" options which were ignored Peter Maydell
2011-05-23  8:34   ` Markus Armbruster
2011-05-20 15:55 ` [Qemu-devel] [PATCH 0/3] net: reimplement -net nic diagnostic fix Jan Kiszka
2011-05-20 16:04   ` Peter Maydell
2011-05-20 16:07     ` Jan Kiszka
2011-05-20 16:12       ` Peter Maydell [this message]
2011-05-20 16:15         ` Jan Kiszka
2011-05-23  8:35 ` Markus Armbruster
2011-06-05 13:12 ` Peter Maydell
2011-06-22 11:39   ` Peter Maydell
2011-06-22 12:58 ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTimio2Je+UEg7wqfyzqYzAnxYNYgqQ@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=armbru@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).